drm/mediatek: Enable dither function
Enable dither function to improve the display quality. Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
This commit is contained in:
parent
d41ff4dcf0
commit
49629304b9
@ -53,6 +53,7 @@
|
||||
#define DITHER_EN BIT(0)
|
||||
#define DISP_DITHER_CFG 0x0020
|
||||
#define DITHER_RELAY_MODE BIT(0)
|
||||
#define DITHER_ENGINE_EN BIT(1)
|
||||
#define DISP_DITHER_SIZE 0x0030
|
||||
|
||||
#define LUT_10BIT_MASK 0x03ff
|
||||
@ -317,6 +318,8 @@ static void mtk_dither_config(struct device *dev, unsigned int w,
|
||||
|
||||
mtk_ddp_write(cmdq_pkt, h << 16 | w, &priv->cmdq_reg, priv->regs, DISP_DITHER_SIZE);
|
||||
mtk_ddp_write(cmdq_pkt, DITHER_RELAY_MODE, &priv->cmdq_reg, priv->regs, DISP_DITHER_CFG);
|
||||
mtk_dither_set_common(priv->regs, &priv->cmdq_reg, bpc, DISP_DITHER_CFG,
|
||||
DITHER_ENGINE_EN, cmdq_pkt);
|
||||
}
|
||||
|
||||
static void mtk_dither_start(struct device *dev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user