All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Alex Deucher <alexdeucher@gmail.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Alex Hung <alex.hung@amd.com>, Maxime Ripard <mripard@kernel.org>,
	amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-next@vger.kernel.org
Subject: [PATCH linux-next] drm/amd/display: give the dprx CRC test its connector state back
Date: Wed, 11 Nov 2026 11:14:27 -0500	[thread overview]
Message-ID: <20261111161427.3274232-1-sashal@kernel.org> (raw)
In-Reply-To: <avNxxfHK_Zh2GN2o@sirena.org.uk>

The merge fixup in commit c62c2736d82f ("amdgpu: Merge merge merge
cherry-pick cherry-pick cherry-pick") dropped the call to
drm_atomic_helper_connector_reset(), which drm-misc removed. But that
call is what gave the test's connector a state, so the assert right
after it always fails now.

Create the state with drm_atomic_helper_connector_create_state()
instead, and check it before storing it: cleanup would choke on an
error pointer in connector->state.

Fixes: af8e519642bd ("Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux.git")
Link: https://lore.kernel.org/all/avNxxfHK_Zh2GN2o@sirena.org.uk/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
The amdgpu_dm_crc KUnit suite goes from 34/35 to 35/35 with this.

 .../gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crc_test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crc_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crc_test.c
index 2b94d1bcaf62c..32b33d72dd0f3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crc_test.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crc_test.c
@@ -694,6 +694,7 @@ static void dm_test_crtc_set_crc_source_dprx_connector(struct kunit *test)
 	struct amdgpu_device *adev = dm_kunit_alloc_adev(test);
 	struct amdgpu_crtc *acrtc = dm_test_alloc_crc_crtc(test, adev);
 	struct amdgpu_dm_connector *aconn;
+	struct drm_connector_state *state;
 	int ret;
 
 	aconn = kunit_kzalloc(test, sizeof(*aconn), GFP_KERNEL);
@@ -704,7 +705,9 @@ static void dm_test_crtc_set_crc_source_dprx_connector(struct kunit *test)
 	KUNIT_ASSERT_EQ(test, ret, 0);
 	ret = kunit_add_action_or_reset(test, dm_test_crc_connector_cleanup, &aconn->base);
 	KUNIT_ASSERT_EQ(test, ret, 0);
-	KUNIT_ASSERT_NOT_NULL(test, aconn->base.state);
+	state = drm_atomic_helper_connector_create_state(&aconn->base);
+	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, state);
+	aconn->base.state = state;
 	aconn->base.state->crtc = &acrtc->base;
 	/* Balance the reference the state destroy drops for a set CRTC. */
 	drm_connector_get(&aconn->base);

base-commit: 793807ca13bf3072fc6d16ce6d90e9ab9beff2a5
-- 
2.53.0


  parent reply	other threads:[~2026-11-11 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 19:34 linux-next: manual merge of the amdgpu tree with the origin tree Mark Brown
2026-11-11  2:40 ` [PATCH linux-next] drm/amd/pm: bring back od_uclk_changed dropped by the amdgpu merge Sasha Levin
2026-11-11 16:14 ` Sasha Levin [this message]
2026-11-11 16:41   ` [PATCH linux-next] drm/amd/display: give the dprx CRC test its connector state back Mark Brown

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=20261111161427.3274232-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mripard@kernel.org \
    /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.