From: Cristian Ciocaltea Date: Tue, 27 May 2025 12:11:20 +0000 (+0300) Subject: drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8deb5bd34858b0ac165d6a56e65a64bc5367e361;p=thirdparty%2Flinux.git drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector 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. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20250527-hdmi-conn-yuv-v5-12-74c9c4a8ac0c@collabora.com Signed-off-by: Maxime Ripard --- 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 64037110bcaa9..e3e2878d29ea5 100644 --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c @@ -183,6 +183,8 @@ __connector_hdmi_init(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,