From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C450B606A31A for ; Wed, 2 Dec 2026 02:33:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MpKk5ICO Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 391D110EAB8; Wed, 2 Dec 2026 02:33:51 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2153C10EAB8 for ; Wed, 2 Dec 2026 02:33:45 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id E7E8240547; Wed, 2 Dec 2026 02:33:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B95FE1F00893; Wed, 2 Dec 2026 02:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796178824; bh=Ff++X1eonTJL4t8jJv2z0m5T175XS2LndCMCZp1tn/I=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=MpKk5ICOrSseMZrtx6hLV3MeUVSZvJphxPPM+GmLRvbbK5tmWwf3HyiiIq3GK7EHu 91w4dPFFNC0cVIZfDtbGwHM6NWy/sETgROTEAKw5YnuIfvg7IobRmphXq1GKhK9y+G 2nB+yZ1wAVv28q2WqO+u9UYeED6/PpVIV0IOh6jRE1Xsxj+MkvvYSrk2SRrAy2Ngmz +a55eu1h8RyHoOSx0iJkJOZwgz86seB0GkpWtydGwOEWIy30ONtiXfh2ws4U4OqycO uXg3v12C2yf7hnOGWBktNm5/sk+xx9w4iqN0ZMHkTcu8b574p8WAc1QPnWDYgByw2G 6A6/lfq2wAO+Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 21/25] drm/tests: hdmi: Add HDMI 2.0 scrambling helpers coverage To: "Cristian Ciocaltea" Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261202-drm-conn-hdmi-cleanup-v2-21-ba7d32550ea4@collabora.com> References: <20261202-drm-conn-hdmi-cleanup-v2-0-ba7d32550ea4@collabora.com> <20261202-drm-conn-hdmi-cleanup-v2-21-ba7d32550ea4@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 02:33:44 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 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_conn= ector_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 *tes= t) > +{ > + struct drm_atomic_helper_connector_hdmi_priv *priv; > + struct drm_connector_state *conn_state; > + struct drm_connector *conn; > + int ret; > + > + priv =3D 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 =3D &priv->connector; > + KUNIT_ASSERT_TRUE(test, conn->display_info.hdmi.scdc.scrambling.support= ed); > + > + conn_state =3D kunit_kzalloc(test, sizeof(*conn_state), GFP_KERNEL); > + KUNIT_ASSERT_NOT_NULL(test, conn_state); > + > + conn_state->hdmi.scrambler_needed =3D false; > + > + priv->scdc_regs[SCDC_TMDS_CONFIG] =3D SCDC_TMDS_CONFIG_SCRAMBLED; > + > + ret =3D 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_scrambl= ing() { ... 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. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202-drm-conn-h= dmi-cleanup-v2-0-ba7d32550ea4@collabora.com?part=3D21