Skip to content

Commit

Permalink
drm/sun4i: sun6i_mipi_dsi: fix DCS long write packet length
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Icenowy Zheng authored and Maxime Ripard committed Oct 7, 2019
1 parent 81fafb9 commit 4340ec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4340ec4

Please sign in to comment.