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]>
---
Cc: Michal Simek <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
---
 drivers/gpu/drm/xlnx/zynqmp_kms.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c 
b/drivers/gpu/drm/xlnx/zynqmp_kms.c
index 5274bd3f9078..c123ded46f4c 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
@@ -525,6 +525,8 @@ int zynqmp_dpsub_drm_init(struct zynqmp_dpsub *dpsub)
        drm_kms_helper_poll_init(drm);
 
-       /* Reset all components and register the DRM device. */
-       drm_mode_config_reset(drm);
+       /* Create the initial state and register the DRM device. */
+       ret = drm_mode_config_create_initial_state(drm);
+       if (ret)
+               goto err_poll_fini;
 
        ret = drm_dev_register(drm, 0);

-- 
2.55.0

Reply via email to