aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLajos Molnar <molnar@ti.com>2011-07-27 20:57:10 -0500
committerErik Gilling <konkers@android.com>2011-07-28 11:12:40 -0700
commitf9ace53d7c88c687d3ca7d8f73a1ce3022bf09cb (patch)
treed4209ac2c6b738b95d940d4e779188113e29f3d9
parent74ee24a54b3cb17fce170ee1d8b6c60df980b506 (diff)
downloadkernel_samsung_tuna-f9ace53d7c88c687d3ca7d8f73a1ce3022bf09cb.zip
kernel_samsung_tuna-f9ace53d7c88c687d3ca7d8f73a1ce3022bf09cb.tar.gz
kernel_samsung_tuna-f9ace53d7c88c687d3ca7d8f73a1ce3022bf09cb.tar.bz2
OMAP:DSS: Fix buffer underflow errors
When downscaling heavily, FIFO buffers may underflow at the first line. Set DMA preload value to the high threshold to avoid this. Change-Id: Ic791f48a252d82b2ba514f16c9e824d25e96fa44 Signed-off-by: Lajos Molnar <molnar@ti.com>
-rw-r--r--drivers/video/omap2/dss/dispc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 4d03fd4..a676cf1 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1148,6 +1148,9 @@ void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high)
hi_start, hi_end),
low, high);
+ /* preload to high threshold to avoid FIFO underflow */
+ dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfffu));
+
dispc_write_reg(DISPC_OVL_FIFO_THRESHOLD(plane),
FLD_VAL(high, hi_start, hi_end) |
FLD_VAL(low, lo_start, lo_end));