disp: msm: sde: turn off/on vblank callbacks as per crtc

Current sde driver allows vblank enable and wait requests
even after crtc is disabled which would eventually lead to
enable of irq and timeouts in caller context. This change fixes
it by updating vblank callback status as 'on' during crtc enable
and shutdowns vblank callbacks before crtc disable is complete.

Change-Id: I52b74f685107f4dc8c83305c28f23cdcb4747730
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
This commit is contained in:
Lakshmi Narayana Kalavala
2019-04-26 17:03:21 -07:00
parent 5af1fe1891
commit 9e17babe6a
2 changed files with 8 additions and 0 deletions

View File

@@ -3978,6 +3978,8 @@ static void sde_crtc_disable(struct drm_crtc *crtc)
SDE_DEBUG("crtc%d\n", crtc->base.id);
drm_crtc_vblank_off(crtc);
if (sde_kms_is_suspend_state(crtc->dev))
_sde_crtc_set_suspend(crtc, true);
@@ -4116,6 +4118,8 @@ static void sde_crtc_enable(struct drm_crtc *crtc,
SDE_EVT32_VERBOSE(DRMID(crtc));
sde_crtc = to_sde_crtc(crtc);
drm_crtc_vblank_on(crtc);
mutex_lock(&sde_crtc->crtc_lock);
SDE_EVT32(DRMID(crtc), sde_crtc->enabled, sde_crtc->suspend,
sde_crtc->vblank_requested);