diff options
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_host.c')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 956b22492c9a..649d20d29f92 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c | |||
@@ -1023,7 +1023,7 @@ static int dsi_short_read1_resp(u8 *buf, const struct mipi_dsi_msg *msg) | |||
1023 | *data = buf[1]; /* strip out dcs type */ | 1023 | *data = buf[1]; /* strip out dcs type */ |
1024 | return 1; | 1024 | return 1; |
1025 | } else { | 1025 | } else { |
1026 | pr_err("%s: read data does not match with rx_buf len %d\n", | 1026 | pr_err("%s: read data does not match with rx_buf len %zu\n", |
1027 | __func__, msg->rx_len); | 1027 | __func__, msg->rx_len); |
1028 | return -EINVAL; | 1028 | return -EINVAL; |
1029 | } | 1029 | } |
@@ -1040,7 +1040,7 @@ static int dsi_short_read2_resp(u8 *buf, const struct mipi_dsi_msg *msg) | |||
1040 | data[1] = buf[2]; | 1040 | data[1] = buf[2]; |
1041 | return 2; | 1041 | return 2; |
1042 | } else { | 1042 | } else { |
1043 | pr_err("%s: read data does not match with rx_buf len %d\n", | 1043 | pr_err("%s: read data does not match with rx_buf len %zu\n", |
1044 | __func__, msg->rx_len); | 1044 | __func__, msg->rx_len); |
1045 | return -EINVAL; | 1045 | return -EINVAL; |
1046 | } | 1046 | } |
@@ -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 |
@@ -1215,7 +1209,7 @@ static void dsi_err_worker(struct work_struct *work) | |||
1215 | container_of(work, struct msm_dsi_host, err_work); | 1209 | container_of(work, struct msm_dsi_host, err_work); |
1216 | u32 status = msm_host->err_work_state; | 1210 | u32 status = msm_host->err_work_state; |
1217 | 1211 | ||
1218 | pr_err("%s: status=%x\n", __func__, status); | 1212 | pr_err_ratelimited("%s: status=%x\n", __func__, status); |
1219 | if (status & DSI_ERR_STATE_MDP_FIFO_UNDERFLOW) | 1213 | if (status & DSI_ERR_STATE_MDP_FIFO_UNDERFLOW) |
1220 | dsi_sw_reset_restore(msm_host); | 1214 | dsi_sw_reset_restore(msm_host); |
1221 | 1215 | ||
@@ -1797,6 +1791,7 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, | |||
1797 | case MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT: | 1791 | case MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT: |
1798 | pr_err("%s: rx ACK_ERR_PACLAGE\n", __func__); | 1792 | pr_err("%s: rx ACK_ERR_PACLAGE\n", __func__); |
1799 | ret = 0; | 1793 | ret = 0; |
1794 | break; | ||
1800 | case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE: | 1795 | case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE: |
1801 | case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE: | 1796 | case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE: |
1802 | ret = dsi_short_read1_resp(buf, msg); | 1797 | ret = dsi_short_read1_resp(buf, msg); |