Skip to contentSkip to conversation

drm/tests: hdmi: fix infoframes tests

PATCH Applied [email protected] 2 participants 2 messages Sep 14 – Sep 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tests: hdmi: fix infoframes tests

From: Mika Penttilä <[email protected]>

drm_atomic_commit() calls drm_atomic_check_only() internally. Calling drm_atomic_check_only() explicitly before the commit leaves the state marked as checked and triggers drm_WARN_ON(state->checked) when the commit checks the state again.

Remove the redundant explicit checks.

Fixes 7436a87db99d ("drm/tests: hdmi: check the infoframes behaviour")
Cc Maxime Ripard <[email protected]>
---
 .../drm/tests/drm_hdmi_state_helper_test.c    | 54 -------------------
 1 file changed, 54 deletions(-)
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c +0 -54
index 353a261d42da..f8ae1a0bd5c0 100644
@@ -2929,15 +2929,6 @@ static void drm_test_check_infoframes(struct kunit *test)
 
 	old_hdmi_update_failures = priv->hdmi_update_failures;
 
-	ret = drm_atomic_check_only(state);
-	if (ret == -EDEADLK) {
-		drm_atomic_commit_clear(state);
-		ret = drm_modeset_backoff(&ctx);
-		if (!ret)
-			goto retry_crtc_state;
-	}
-	KUNIT_ASSERT_EQ(test, ret, 0);
-
 	ret = drm_atomic_commit(state);
 	if (ret == -EDEADLK) {
 		drm_atomic_commit_clear(state);
@@ -3034,15 +3025,6 @@ static void drm_test_check_reject_avi_infoframe(struct kunit *test)
 
 	old_hdmi_update_failures = priv->hdmi_update_failures;
 
-	ret = drm_atomic_check_only(state);
-	if (ret == -EDEADLK) {
-		drm_atomic_commit_clear(state);
-		ret = drm_modeset_backoff(&ctx);
-		if (!ret)
-			goto retry_crtc_state;
-	}
-	KUNIT_ASSERT_EQ(test, ret, 0);
-
 	ret = drm_atomic_commit(state);
 	if (ret == -EDEADLK) {
 		drm_atomic_commit_clear(state);
@@ -3153,15 +3135,6 @@ static void drm_test_check_reject_hdr_infoframe_bpc_8(struct kunit *test)
 
 	old_hdmi_update_failures = priv->hdmi_update_failures;
 
-	ret = drm_atomic_check_only(state);
-	if (ret == -EDEADLK) {
-		drm_atomic_commit_clear(state);
-		ret = drm_modeset_backoff(&ctx);
-		if (!ret)
-			goto retry_conn_state;
-	}
-	KUNIT_ASSERT_EQ(test, ret, 0);
-
 	ret = drm_atomic_commit(state);
 	if (ret == -EDEADLK) {
 		drm_atomic_commit_clear(state);
@@ -3276,15 +3249,6 @@ static void drm_test_check_reject_hdr_infoframe_bpc_10(struct kunit *test)
 
 	old_hdmi_update_failures = priv->hdmi_update_failures;
 
-	ret = drm_atomic_check_only(state);
-	if (ret == -EDEADLK) {
-		drm_atomic_commit_clear(state);
-		ret = drm_modeset_backoff(&ctx);
-		if (!ret)
-			goto retry_conn_state;
-	}
-	KUNIT_ASSERT_EQ(test, ret, 0);
-
 	ret = drm_atomic_commit(state);
 	if (ret == -EDEADLK) {
 		drm_atomic_commit_clear(state);
@@ -3387,15 +3351,6 @@ static void drm_test_check_reject_audio_infoframe(struct kunit *test)
 
 	old_hdmi_update_failures = priv->hdmi_update_failures;
 
-	ret = drm_atomic_check_only(state);
-	if (ret == -EDEADLK) {
-		drm_atomic_commit_clear(state);
-		ret = drm_modeset_backoff(&ctx);
-		if (!ret)
-			goto retry_crtc_state;
-	}
-	KUNIT_ASSERT_EQ(test, ret, 0);
-
 	ret = drm_atomic_commit(state);
 	if (ret == -EDEADLK) {
 		drm_atomic_commit_clear(state);
@@ -3438,15 +3393,6 @@ static void drm_test_check_reject_audio_infoframe(struct kunit *test)
 
 	old_hdmi_update_failures = priv->hdmi_update_failures;
 
-	ret = drm_atomic_check_only(state);
-	if (ret == -EDEADLK) {
-		drm_atomic_commit_clear(state);
-		ret = drm_modeset_backoff(&ctx);
-		if (!ret)
-			goto retry_crtc_state_2;
-	}
-	KUNIT_ASSERT_EQ(test, ret, 0);
-
 	ret = drm_atomic_commit(state);
 	if (ret == -EDEADLK) {
 		drm_atomic_commit_clear(state);
Signature · 1 line
2.55.0
maintainer Applied
#1 lore raw
Quoted 8 lines · On Mon, 14 Sep 2026 07:07:23 +0300, [email protected] wrote:

drm_atomic_commit() calls drm_atomic_check_only() internally. Calling drm_atomic_check_only() explicitly before the commit leaves the state marked as checked and triggers drm_WARN_ON(state->checked) when the commit checks the state again.

Remove the redundant explicit checks.

[...]

Applied to misc/kernel.git (drm-misc-next)

[1/1] drm/tests: hdmi: fix infoframes tests

      commit: d5c34a384305e05a2d463dd2094e0ec449643bd4

Thanks!
Maxime