drm/vc4: Calculate bpc based on max_requested_bpc
authorMatthias Reichl <hias@horus.com>
Sat, 14 Jan 2023 15:24:39 +0000 (16:24 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 8 Feb 2023 16:47:50 +0000 (16:47 +0000)
commit14b35093ca68bf2c81bbc90aace5007142b40b40
tree375ce2545441de40a2391176279f5db50ecd3ca1
parentc113cf128749d17b6262d76769a6ad0e0e1f33c3
drm/vc4: Calculate bpc based on max_requested_bpc

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 <hias@horus.com>
drivers/gpu/drm/vc4/vc4_hdmi.c