mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 22:12:32 -04:00
drm/tests: hdmi: Switch to drm_atomic_get_new_connector_state() where possible
Replace the calls to drm_atomic_get_connector_state() with drm_atomic_get_new_connector_state() for cases which do not require allocating the connector state, e.g. after drm_atomic_check_only() when the intent is to only read the new connector state. The rational is to avoid the need to handle the potential EDEADLK error returned by the former helper, which would require restarting the entire atomic sequence. Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20250527-hdmi-conn-yuv-v5-13-74c9c4a8ac0c@collabora.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
committed by
Maxime Ripard
parent
8deb5bd348
commit
723d5a70d1
@@ -416,7 +416,7 @@ static void drm_test_check_broadcast_rgb_auto_cea_mode(struct kunit *test)
|
||||
ret = drm_atomic_check_only(state);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, conn);
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
|
||||
|
||||
KUNIT_EXPECT_TRUE(test, conn_state->hdmi.is_limited_range);
|
||||
@@ -476,7 +476,7 @@ static void drm_test_check_broadcast_rgb_auto_cea_mode_vic_1(struct kunit *test)
|
||||
ret = drm_atomic_check_only(state);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, conn);
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
|
||||
|
||||
KUNIT_EXPECT_FALSE(test, conn_state->hdmi.is_limited_range);
|
||||
@@ -535,7 +535,7 @@ static void drm_test_check_broadcast_rgb_full_cea_mode(struct kunit *test)
|
||||
ret = drm_atomic_check_only(state);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, conn);
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
|
||||
|
||||
KUNIT_ASSERT_EQ(test,
|
||||
@@ -597,7 +597,7 @@ static void drm_test_check_broadcast_rgb_full_cea_mode_vic_1(struct kunit *test)
|
||||
ret = drm_atomic_check_only(state);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, conn);
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
|
||||
|
||||
KUNIT_ASSERT_EQ(test,
|
||||
@@ -660,7 +660,7 @@ static void drm_test_check_broadcast_rgb_limited_cea_mode(struct kunit *test)
|
||||
ret = drm_atomic_check_only(state);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, conn);
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
|
||||
|
||||
KUNIT_ASSERT_EQ(test,
|
||||
@@ -722,7 +722,7 @@ static void drm_test_check_broadcast_rgb_limited_cea_mode_vic_1(struct kunit *te
|
||||
ret = drm_atomic_check_only(state);
|
||||
KUNIT_ASSERT_EQ(test, ret, 0);
|
||||
|
||||
conn_state = drm_atomic_get_connector_state(state, conn);
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
|
||||
|
||||
KUNIT_ASSERT_EQ(test,
|
||||
|
||||
Reference in New Issue
Block a user