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: AngeloGioacchino Del Regno <[email protected]> Cc: Chun-Kuang Hu <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Philipp Zabel <[email protected]> --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index dc8e3e917dd7..5ad1b080184d 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -580,8 +580,14 @@ static int mtk_drm_kms_init(struct drm_device *drm) 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; return 0; +err_fini_poll: + drm_kms_helper_poll_fini(drm); + err_component_unbind: for (i = 0; i < private->data->mmsys_dev_num; i++) -- 2.55.0
