]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/bridge: Prioritize supported_formats over ycbcr_420_allowed
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tue, 24 Dec 2024 18:22:41 +0000 (20:22 +0200)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 13 Jan 2025 09:18:20 +0000 (11:18 +0200)
commitd102ac39fbe181a6f0c9e98bc26bd94018657808
treee9c53ba928c65a86de8c1f75d41be3cfcdd4c8a3
parent35243fc777566ccb3370e175cf591fea0f81f68c
drm/bridge: Prioritize supported_formats over ycbcr_420_allowed

Bridges having DRM_BRIDGE_OP_HDMI set in their ->ops are supposed to
rely on the ->supported_formats bitmask to advertise the permitted
colorspaces, including HDMI_COLORSPACE_YUV420.

However, a new flag ->ycbcr_420_allowed has been recently introduced,
which brings the necessity to require redundant and potentially
inconsistent information to be provided on HDMI bridges initialization.

Adjust ->ycbcr_420_allowed for HDMI bridges according to
->supported_formats, right before adding them to the global bridge list.
This keeps the initialization process straightforward and unambiguous,
thereby preventing any further confusion.

Fixes: 3ced1c687512 ("drm/display: bridge_connector: handle ycbcr_420_allowed")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241224-bridge-conn-fmt-prio-v4-1-a9ceb5671379@collabora.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/drm_bridge.c