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: Icenowy Zheng <[email protected]> --- drivers/gpu/drm/verisilicon/vs_drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/verisilicon/vs_drm.c b/drivers/gpu/drm/verisilicon/vs_drm.c index fd259d53f49f..3f93cd43c623 100644 --- a/drivers/gpu/drm/verisilicon/vs_drm.c +++ b/drivers/gpu/drm/verisilicon/vs_drm.c @@ -128,11 +128,13 @@ int vs_drm_initialize(struct vs_dc *dc, struct platform_device *pdev) vs_mode_config_init(drm); /* Enable connectors polling */ drm_kms_helper_poll_init(drm); - drm_mode_config_reset(drm); + ret = drm_mode_config_create_initial_state(drm); + if (ret) + goto err_fini_poll; ret = drm_dev_register(drm, 0); if (ret) goto err_fini_poll; -- 2.56.1
