diff options
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 47a7f0036478..649d20d29f92 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c | |||
@@ -1093,7 +1093,6 @@ static int dsi_cmd_dma_rx(struct msm_dsi_host *msm_host, | |||
1093 | { | 1093 | { |
1094 | u32 *lp, *temp, data; | 1094 | u32 *lp, *temp, data; |
1095 | int i, j = 0, cnt; | 1095 | int i, j = 0, cnt; |
1096 | bool ack_error = false; | ||
1097 | u32 read_cnt; | 1096 | u32 read_cnt; |
1098 | u8 reg[16]; | 1097 | u8 reg[16]; |
1099 | int repeated_bytes = 0; | 1098 | int repeated_bytes = 0; |
@@ -1105,15 +1104,10 @@ static int dsi_cmd_dma_rx(struct msm_dsi_host *msm_host, | |||
1105 | if (cnt > 4) | 1104 | if (cnt > 4) |
1106 | cnt = 4; /* 4 x 32 bits registers only */ | 1105 | cnt = 4; /* 4 x 32 bits registers only */ |
1107 | 1106 | ||
1108 | /* Calculate real read data count */ | 1107 | if (rx_byte == 4) |
1109 | read_cnt = dsi_read(msm_host, 0x1d4) >> 16; | 1108 | read_cnt = 4; |
1110 | 1109 | else | |
1111 | ack_error = (rx_byte == 4) ? | 1110 | read_cnt = pkt_size + 6; |
1112 | (read_cnt == 8) : /* short pkt + 4-byte error pkt */ | ||
1113 | (read_cnt == (pkt_size + 6 + 4)); /* long pkt+4-byte error pkt*/ | ||
1114 | |||
1115 | if (ack_error) | ||
1116 | read_cnt -= 4; /* Remove 4 byte error pkt */ | ||
1117 | 1111 | ||
1118 | /* | 1112 | /* |
1119 | * In case of multiple reads from the panel, after the first read, there | 1113 | * In case of multiple reads from the panel, after the first read, there |