drm/vc4: hdmi: Always try to have the highest bpc
authorMaxime Ripard <maxime@cerno.tech>
Fri, 10 Dec 2021 14:29:56 +0000 (15:29 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:35 +0000 (16:04 +0000)
commitd054eb163dd53dd8bab6da782933811875be1c87
tree580bf30fd045481e10759dcb80ba8c9a101a69c9
parent7bc19b54ac30defbd5e47726683cddfcee407619
drm/vc4: hdmi: Always try to have the highest bpc

Currently we take the max_bpc property as the bpc value and do not try
anything else.

However, what the other drivers seem to be doing is that they would try
with the highest bpc allowed by the max_bpc property and the hardware
capabilities, test if it results in an acceptable configuration, and if
not decrease the bpc and try again.

Let's use the same logic.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_hdmi.h