Skip to content

Commit 4340ec4

Browse files
Icenowymripard
authored andcommitted
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: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-4-icenowy@aosc.io
1 parent 81fafb9 commit 4340ec4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,8 @@ static u32 sun6i_dsi_dcs_build_pkt_hdr(struct sun6i_dsi *dsi,
832832
u32 pkt = msg->type;
833833

834834
if (msg->type == MIPI_DSI_DCS_LONG_WRITE) {
835-
pkt |= ((msg->tx_len + 1) & 0xffff) << 8;
836-
pkt |= (((msg->tx_len + 1) >> 8) & 0xffff) << 16;
835+
pkt |= ((msg->tx_len) & 0xffff) << 8;
836+
pkt |= (((msg->tx_len) >> 8) & 0xffff) << 16;
837837
} else {
838838
pkt |= (((u8 *)msg->tx_buf)[0] << 8);
839839
if (msg->tx_len > 1)

0 commit comments

Comments
 (0)