Hi, Jitao:

On Thu, 2019-09-19 at 14:58 +0800, Jitao Shi wrote:
> The writeb() is unavailable in mt8173. Because the mt8173 dsi module
> doesn't support 8bit mode access.

Reviewed-by: CK Hu <ck...@mediatek.com>

> 
> Signed-off-by: Jitao Shi <jitao....@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dsi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c 
> b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 7e24d03cdccc..ac8e80e379f7 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -960,7 +960,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);


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to