Skip to content

Commit

Permalink
drm/mediatek: Add AAL output size configuration
Browse files Browse the repository at this point in the history
[ Upstream commit 71ac6f3 ]

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

Fixes: 0664d13 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jason-jh.lin authored and Sasha Levin committed Aug 26, 2021
1 parent 88e3511 commit e5f25a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
Expand Up @@ -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)
Expand Down Expand Up @@ -197,6 +198,7 @@ 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_OUTPUT_SIZE);
}

static void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)
Expand Down

0 comments on commit e5f25a6

Please sign in to comment.