Blob Blame History Raw
From 71ac6f390f6a3017f58d05d677b961bb1f851338 Mon Sep 17 00:00:00 2001
From: "jason-jh.lin" <jason-jh.lin@mediatek.com>
Date: Tue, 10 Aug 2021 10:55:03 +0800
Subject: drm/mediatek: Add AAL output size configuration
Git-commit: 71ac6f390f6a3017f58d05d677b961bb1f851338
Patch-mainline: v5.14-rc7
References: bsc#1129770

To avoid the output width and height is incorrect,
AAL_OUTPUT_SIZE configuration should be set.

Fixes: 0664d1392c26 ("drm/mediatek: Add AAL engine basic function")
Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -40,6 +40,7 @@
 
 #define DISP_AAL_EN				0x0000
 #define DISP_AAL_SIZE				0x0030
+#define DISP_AAL_OUTPUT_SIZE			0x04d8
 
 #define DISP_GAMMA_EN				0x0000
 #define DISP_GAMMA_CFG				0x0020
@@ -119,6 +120,7 @@ static void mtk_aal_config(struct mtk_dd
 			   unsigned int bpc)
 {
 	writel(w << 16 | w, comp->regs + DISP_AAL_SIZE);
+	writel(w << 16 | h, comp->regs + DISP_AAL_OUTPUT_SIZE);
 }
 
 static void mtk_aal_start(struct mtk_ddp_comp *comp)