summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPadmanabhan Komanduru <pkomandu@codeaurora.org>2014-06-05 14:36:40 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:30:32 -0700
commit729caedfac9f4a8ec3efe314520e3c605020c717 (patch)
tree312db58d7beb21a9960583f92f16025d8b164519
parent6f75e5ed632f559c8913cc189cf9d07b0457741d (diff)
msm: mdss: enable MRPS command for short read commands
Currently, we specify the size of payload that the panel needs to send back via the MRPS command only for DCS/Generic long read commands. Enable the MRPS command to be sent for short commands also based on the return length of the payload expected. Change-Id: I634a8e5d12a8ea8d0a8118f360aef27610b21c9c Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_host.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c
index 535af18bb194..b2a1fd44bf3f 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_host.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_host.c
@@ -960,6 +960,7 @@ int mdss_dsi_cmds_rx(struct mdss_dsi_ctrl_pdata *ctrl,
if (rlen <= 2) {
short_response = 1;
+ pkt_size = rlen;
rx_byte = 4;
} else {
short_response = 0;
@@ -983,31 +984,29 @@ int mdss_dsi_cmds_rx(struct mdss_dsi_ctrl_pdata *ctrl,
while (!end) {
pr_debug("%s: rlen=%d pkt_size=%d rx_byte=%d\n",
__func__, rlen, pkt_size, rx_byte);
- if (!short_response) {
- max_pktsize[0] = pkt_size;
- mdss_dsi_buf_init(tp);
- ret = mdss_dsi_cmd_dma_add(tp, &pkt_size_cmd);
- if (!ret) {
- pr_err("%s: failed to add max_pkt_size\n",
- __func__);
- rp->len = 0;
- goto end;
- }
+ max_pktsize[0] = pkt_size;
+ mdss_dsi_buf_init(tp);
+ ret = mdss_dsi_cmd_dma_add(tp, &pkt_size_cmd);
+ if (!ret) {
+ pr_err("%s: failed to add max_pkt_size\n",
+ __func__);
+ rp->len = 0;
+ goto end;
+ }
- mdss_dsi_wait4video_eng_busy(ctrl);
+ mdss_dsi_wait4video_eng_busy(ctrl);
- mdss_dsi_enable_irq(ctrl, DSI_CMD_TERM);
- ret = mdss_dsi_cmd_dma_tx(ctrl, tp);
- if (IS_ERR_VALUE(ret)) {
- mdss_dsi_disable_irq(ctrl, DSI_CMD_TERM);
- pr_err("%s: failed to tx max_pkt_size\n",
- __func__);
- rp->len = 0;
- goto end;
- }
- pr_debug("%s: max_pkt_size=%d sent\n",
- __func__, pkt_size);
+ mdss_dsi_enable_irq(ctrl, DSI_CMD_TERM);
+ ret = mdss_dsi_cmd_dma_tx(ctrl, tp);
+ if (IS_ERR_VALUE(ret)) {
+ mdss_dsi_disable_irq(ctrl, DSI_CMD_TERM);
+ pr_err("%s: failed to tx max_pkt_size\n",
+ __func__);
+ rp->len = 0;
+ goto end;
}
+ pr_debug("%s: max_pkt_size=%d sent\n",
+ __func__, pkt_size);
mdss_dsi_buf_init(tp);
ret = mdss_dsi_cmd_dma_add(tp, cmds);