From: sashiko-bot@kernel.org
To: "Cristian Ciocaltea" <cristian.ciocaltea@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 21/25] drm/tests: hdmi: Add HDMI 2.0 scrambling helpers coverage
Date: Wed, 02 Dec 2026 02:33:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-244658@kernel.org> (raw)
In-Reply-To: <20261202-drm-conn-hdmi-cleanup-v2-21-ba7d32550ea4@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/tests: hdmi: failing SCDC_TMDS_CONFIG check when
scrambler_needed is false
--
commit a628c265c011ad6a5c25052a50c0b30e2343bcc3
Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
drm/tests: hdmi: Add HDMI 2.0 scrambling helpers coverage
This commit adds a fake DDC adapter modeling the SCDC register map and
introduces KUnit tests covering HDMI 2.0 scrambling helpers and SCDC
status monitoring work.
> 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 d32e79c553348..44204fcd4e169 100644
> --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
[ ... ]
> @@ -4098,13 +4212,593 @@ static struct kunit_suite drm_atomic_helper_connector_hdmi_infoframes_test_suite
[ ... ]
> +/*
> + * Test that enabling scrambling for a mode that doesn't need it leaves the
> + * source alone, but clears any stale scrambling setup on the sink side.
> + */
> +static void drm_test_hdmi_scrambling_enable_not_needed(struct kunit *test)
> +{
> + struct drm_atomic_helper_connector_hdmi_priv *priv;
> + struct drm_connector_state *conn_state;
> + struct drm_connector *conn;
> + int ret;
> +
> + priv = drm_kunit_helper_connector_hdmi_init_with_scdc(test,
> + &scdc_connector_hdmi_funcs,
> + test_edid_hdmi_4k_rgb_yuv420_dc_max_600mhz);
> + KUNIT_ASSERT_NOT_NULL(test, priv);
> +
> + conn = &priv->connector;
> + KUNIT_ASSERT_TRUE(test, conn->display_info.hdmi.scdc.scrambling.supported);
> +
> + conn_state = kunit_kzalloc(test, sizeof(*conn_state), GFP_KERNEL);
> + KUNIT_ASSERT_NOT_NULL(test, conn_state);
> +
> + conn_state->hdmi.scrambler_needed = false;
> +
> + priv->scdc_regs[SCDC_TMDS_CONFIG] = SCDC_TMDS_CONFIG_SCRAMBLED;
> +
> + ret = drm_connector_hdmi_enable_scrambling(conn, conn_state);
> + KUNIT_EXPECT_EQ(test, ret, 0);
> +
> + KUNIT_EXPECT_EQ(test, priv->scdc_regs[SCDC_TMDS_CONFIG], 0);
> + KUNIT_EXPECT_EQ(test, priv->scrambler_enable_count, 0);
> + KUNIT_EXPECT_FALSE(test, conn->hdmi.scrambler_enabled);
> + KUNIT_EXPECT_FALSE(test, conn->hdmi.scdc_work_initialized);
> +}
[Severity: Medium]
Does drm_test_hdmi_scrambling_enable_not_needed() fail on the
priv->scdc_regs[SCDC_TMDS_CONFIG] check?
drivers/gpu/drm/display/drm_hdmi_helper.c:drm_connector_hdmi_enable_scrambling() {
...
if (!conn_state->hdmi.scrambler_needed)
return 0;
...
}
When conn_state->hdmi.scrambler_needed is false,
drm_connector_hdmi_enable_scrambling() returns 0 immediately without
touching SCDC, so priv->scdc_regs[SCDC_TMDS_CONFIG] remains
SCDC_TMDS_CONFIG_SCRAMBLED and the KUnit expectation fails.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-drm-conn-hdmi-cleanup-v2-0-ba7d32550ea4@collabora.com?part=21
next prev parent reply other threads:[~2026-12-02 2:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 2:19 [PATCH v2 00/25] drm: HDMI connector API cleanup and HDMI 2.0 test coverage Cristian Ciocaltea
2026-12-02 2:19 ` [PATCH v2 01/25] video/hdmi: Copy SPD vendor/product with strtomem_pad() Cristian Ciocaltea
2026-12-02 2:19 ` [PATCH v2 02/25] video/hdmi: Define SPD InfoFrame vendor/product field lengths Cristian Ciocaltea
2026-12-02 2:19 ` [PATCH v2 03/25] drm/display: hdmi-state-helper: Drop drm_atomic_helper_connector_hdmi_force() Cristian Ciocaltea
2026-12-02 2:19 ` [PATCH v2 04/25] drm/display: hdmi-state-helper: Reject connectors lacking HDMI funcs Cristian Ciocaltea
2026-12-02 2:19 ` [PATCH v2 05/25] drm/tests: connector: Convert to drmm_connector_hdmi_init() Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 06/25] drm/tests: hdmi: " Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 07/25] drm/connector: Remove drmm_connector_hdmi_ini2() Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 08/25] drm/connector: Drop redundant hdmi vendor/product fields Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 09/25] drm/connector: Drop redundant hdmi supported_formats field Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 10/25] drm/connector: Drop redundant max_bpc field Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 11/25] drm/connector: Use the SPD InfoFrame field length defines Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 12/25] drm/connector: Fix comment in drmm_connector_hdmi_init() Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 13/25] drm/tests: edid: Fix conformity for 1080p+4K YUV420 200MHz EDID Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 14/25] drm/tests: edid: Fix conformity for 4K RGB/YUV 340MHz EDID Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 15/25] drm/tests: edid: Add 4K@60Hz EDID with 600MHz TMDS Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 16/25] drm/tests: connector: Add HDMI max_tmds_char_rate init coverage Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 17/25] drm/tests: connector: Add HDMI source-side scrambler coverage Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 18/25] drm/tests: hdmi: Cover mode validation against connector max_tmds_char_rate Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 19/25] drm/tests: hdmi: Verify scrambler_needed computation Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 20/25] drm/tests: hdmi: Add SPD InfoFrame vendor/product coverage Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 21/25] drm/tests: hdmi: Add HDMI 2.0 scrambling helpers coverage Cristian Ciocaltea
2026-12-02 2:33 ` sashiko-bot [this message]
2026-12-02 2:20 ` [PATCH v2 22/25] drm/tests: hdmi: Verify SCDC resync on hotplug Cristian Ciocaltea
2026-12-02 2:30 ` sashiko-bot
2026-12-02 2:20 ` [PATCH v2 23/25] drm/tests: bridge: Set supported HDMI version Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 24/25] drm/tests: bridge: Add HDMI 2.0 bridge connector coverage Cristian Ciocaltea
2026-12-02 2:20 ` [PATCH v2 25/25] drm/tests: probe-helper: Add .force_ctx() callback coverage Cristian Ciocaltea
2026-12-02 2:33 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-244658@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.