From: Sean Paul Date: Tue, 9 Oct 2012 19:39:15 +0000 (-0400) Subject: drm/exynos: Complete irq when waiting for vsync X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=639f68fbfb4f79e0014443fe9a96fe9c2dbfb7a4;p=cascardo%2Flinux.git drm/exynos: Complete irq when waiting for vsync Don't exit the vsync irq handler early when waiting for vsync. Just because we intend on disabling a window, we still need to update drm on our vsync. BUG=None TEST=Tested on snow, didn't note any regressions Change-Id: If836cee52c9231ea8112aabdb7518b26789bba70 Signed-off-by: Sean Paul Reviewed-on: https://gerrit.chromium.org/gerrit/35037 Reviewed-by: Stéphane Marchesin --- diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index cd061dc45f7a..ea3eb847069d 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -848,21 +848,6 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg) /* handling VSYNC */ if (val & MXR_INT_STATUS_VSYNC) { - - if (mctx->event_flags & MXR_EVENT_VSYNC) { - DRM_DEBUG_KMS("mctx->event_flags & MXR_EVENT_VSYNC"); - - - mixer_reg_write(res, MXR_GRAPHIC_WH(1), 0); - mixer_reg_write(res, MXR_GRAPHIC_SPAN(1), 0); - mixer_reg_write(res, MXR_GRAPHIC_SXY(1), 0); - mixer_reg_write(res, MXR_GRAPHIC_DXY(1), 0); - - mctx->event_flags &= ~MXR_EVENT_VSYNC; - wake_up(&mctx->mixer_res.event_queue); - goto out; - } - /* interlace scan need to check shadow register */ if (mctx->interlace) { base = mixer_reg_read(res, MXR_GRAPHIC_BASE(0)); @@ -884,8 +869,16 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg) for (i = 0; i < MIXER_WIN_NR; i++) mctx->win_data[i].updated = false; + exynos_drm_crtc_finish_pageflip(drm_hdmi_ctx->drm_dev, mctx->pipe); + + if (mctx->event_flags & MXR_EVENT_VSYNC) { + DRM_DEBUG_KMS("mctx->event_flags & MXR_EVENT_VSYNC"); + + mctx->event_flags &= ~MXR_EVENT_VSYNC; + wake_up(&mctx->mixer_res.event_queue); + } } out: