diff options
author | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-05-25 17:01:28 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-05 16:52:06 +0300 |
commit | a602771c43ed7f1a02c7766c94fda74ac5d72a8b (patch) | |
tree | af11ea5c9f7b901453b6924fa7166f4fb4997d4c /drivers/video | |
parent | 36194b4792bacf8a02e713536487af60938f06dd (diff) | |
download | op-kernel-dev-a602771c43ed7f1a02c7766c94fda74ac5d72a8b.zip op-kernel-dev-a602771c43ed7f1a02c7766c94fda74ac5d72a8b.tar.gz |
OMAP: DSS2: DSI: detect unsupported update requests
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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 2ceddb8..a6e0f64 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -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; |