aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2010-10-08 09:15:25 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-03-15 04:54:19 -0400
commit773b30b22f8c5ac4ccc52775c17809cc5826cb86 (patch)
treeab2fec0596f6abb7b99d68b1ee340aabb9d19818 /drivers/video
parentf34bd465cae57bcce11fb7f953cfcbb18222b99e (diff)
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>
Diffstat (limited to 'drivers/video')
-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)
2242 if (r) 2242 if (r)
2243 goto err0; 2243 goto err0;
2244 2244
2245 r = dsi_vc_send_bta(channel); 2245 r = dsi_register_isr(dsi_completion_handler, &completion,
2246 DSI_IRQ_ERROR_MASK);
2246 if (r) 2247 if (r)
2247 goto err1; 2248 goto err1;
2248 2249
2250 r = dsi_vc_send_bta(channel);
2251 if (r)
2252 goto err2;
2253
2249 if (wait_for_completion_timeout(&completion, 2254 if (wait_for_completion_timeout(&completion,
2250 msecs_to_jiffies(500)) == 0) { 2255 msecs_to_jiffies(500)) == 0) {
2251 DSSERR("Failed to receive BTA\n"); 2256 DSSERR("Failed to receive BTA\n");
2252 r = -EIO; 2257 r = -EIO;
2253 goto err1; 2258 goto err2;
2254 } 2259 }
2255 2260
2256 err = dsi_get_errors(); 2261 err = dsi_get_errors();
2257 if (err) { 2262 if (err) {
2258 DSSERR("Error while sending BTA: %x\n", err); 2263 DSSERR("Error while sending BTA: %x\n", err);
2259 r = -EIO; 2264 r = -EIO;
2260 goto err1; 2265 goto err2;
2261 } 2266 }
2262 2267err2:
2268 dsi_unregister_isr(dsi_completion_handler, &completion,
2269 DSI_IRQ_ERROR_MASK);
2263err1: 2270err1:
2264 dsi_unregister_isr_vc(channel, dsi_completion_handler, 2271 dsi_unregister_isr_vc(channel, dsi_completion_handler,
2265 &completion, DSI_VC_IRQ_BTA); 2272 &completion, DSI_VC_IRQ_BTA);