]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
OMAP: DSS2: DSI: detect unsupported update requests
authorTomi Valkeinen <tomi.valkeinen@nokia.com>
Tue, 25 May 2010 14:01:28 +0000 (17:01 +0300)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Thu, 5 Aug 2010 13:52:06 +0000 (16:52 +0300)
OMAP DSS HW cannot send updates with odd widths. Normally the widths are
made even while preparing the update.

This patch adds a BUG_ON() to check if the update width is even. This is
to detect broken updates cleanly, as otherwise the OMAP DSS HW will just
halt, leading to obscure error situations.

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

index 2ceddb83f247f33523ded98f264d0db8cb8aa1cc..a6e0f647554b6e06b11815214193ae991728fad4 100644 (file)
@@ -2902,6 +2902,12 @@ int omap_dsi_update(struct omap_dss_device *dssdev,
 {
        dsi.update_channel = channel;
 
+       /* OMAP DSS cannot send updates of odd widths.
+        * omap_dsi_prepare_update() makes the widths even, but add a BUG_ON
+        * here to make sure we catch erroneous updates. Otherwise we'll only
+        * see rather obscure HW error happening, as DSS halts. */
+       BUG_ON(x % 2 == 1);
+
        if (dssdev->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
                dsi.framedone_callback = callback;
                dsi.framedone_data = data;