summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJitao Shi <jitao.shi@mediatek.com>2019-09-19 14:58:00 +0800
committerCK Hu <ck.hu@mediatek.com>2019-10-07 12:29:37 +0800
commit89d0e3f8825822ca20f3af2d61e5e1e6df4c2476 (patch)
tree66648e933097afa6462d1b9bc84716d6f573b976
parentbb6bc2982a28d5d8e83c3bf0887949be1cc6bb5d (diff)
drm/mediatek: replace writeb() with mtk_dsi_mask()
The writeb() is unavailable in mt8173. Because the mt8173 dsi module doesn't support 8bit mode access. Signed-off-by: Jitao Shi <jitao.shi@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
-rw-r--r--drivers/gpu/drm/mediatek/mtk_dsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index f165ec52b66a..a7caf75fb971 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -962,7 +962,9 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const struct mipi_dsi_msg *msg)
}
for (i = 0; i < msg->tx_len; i++)
- writeb(tx_buf[i], dsi->regs + reg_cmdq_off + cmdq_off + i);
+ mtk_dsi_mask(dsi, (reg_cmdq_off + cmdq_off + i) & (~0x3U),
+ (0xffUL << (((i + cmdq_off) & 3U) * 8U)),
+ tx_buf[i] << (((i + cmdq_off) & 3U) * 8U));
mtk_dsi_mask(dsi, reg_cmdq_off, cmdq_mask, reg_val);
mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE, cmdq_size);