drm/mediatek: clear IRQ status before enable OVL interrupt
authorBibby Hsieh <bibby.hsieh@mediatek.com>
Thu, 29 Sep 2016 03:29:49 +0000 (11:29 +0800)
committerCK Hu <ck.hu@mediatek.com>
Wed, 19 Oct 2016 01:06:12 +0000 (09:06 +0800)
To make sure that the first vblank IRQ after enabling
vblank isn't too short or immediate, we have to clear
the IRQ status before enable OVL interrupt.

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Acked-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_disp_ovl.c

index 019b7ca392d7a49db0ffcb25ccb36f293f9d530e..f75c5b5a536c7a83cac6119a1d8a255792712172 100644 (file)
@@ -80,6 +80,7 @@ static void mtk_ovl_enable_vblank(struct mtk_ddp_comp *comp,
                                                 ddp_comp);
 
        priv->crtc = crtc;
+       writel(0x0, comp->regs + DISP_REG_OVL_INTSTA);
        writel_relaxed(OVL_FME_CPL_INT, comp->regs + DISP_REG_OVL_INTEN);
 }