summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStu Hsieh <stu.hsieh@mediatek.com>2018-08-09 04:15:45 +0200
committerCK Hu <ck.hu@mediatek.com>2018-08-27 05:24:36 +0200
commit1cbcb763ea5035e7ef01010ea68eb3b5143ad7cb (patch)
treeb31b61c3a8f14aa923f3c1656b8135b28c5f11d7 /drivers
parentdrm/mediatek: add function to get layer number for component (diff)
downloadlinux-1cbcb763ea5035e7ef01010ea68eb3b5143ad7cb.tar.xz
linux-1cbcb763ea5035e7ef01010ea68eb3b5143ad7cb.zip
drm/mediatek: add function to return OVL layer number
This patch add function to return OVL layer number For now, MT8173, MT2712, MT2701 OVL all has 4 layer. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_disp_ovl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index 0facd823c552..28d191192945 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -132,6 +132,11 @@ static void mtk_ovl_config(struct mtk_ddp_comp *comp, unsigned int w,
writel(0x0, comp->regs + DISP_REG_OVL_RST);
}
+static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp)
+{
+ return 4;
+}
+
static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx)
{
unsigned int reg;
@@ -226,6 +231,7 @@ static const struct mtk_ddp_comp_funcs mtk_disp_ovl_funcs = {
.stop = mtk_ovl_stop,
.enable_vblank = mtk_ovl_enable_vblank,
.disable_vblank = mtk_ovl_disable_vblank,
+ .layer_nr = mtk_ovl_layer_nr,
.layer_on = mtk_ovl_layer_on,
.layer_off = mtk_ovl_layer_off,
.layer_config = mtk_ovl_layer_config,