Skip to content
Snippets Groups Projects
Unverified Commit 4340ec45 authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Maxime Ripard
Browse files

drm/sun4i: sun6i_mipi_dsi: fix DCS long write packet length


The packet length of DCS long write packet should not be added with 1
when constructing long write packet.

Fix this.

Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.io>
Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-4-icenowy@aosc.io
parent 81fafb94
No related branches found
No related tags found
No related merge requests found
......@@ -832,8 +832,8 @@ static u32 sun6i_dsi_dcs_build_pkt_hdr(struct sun6i_dsi *dsi,
u32 pkt = msg->type;
if (msg->type == MIPI_DSI_DCS_LONG_WRITE) {
pkt |= ((msg->tx_len + 1) & 0xffff) << 8;
pkt |= (((msg->tx_len + 1) >> 8) & 0xffff) << 16;
pkt |= ((msg->tx_len) & 0xffff) << 8;
pkt |= (((msg->tx_len) >> 8) & 0xffff) << 16;
} else {
pkt |= (((u8 *)msg->tx_buf)[0] << 8);
if (msg->tx_len > 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment