Skip to content

Commit

Permalink
drm/mediatek: dsi: Use symbolized register definition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jitao Shi authored and Chun-Kuang Hu committed Mar 11, 2021
1 parent be7507b commit c87d1c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/gpu/drm/mediatek/mtk_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c87d1c4

Please sign in to comment.