diff mbox series

[v1] drm/mediatek: add AAL output size configuration

Message ID 20210709055635.22296-1-jason-jh.lin@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v1] drm/mediatek: add AAL output size configuration | expand

Commit Message

Jason-JH Lin (林睿祥) July 9, 2021, 5:56 a.m. UTC
To avoid the output 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>
---
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

CK Hu (胡俊光) Aug. 10, 2021, 1:52 a.m. UTC | #1
Hi, Jason:

On Fri, 2021-07-09 at 13:56 +0800, jason-jh.lin wrote:
> To avoid the output 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>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 8 +++++++-
>  1 file changed, 7 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 75bc00e17fc4..fc608d05f040 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> @@ -34,6 +34,7 @@
>  
>  #define DISP_AAL_EN				0x0000
>  #define DISP_AAL_SIZE				0x0030
> +#define DISP_AAL_OUTPUT_SIZE			0x04d8
>  
>  #define DISP_DITHER_EN				0x0000
>  #define DITHER_EN				BIT(0)
> @@ -196,7 +197,12 @@ static void mtk_aal_config(struct device *dev, unsigned int w,
>  {
>  	struct mtk_ddp_comp_dev *priv = dev_get_drvdata(dev);
>  
> -	mtk_ddp_write(cmdq_pkt, w << 16 | h, &priv->cmdq_reg, priv->regs, DISP_AAL_SIZE);
> +	mtk_ddp_write(cmdq_pkt, w << 16 | h,
> +		      &priv->cmdq_reg, priv->regs,
> +				DISP_AAL_SIZE);

This modification break one line into multiple line. This is not related
to this patch.

> +	mtk_ddp_write(cmdq_pkt, w << 16 | h,
> +		      &priv->cmdq_reg, priv->regs,
> +				DISP_AAL_OUTPUT_SIZE);

One line.

Regards,
CK

>  }
>  
>  static void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
index 75bc00e17fc4..fc608d05f040 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -34,6 +34,7 @@ 
 
 #define DISP_AAL_EN				0x0000
 #define DISP_AAL_SIZE				0x0030
+#define DISP_AAL_OUTPUT_SIZE			0x04d8
 
 #define DISP_DITHER_EN				0x0000
 #define DITHER_EN				BIT(0)
@@ -196,7 +197,12 @@  static void mtk_aal_config(struct device *dev, unsigned int w,
 {
 	struct mtk_ddp_comp_dev *priv = dev_get_drvdata(dev);
 
-	mtk_ddp_write(cmdq_pkt, w << 16 | h, &priv->cmdq_reg, priv->regs, DISP_AAL_SIZE);
+	mtk_ddp_write(cmdq_pkt, w << 16 | h,
+		      &priv->cmdq_reg, priv->regs,
+				DISP_AAL_SIZE);
+	mtk_ddp_write(cmdq_pkt, w << 16 | h,
+		      &priv->cmdq_reg, priv->regs,
+				DISP_AAL_OUTPUT_SIZE);
 }
 
 static void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)