Skip to content

Commit

Permalink
drm/vc4: Calculate bpc based on max_requested_bpc
Browse files Browse the repository at this point in the history
This aligns vc4 with Intel, AMD and Synopsis drivers and fixes max bpc
connector property not working as expected on monitors with YCbCr 4:2:2
support but not deep color support.

max_bpc in connector state is clamped at max_bpc from display info and
the latter only takes deep color modes into account so it will always
be 8, even if the display can do 4:2:2 12-bit output.

Signed-off-by: Matthias Reichl <[email protected]>
  • Loading branch information
HiassofT authored and pelwell committed Feb 8, 2023
1 parent eaf07c3 commit 0cb594c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vc4/vc4_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ vc4_hdmi_encoder_compute_config(const struct vc4_hdmi *vc4_hdmi,
{
struct drm_device *dev = vc4_hdmi->connector.dev;
struct drm_connector_state *conn_state = &vc4_state->base;
unsigned int max_bpc = clamp_t(unsigned int, conn_state->max_bpc, 8, 12);
unsigned int max_bpc = clamp_t(unsigned int, conn_state->max_requested_bpc, 8, 12);
unsigned int bpc;
int ret;

Expand Down

0 comments on commit 0cb594c

Please sign in to comment.