aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-19 05:50:16 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-02-26 05:15:14 -0500
commitfe59e5cf4abb922d37caea2ced6331cce48fb8b8 (patch)
tree034c50bc3ff80ba7c89a018dd5177bbab2109e2b
parentc64aa3a6600fa5ab25c3ff535d134c8f09add5aa (diff)
OMAPDSS: workaround for MFLAG + NV12 issue
It was found that having two displays enabled and having an NV12 overlay on one of the displays will cause underflows/synclosts. Debugging this pointed to some issue with MFLAG. It is unclear why this issue is happening, but it looks like there is a HW bug related to MFLAG and FIFO management. Disabling MFLAG makes this issue go away, but then we lose the benefit of MFLAG. Also forcing MFLAG always on makes the issue go away. Also, using certain values for MFLAG_START, MFLAG thresholds and PRELOAD makes the issue go away, but there was no obvious logic to which values work and which don't. As a workaround until more information about this is found, force MFLAG always on to make NV12 usable. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/fbdev/omap2/dss/dispc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 6b056d0ce187..f4fc77d9d3bf 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -1328,8 +1328,18 @@ static void dispc_init_mflag(void)
1328{ 1328{
1329 int i; 1329 int i;
1330 1330
1331 /*
1332 * HACK: NV12 color format and MFLAG seem to have problems working
1333 * together: using two displays, and having an NV12 overlay on one of
1334 * the displays will cause underflows/synclosts when MFLAG_CTRL=2.
1335 * Changing MFLAG thresholds and PRELOAD to certain values seem to
1336 * remove the errors, but there doesn't seem to be a clear logic on
1337 * which values work and which not.
1338 *
1339 * As a work-around, set force MFLAG to always on.
1340 */
1331 dispc_write_reg(DISPC_GLOBAL_MFLAG_ATTRIBUTE, 1341 dispc_write_reg(DISPC_GLOBAL_MFLAG_ATTRIBUTE,
1332 (2 << 0) | /* MFLAG_CTRL = enable */ 1342 (1 << 0) | /* MFLAG_CTRL = force always on */
1333 (0 << 2)); /* MFLAG_START = disable */ 1343 (0 << 2)); /* MFLAG_START = disable */
1334 1344
1335 for (i = 0; i < dss_feat_get_num_ovls(); ++i) { 1345 for (i = 0; i < dss_feat_get_num_ovls(); ++i) {