Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1493125 > unrolled thread

[PATCH 0/2] fix issue: vblank interrupts are never disabled

Started byBibby Hsieh <bibby.hsieh@mediatek.com>
First post2016-09-29 05:40 +0200
Last post2016-10-07 12:40 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] fix issue: vblank interrupts are never disabled  Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-09-29 05:40 +0200
    [PATCH 1/2] drm/mediatek: set vblank_disable_allowed to true Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-09-29 05:40 +0200
      Re: [PATCH 1/2] drm/mediatek: set vblank_disable_allowed to true CK Hu <ck.hu@mediatek.com> - 2016-09-29 07:40 +0200
    [PATCH 2/2] drm/mediatek: clear IRQ status before enable OVL interrupt Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-09-29 05:40 +0200
      Re: [PATCH 2/2] drm/mediatek: clear IRQ status before enable OVL  interrupt CK Hu <ck.hu@mediatek.com> - 2016-09-29 07:40 +0200
    Re: [PATCH 0/2] fix issue: vblank interrupts are never disabled Daniel Kurtz <djkurtz@chromium.org> - 2016-10-07 12:40 +0200

#1493125 — [PATCH 0/2] fix issue: vblank interrupts are never disabled

FromBibby Hsieh <bibby.hsieh@mediatek.com>
Date2016-09-29 05:40 +0200
Subject[PATCH 0/2] fix issue: vblank interrupts are never disabled
Message-ID<smAmt-7a6-1@gated-at.bofh.it>
Clean the interrupt status before enable interrupt
and set the vblank_disable_allowed to fix the issue.

Bibby Hsieh (2):
  drm/mediatek: set vblank_disable_allowed to true
  drm/mediatek: clear IRQ status before enable OVL interrupt

 drivers/gpu/drm/mediatek/mtk_disp_ovl.c |    1 +
 drivers/gpu/drm/mediatek/mtk_drm_drv.c  |    1 +
 2 files changed, 2 insertions(+)

-- 
1.7.9.5

[toc] | [next] | [standalone]


#1493126 — [PATCH 1/2] drm/mediatek: set vblank_disable_allowed to true

FromBibby Hsieh <bibby.hsieh@mediatek.com>
Date2016-09-29 05:40 +0200
Subject[PATCH 1/2] drm/mediatek: set vblank_disable_allowed to true
Message-ID<smAmt-7a6-3@gated-at.bofh.it>
In reply to#1493125
MTK DRM driver didn't set the vblank_disable_allowed to
true, it cause that the irq_handler is called every
16.6 ms (every vblank) when the display didn't be updated.

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_drm_drv.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index eebb7d8..941ec5f 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -200,6 +200,7 @@ static int mtk_drm_kms_init(struct drm_device *drm)
 	if (ret < 0)
 		goto err_component_unbind;
 
+	drm->vblank_disable_allowed = true;
 	drm_kms_helper_poll_init(drm);
 	drm_mode_config_reset(drm);
 
-- 
1.7.9.5

[toc] | [prev] | [next] | [standalone]


#1493142 — Re: [PATCH 1/2] drm/mediatek: set vblank_disable_allowed to true

FromCK Hu <ck.hu@mediatek.com>
Date2016-09-29 07:40 +0200
SubjectRe: [PATCH 1/2] drm/mediatek: set vblank_disable_allowed to true
Message-ID<smCeB-8kt-3@gated-at.bofh.it>
In reply to#1493126
Acked-by: CK Hu <ck.hu@mediatek.com>

On Thu, 2016-09-29 at 11:29 +0800, Bibby Hsieh wrote:
> MTK DRM driver didn't set the vblank_disable_allowed to
> true, it cause that the irq_handler is called every
> 16.6 ms (every vblank) when the display didn't be updated.
> 
> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index eebb7d8..941ec5f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -200,6 +200,7 @@ static int mtk_drm_kms_init(struct drm_device *drm)
>  	if (ret < 0)
>  		goto err_component_unbind;
>  
> +	drm->vblank_disable_allowed = true;
>  	drm_kms_helper_poll_init(drm);
>  	drm_mode_config_reset(drm);
>  

[toc] | [prev] | [next] | [standalone]


#1493128 — [PATCH 2/2] drm/mediatek: clear IRQ status before enable OVL interrupt

FromBibby Hsieh <bibby.hsieh@mediatek.com>
Date2016-09-29 05:40 +0200
Subject[PATCH 2/2] drm/mediatek: clear IRQ status before enable OVL interrupt
Message-ID<smAmt-7a6-7@gated-at.bofh.it>
In reply to#1493125
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>
---
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index 019b7ca..f75c5b5 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -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);
 }
 
-- 
1.7.9.5

[toc] | [prev] | [next] | [standalone]


#1493144 — Re: [PATCH 2/2] drm/mediatek: clear IRQ status before enable OVL interrupt

FromCK Hu <ck.hu@mediatek.com>
Date2016-09-29 07:40 +0200
SubjectRe: [PATCH 2/2] drm/mediatek: clear IRQ status before enable OVL interrupt
Message-ID<smCeB-8kt-5@gated-at.bofh.it>
In reply to#1493128
Acked-by: CK Hu <ck.hu@mediatek.com>

On Thu, 2016-09-29 at 11:29 +0800, Bibby Hsieh wrote:
> 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>
> ---
>  drivers/gpu/drm/mediatek/mtk_disp_ovl.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 019b7ca..f75c5b5 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -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);
>  }
>  

[toc] | [prev] | [next] | [standalone]


#1497118

FromDaniel Kurtz <djkurtz@chromium.org>
Date2016-10-07 12:40 +0200
Message-ID<spAJk-7vM-29@gated-at.bofh.it>
In reply to#1493125
On Thu, Sep 29, 2016 at 11:29 AM, Bibby Hsieh <bibby.hsieh@mediatek.com> wrote:
>
> Clean the interrupt status before enable interrupt
> and set the vblank_disable_allowed to fix the issue.

For the series:

Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>

>
> Bibby Hsieh (2):
>   drm/mediatek: set vblank_disable_allowed to true
>   drm/mediatek: clear IRQ status before enable OVL interrupt
>
>  drivers/gpu/drm/mediatek/mtk_disp_ovl.c |    1 +
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c  |    1 +
>  2 files changed, 2 insertions(+)
>
> --
> 1.7.9.5
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web