summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-04-09 13:20:57 +0300
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-08-03 15:18:47 +0300
commitb63ac1e31422077bed8257a519c6668f8868ed2b (patch)
treeb61b3fb7f248da4bce2a105f4dc76a3760d189ca /drivers/video
parent0c244f770f7fdb3e6779b3433aac9cfb6deb3255 (diff)
OMAP: DSS2: DSI: handle error in synchronous write
Check if the peripheral answered something, and if so, dump the data and return an error. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dsi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 767f6fb2bdf..5b621767455 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2089,6 +2089,13 @@ int dsi_vc_dcs_write(int channel, u8 *data, int len)
if (r)
goto err;
+ if (REG_GET(DSI_VC_CTRL(channel), 20, 20)) { /* RX_FIFO_NOT_EMPTY */
+ DSSERR("rx fifo not empty after write, dumping data:\n");
+ dsi_vc_flush_receive_data(channel);
+ r = -EIO;
+ goto err;
+ }
+
return 0;
err:
DSSERR("dsi_vc_dcs_write(ch %d, cmd 0x%02x, len %d) failed\n",