diff options
author | Jitao Shi <jitao.shi@mediatek.com> | 2021-02-01 11:36:02 +0800 |
---|---|---|
committer | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2021-03-11 19:57:14 +0800 |
commit | c87d1c4b5b9a86454d928e68d6f1a437a95ed41c (patch) | |
tree | dc79d44818d2bd735823578570ddb90d6090298a | |
parent | be7507bdd705bd28c8e6091e1717b4a53dbd7b8c (diff) | |
download | lwn-c87d1c4b5b9a86454d928e68d6f1a437a95ed41c.tar.gz lwn-c87d1c4b5b9a86454d928e68d6f1a437a95ed41c.zip |
drm/mediatek: dsi: Use symbolized register definition
For HSTX_CKLP_EN and DIS_EOT, use symbolized register
definition instead of magic number.
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dsi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index a1ff152ef468..b91d7c3dd9ac 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -401,8 +401,11 @@ static void mtk_dsi_rxtx_control(struct mtk_dsi *dsi) break; } - tmp_reg |= (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6; - tmp_reg |= (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3; + if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) + tmp_reg |= HSTX_CKLP_EN; + + if (!(dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET)) + tmp_reg |= DIS_EOT; writel(tmp_reg, dsi->regs + DSI_TXRX_CTRL); } |