drm/vc4: hdmi: Always try to have the highest bpc
authorMaxime Ripard <maxime@cerno.tech>
Tue, 22 Feb 2022 16:40:41 +0000 (17:40 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 24 Mar 2022 12:44:00 +0000 (13:44 +0100)
commitdd39d024a8471e88951f8494f19e693c9e3185a9
treead31d9049b20f55e2afcea9d8f0734b1597c8f5a
parentf785dcfc596c378a19af01a6a337b8b67e5e4534
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>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220222164042.403112-7-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_hdmi.h