summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-03-26 16:26:37 +0200
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-05-18 14:14:30 +0300
commitf49a951f8a2dacbbb145b6199297fcc3e493b90f (patch)
tree4621057ef855f2b8da765bf71ae7c1d5486008fb /drivers/video/omap2
parent279fcd48c4a426050422b2d196fd99c2b5ae7d71 (diff)
downloadblackbird-op-linux-f49a951f8a2dacbbb145b6199297fcc3e493b90f.tar.gz
blackbird-op-linux-f49a951f8a2dacbbb145b6199297fcc3e493b90f.zip
OMAP: DSS2: Make partial update width even
There are some strange problems with DSI and updates with odd widths. One particular problem is that HS TX timeout triggers easily with updates with odd widths. This patch makes the updates widths even, circumventing the problem. There should be no ill side effects with increasing the update area slightly to make the width even. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/manager.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 0820986d4a68..32ec2ff2e9cf 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -940,6 +940,22 @@ static int configure_dispc(void)
return r;
}
+/* Make the coordinates even. There are some strange problems with OMAP and
+ * partial DSI update when the update widths are odd. */
+static void make_even(u16 *x, u16 *w)
+{
+ u16 x1, x2;
+
+ x1 = *x;
+ x2 = *x + *w;
+
+ x1 &= ~1;
+ x2 = ALIGN(x2, 2);
+
+ *x = x1;
+ *w = x2 - x1;
+}
+
/* Configure dispc for partial update. Return possibly modified update
* area */
void dss_setup_partial_planes(struct omap_dss_device *dssdev,
@@ -968,6 +984,8 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev,
return;
}
+ make_even(&x, &w);
+
spin_lock_irqsave(&dss_cache.lock, flags);
/* We need to show the whole overlay if it is scaled. So look for
@@ -1029,6 +1047,8 @@ void dss_setup_partial_planes(struct omap_dss_device *dssdev,
w = x2 - x1;
h = y2 - y1;
+ make_even(&x, &w);
+
DSSDBG("changing upd area due to ovl(%d) scaling %d,%d %dx%d\n",
i, x, y, w, h);
}
OpenPOWER on IntegriCloud