diff mbox series

[v1,07/21] drm/mediatek: enable OVL_LAYER_SMI_ID_EN for multi-layer usecase

Message ID 1597903458-8055-8-git-send-email-yongqiang.niu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series add drm support for MT8192 | expand

Commit Message

Yongqiang Niu Aug. 20, 2020, 6:04 a.m. UTC
enable OVL_LAYER_SMI_ID_EN for multi-layer usecase

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

Comments

Chun-Kuang Hu Aug. 20, 2020, 11:43 p.m. UTC | #1
HI, Yongqiang:

Yongqiang Niu <yongqiang.niu@mediatek.com> 於 2020年8月20日 週四 下午2:06寫道:
>
> enable OVL_LAYER_SMI_ID_EN for multi-layer usecase
>
> Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 8cf9f3b..427fe7f 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -23,6 +23,7 @@
>  #define DISP_REG_OVL_RST                       0x0014
>  #define DISP_REG_OVL_ROI_SIZE                  0x0020
>  #define DISP_REG_OVL_DATAPATH_CON              0x0024
> +#define OVL_LAYER_SMI_ID_EN                            BIT(0)
>  #define OVL_BGCLR_SEL_IN                               BIT(2)
>  #define DISP_REG_OVL_ROI_BGCLR                 0x0028
>  #define DISP_REG_OVL_SRC_CON                   0x002c
> @@ -116,6 +117,8 @@ static void mtk_ovl_disable_vblank(struct mtk_ddp_comp *comp)
>  static void mtk_ovl_start(struct mtk_ddp_comp *comp)
>  {
>         writel_relaxed(0x1, comp->regs + DISP_REG_OVL_EN);
> +       mtk_ddp_write_mask(NULL, OVL_LAYER_SMI_ID_EN, comp,

writel_relaxed instead of mtk_ddp_write_mask.

> +                          DISP_REG_OVL_DATAPATH_CON, OVL_LAYER_SMI_ID_EN);

If this only should set in mt8192, add a private data to distinguish this.

Regards,
Chun-Kuang.

>  }
>
>  static void mtk_ovl_stop(struct mtk_ddp_comp *comp)
> --
> 1.8.1.1.dirty
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
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 8cf9f3b..427fe7f 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -23,6 +23,7 @@ 
 #define DISP_REG_OVL_RST			0x0014
 #define DISP_REG_OVL_ROI_SIZE			0x0020
 #define DISP_REG_OVL_DATAPATH_CON		0x0024
+#define OVL_LAYER_SMI_ID_EN				BIT(0)
 #define OVL_BGCLR_SEL_IN				BIT(2)
 #define DISP_REG_OVL_ROI_BGCLR			0x0028
 #define DISP_REG_OVL_SRC_CON			0x002c
@@ -116,6 +117,8 @@  static void mtk_ovl_disable_vblank(struct mtk_ddp_comp *comp)
 static void mtk_ovl_start(struct mtk_ddp_comp *comp)
 {
 	writel_relaxed(0x1, comp->regs + DISP_REG_OVL_EN);
+	mtk_ddp_write_mask(NULL, OVL_LAYER_SMI_ID_EN, comp,
+			   DISP_REG_OVL_DATAPATH_CON, OVL_LAYER_SMI_ID_EN);
 }
 
 static void mtk_ovl_stop(struct mtk_ddp_comp *comp)