]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAPDSS: DISPC: use WARN_ON() in dispc_mgr_go
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 19 Oct 2012 12:06:07 +0000 (15:06 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 27 Nov 2012 10:27:02 +0000 (12:27 +0200)
dispc_mgr_go() should never be called with manager output disabled or if
the GO bit is already set. Change the current silent returns to
WARN_ONs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dispc.c

index 942dd16f317da243406d158f8230e9ef762f2c12..531961424d33d7da7bc4318b3aff7af3275a7ef4 100644 (file)
@@ -569,20 +569,8 @@ bool dispc_mgr_go_busy(enum omap_channel channel)
 
 void dispc_mgr_go(enum omap_channel channel)
 {
-       bool enable_bit, go_bit;
-
-       /* if the channel is not enabled, we don't need GO */
-       enable_bit = mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE) == 1;
-
-       if (!enable_bit)
-               return;
-
-       go_bit = mgr_fld_read(channel, DISPC_MGR_FLD_GO) == 1;
-
-       if (go_bit) {
-               DSSERR("GO bit not down for channel %d\n", channel);
-               return;
-       }
+       WARN_ON(dispc_mgr_is_enabled(channel) == false);
+       WARN_ON(dispc_mgr_go_busy(channel));
 
        DSSDBG("GO %s\n", mgr_desc[channel].name);