summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2010-10-08 15:15:25 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-03-15 09:54:19 +0100
commit773b30b22f8c5ac4ccc52775c17809cc5826cb86 (patch)
treeab2fec0596f6abb7b99d68b1ee340aabb9d19818
parentOMAP: DSS2: DSI: use ISR for BTA in framedone (diff)
downloadlinux-773b30b22f8c5ac4ccc52775c17809cc5826cb86.tar.xz
linux-773b30b22f8c5ac4ccc52775c17809cc5826cb86.zip
OMAP: DSS2: DSI: catch DSI errors in send_bta_sync
dsi_vc_send_bta_sync() waits for BTA interrupt with a 500ms timeout. If a DSI error happens, no BTA is received and the timeout triggers. This could be handled much faster by listening to DSI errors also. This patch uses the ISR support to notice DSI errors while waiting for the BTA, thus speeding up the fail-path considerably. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/dsi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index cd872e9d7989..37226628bc0f 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2242,24 +2242,31 @@ int dsi_vc_send_bta_sync(int channel)
if (r)
goto err0;
- r = dsi_vc_send_bta(channel);
+ r = dsi_register_isr(dsi_completion_handler, &completion,
+ DSI_IRQ_ERROR_MASK);
if (r)
goto err1;
+ r = dsi_vc_send_bta(channel);
+ if (r)
+ goto err2;
+
if (wait_for_completion_timeout(&completion,
msecs_to_jiffies(500)) == 0) {
DSSERR("Failed to receive BTA\n");
r = -EIO;
- goto err1;
+ goto err2;
}
err = dsi_get_errors();
if (err) {
DSSERR("Error while sending BTA: %x\n", err);
r = -EIO;
- goto err1;
+ goto err2;
}
-
+err2:
+ dsi_unregister_isr(dsi_completion_handler, &completion,
+ DSI_IRQ_ERROR_MASK);
err1:
dsi_unregister_isr_vc(channel, dsi_completion_handler,
&completion, DSI_VC_IRQ_BTA);