瀏覽代碼

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>
Tomi Valkeinen 15 年之前
父節點
當前提交
b63ac1e314
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      drivers/video/omap2/dss/dsi.c

+ 7 - 0
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",