diff mbox series

[v1,1/1] drm/mediatek: fixup ovl vblank callback data null pointer issue

Message ID 20220314080808.29370-2-yongqiang.niu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/1] drm/mediatek: fixup ovl vblank callback data null pointer issue | expand

Commit Message

Yongqiang Niu March 14, 2022, 8:08 a.m. UTC
ovl vblank_cb_data will be null pointer when disable ovl
vblank

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Rex-BC Chen (陳柏辰) March 17, 2022, 12:46 p.m. UTC | #1
On Mon, 2022-03-14 at 16:08 +0800, Yongqiang Niu wrote:
> ovl vblank_cb_data will be null pointer when disable ovl
> vblank
> 

Hello Yongqiang,

What issue do you encounter?
Is it a timing issue?

> Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 2146299e5f52..f3a450c0ef2d 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -113,7 +113,6 @@ void mtk_ovl_disable_vblank(struct device *dev)
>  	struct mtk_disp_ovl *ovl = dev_get_drvdata(dev);
>  
>  	ovl->vblank_cb = NULL;
> -	ovl->vblank_cb_data = NULL;

IMO, this may be not a good solution.
If this is a timing issue and you don't need to handle irq after
disable vblank.
I think you should handle  ovl->vblank_cb_data == NULL in
mtk_disp_ovl_irq_handler?

If I am wrong, please correct me.

Thanks.

BRs,
Rex

>  	writel_relaxed(0x0, ovl->regs + DISP_REG_OVL_INTEN);
>  }
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index 2146299e5f52..f3a450c0ef2d 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -113,7 +113,6 @@  void mtk_ovl_disable_vblank(struct device *dev)
 	struct mtk_disp_ovl *ovl = dev_get_drvdata(dev);
 
 	ovl->vblank_cb = NULL;
-	ovl->vblank_cb_data = NULL;
 	writel_relaxed(0x0, ovl->regs + DISP_REG_OVL_INTEN);
 }