aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-02-23 05:21:09 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-03-06 07:08:39 -0500
commit4614679c9d3b77e87b390b6afe8a8dfc980f4387 (patch)
tree4d329525727de808f6b4dbe25d83451acd9aff5a
parent21e56f79abad987555351c73569fc8358636b0fa (diff)
OMAPDSS: APPLY: print warning if wait_pending_extra_info_updates fails
wait_pending_extra_info_updates() currently does a hacky second check for extra_info_update_ongoing() at the end of the function to show a warning if extra_info update is still ongoing. The call to extra_info_update_ongoing() should really be inside spinlock, but that's a bit heavy just for verification. Rather than that, check the return value of the wait_for_completion_timeout() and print an error if it has timeouted or returned an error. Even better would be to return the error value and act on it in the callers of wait_pending_extra_info_updates. However, it's not clear what the callers should do in case of an error, as the error should only happen if there's a bug in the driver or the HW. So we'll just print the warning for now. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/apply.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index f145e9cd6edd..267c3f40d6c3 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -354,6 +354,7 @@ static void wait_pending_extra_info_updates(void)
354 bool updating; 354 bool updating;
355 unsigned long flags; 355 unsigned long flags;
356 unsigned long t; 356 unsigned long t;
357 int r;
357 358
358 spin_lock_irqsave(&data_lock, flags); 359 spin_lock_irqsave(&data_lock, flags);
359 360
@@ -369,11 +370,11 @@ static void wait_pending_extra_info_updates(void)
369 spin_unlock_irqrestore(&data_lock, flags); 370 spin_unlock_irqrestore(&data_lock, flags);
370 371
371 t = msecs_to_jiffies(500); 372 t = msecs_to_jiffies(500);
372 wait_for_completion_timeout(&extra_updated_completion, t); 373 r = wait_for_completion_timeout(&extra_updated_completion, t);
373 374 if (r == 0)
374 updating = extra_info_update_ongoing(); 375 DSSWARN("timeout in wait_pending_extra_info_updates\n");
375 376 else if (r < 0)
376 WARN_ON(updating); 377 DSSERR("wait_pending_extra_info_updates failed: %d\n", r);
377} 378}
378 379
379int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr) 380int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr)