add aal bypass shadow register function Signed-off-by: Yongqiang Niu <yongqiang.niu@xxxxxxxxxxxx> --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c index 315bd3a..b4a6df5 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c @@ -38,7 +38,8 @@ #define AAL_RELAY_MODE BIT(0) #define AAL_ENGINE_EN BIT(1) #define DISP_AAL_SIZE 0x0030 - +#define DISP_AAL_SHADOW_CTRL 0x00f0 +#define AAL_BYPASS_SHADOW BIT(0) #define DISP_AAL_OUTPUT_SIZE 0x04d8 #define DISP_CCORR_EN 0x0000 @@ -207,6 +208,13 @@ static void mtk_aal_stop(struct mtk_ddp_comp *comp) writel_relaxed(0x0, comp->regs + DISP_AAL_EN); } +static void mtk_aal_bypass_shadow(struct mtk_ddp_comp *comp) +{ + mtk_ddp_write_mask(NULL, AAL_BYPASS_SHADOW, comp, + DISP_AAL_SHADOW_CTRL, + AAL_BYPASS_SHADOW); +} + static void mtk_ccorr_config(struct mtk_ddp_comp *comp, unsigned int w, unsigned int h, unsigned int vrefresh, unsigned int bpc, struct cmdq_pkt *cmdq_pkt) @@ -365,6 +373,7 @@ static void mtk_postmask_stop(struct mtk_ddp_comp *comp) .config = mtk_aal_config, .start = mtk_aal_start, .stop = mtk_aal_stop, + .bypass_shadow = mtk_aal_bypass_shadow, }; static const struct mtk_ddp_comp_funcs ddp_ccorr = { -- 1.8.1.1.dirty