[PATCH v3 12/15] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector

Cristian Ciocaltea posted 15 patches 8 months, 4 weeks ago
There is a newer version of this series
[PATCH v3 12/15] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector
Posted by Cristian Ciocaltea 8 months, 4 weeks ago
Initializing HDMI connector via drmm_connector_hdmi_init() requires its
->ycbcr_420_allowed flag to be adjusted according to the supported
formats passed as function argument, prior to the actual invocation.

In order to allow providing test coverage for YUV420 modes, ensure the
flag is properly setup.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
index 1e32694041277a541f0f8941d9c35e8ca9264599..6897515189a0649a267196b246944efc92ace336 100644
--- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
@@ -184,6 +184,8 @@ connector_hdmi_init_with_edid_funcs(struct kunit *test,
 	enc->possible_crtcs = drm_crtc_mask(priv->crtc);
 
 	conn = &priv->connector;
+	conn->ycbcr_420_allowed = !!(formats & BIT(HDMI_COLORSPACE_YUV420));
+
 	ret = drmm_connector_hdmi_init(drm, conn,
 				       "Vendor", "Product",
 				       &dummy_connector_funcs,

-- 
2.49.0
Re: [PATCH v3 12/15] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector
Posted by Maxime Ripard 8 months, 1 week ago
On Wed, 26 Mar 2025 12:20:01 +0200, Cristian Ciocaltea wrote:
> Initializing HDMI connector via drmm_connector_hdmi_init() requires its
> ->ycbcr_420_allowed flag to be adjusted according to the supported
> formats passed as function argument, prior to the actual invocation.
> 
> In order to allow providing test coverage for YUV420 modes, ensure the
> 
> [ ... ]

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime