drm_mode_config_reset() has a dual role: it creates the initial KMS
state at probe time, and resets hardware and software state during
suspend/resume cycles.

Since the two roles need different behaviors (notably for objects like
drm_private_obj that must persist across suspend/resume),
drm_mode_config_create_initial_state() was introduced to handle only
the initial state creation at probe time.

Switch to drm_mode_config_create_initial_state().

Signed-off-by: Maxime Ripard <[email protected]>
---
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 336bb644cb7c..35c551b4a35d 100644
--- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
@@ -295,11 +295,12 @@ __connector_hdmi_init(struct kunit *test,
        KUNIT_ASSERT_EQ(test, ret, 0);
 
        drm_connector_helper_add(conn, &dummy_connector_helper_funcs);
        drm_connector_attach_encoder(conn, enc);
 
-       drm_mode_config_reset(drm);
+       ret = drm_mode_config_create_initial_state(drm);
+       KUNIT_ASSERT_EQ(test, ret, 0);
 
        if (edid_data && edid_len) {
                ret = set_connector_edid(test, &priv->connector, edid_data, 
edid_len);
                KUNIT_ASSERT_GT(test, ret, 0);
        }

-- 
2.56.1

Reply via email to