Re: [PATCH v9 54/61] drm/tests: connector: Add HDMI source-side scrambler coverage

[email protected] Thu, 23 Jul 2026 02:00:56 +0000
Newsgroups dev.linux.lists.linux-sunxi,org.freedesktop.lists.dri-devel
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Masked test failures in TMDS character rate validation tests.
--

--- Patch [54]: [PATCH v9 54/61] drm/tests: connector: Add HDMI source-side scrambler coverage ---
commit 51e9e33a81edd8b52502410a5e171c4a8d0bf3c5
Author: Cristian Ciocaltea <[email protected]>

drm/tests: connector: Add HDMI source-side scrambler coverage

This commit adds KUnit tests to validate the HDMI source-side scrambler checking
in drmm_connector_hdmi_init(). It verifies that scrambler callbacks are
correctly required for HDMI 2.0 and later, and rejected if provided for earlier
HDMI versions.

> diff --git a/drivers/gpu/drm/tests/drm_connector_test.c b/drivers/gpu/drm/tests/drm_connector_test.c
> index f14cd741b05e4..3d050ac5e5f6d 100644
> --- a/drivers/gpu/drm/tests/drm_connector_test.c
> +++ b/drivers/gpu/drm/tests/drm_connector_test.c
> @@ -1412,6 +1412,89 @@ static void drm_test_connector_hdmi_init_max_tmds_rate_no_version(struct kunit *
>  	KUNIT_EXPECT_LT(test, ret, 0);
>  }
>  

[Severity: Medium]
Will the scrambler validation tested by this patch mask the TMDS rate limit
tests located just above this hunk?

In drm_test_connector_hdmi_init_max_tmds_rate_exceeds() and
drm_test_connector_hdmi_init_max_tmds_rate_no_version(), the tests use
dummy_hdmi_funcs_scrambler but set supported_hdmi_ver to HDMI_VERSION_1_4 or
HDMI_VERSION_UNKNOWN:

	struct drm_connector_hdmi_funcs hdmi_funcs = dummy_hdmi_funcs_scrambler;
	...
	hdmi_funcs.supported_hdmi_ver = HDMI_VERSION_1_4;

Since drmm_connector_hdmi_init() rejects scrambler callbacks for HDMI
versions < 2.0 by returning -EINVAL early, will these TMDS rate tests now fail
during the scrambler check rather than actually validating the TMDS character
rate logic?

Should they be updated to use a dummy struct without scrambler callbacks to
ensure the max_tmds_char_rate limit is what actually causes the test to pass?

> +/*
> + * Test that the registration of an HDMI connector advertising source-side
> + * scrambling support succeeds when the .scrambler_{enable,disable} callbacks
> + * are provided.
> + */

[ ... ]

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=54