[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1597903458-8055-21-git-send-email-yongqiang.niu@mediatek.com>
Date: Thu, 20 Aug 2020 14:04:17 +0800
From: Yongqiang Niu <yongqiang.niu@...iatek.com>
To: CK Hu <ck.hu@...iatek.com>, Philipp Zabel <p.zabel@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>
CC: David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
Mark Rutland <mark.rutland@....com>,
<dri-devel@...ts.freedesktop.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
Yongqiang Niu <yongqiang.niu@...iatek.com>
Subject: [PATCH v1 20/21] drm/mediatek: add ccorr bypass shadow register function
add ccorr bypass shadow register function
Signed-off-by: Yongqiang Niu <yongqiang.niu@...iatek.com>
---
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
index b4a6df5..ff23a94 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -55,6 +55,8 @@
#define DISP_CCORR_COEF_2 0x0088
#define DISP_CCORR_COEF_3 0x008C
#define DISP_CCORR_COEF_4 0x0090
+#define DISP_CCORR_SHADOW 0x00A0
+#define CCORR_BYPASS_SHADOW BIT(2)
#define DISP_DITHER_EN 0x0000
#define DITHER_EN BIT(0)
@@ -284,6 +286,13 @@ static void mtk_ccorr_ctm_set(struct mtk_ddp_comp *comp,
comp, DISP_CCORR_COEF_4);
}
+static void mtk_ccorr_bypass_shadow(struct mtk_ddp_comp *comp)
+{
+ mtk_ddp_write_mask(NULL, CCORR_BYPASS_SHADOW, comp,
+ DISP_CCORR_SHADOW,
+ CCORR_BYPASS_SHADOW);
+}
+
static void mtk_dither_config(struct mtk_ddp_comp *comp, unsigned int w,
unsigned int h, unsigned int vrefresh,
unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
@@ -381,6 +390,7 @@ static void mtk_postmask_stop(struct mtk_ddp_comp *comp)
.start = mtk_ccorr_start,
.stop = mtk_ccorr_stop,
.ctm_set = mtk_ccorr_ctm_set,
+ .bypass_shadow = mtk_ccorr_bypass_shadow
};
static const struct mtk_ddp_comp_funcs ddp_dither = {
--
1.8.1.1.dirty
Powered by blists - more mailing lists