MLK-17032-2: drm: imx: dcss: fix runtime suspend/resume
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Wed, 29 Nov 2017 11:27:23 +0000 (13:27 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
If the DCSS core is runtime suspended, but the display-subsystem is not,
we need to resume the DCSS core before setting up DTG and SUBSAM
modules.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-crtc.c

index 910e678..7cc1769 100644 (file)
@@ -128,9 +128,14 @@ static void dcss_crtc_mode_set_nofb(struct drm_crtc *crtc)
 
        drm_display_mode_to_videomode(mode, &vm);
 
+       pm_runtime_get_sync(dcss_crtc->dev->parent);
+
        dcss_dtg_sync_set(dcss, &vm);
        dcss_ss_sync_set(dcss, &vm, mode->flags & DRM_MODE_FLAG_PHSYNC,
                         mode->flags & DRM_MODE_FLAG_PVSYNC);
+
+       pm_runtime_mark_last_busy(dcss_crtc->dev->parent);
+       pm_runtime_put_autosuspend(dcss_crtc->dev->parent);
 }
 
 static int dcss_crtc_atomic_check(struct drm_crtc *crtc,