summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRahul Sharma <Rahul.Sharma@samsung.com>2014-05-07 16:55:22 +0530
committerInki Dae <daeinki@gmail.com>2014-06-02 02:07:09 +0900
commit66367461e573321f0fbb0be0391165b5a54d5fe4 (patch)
treee0a5ac7bd84f8bd9ba02b7fd2e0ef0e2032db0e3 /drivers/gpu
parent049d34e94f9aa2c3ed22a7bad75dd188ec7dacb9 (diff)
downloadop-kernel-dev-66367461e573321f0fbb0be0391165b5a54d5fe4.zip
op-kernel-dev-66367461e573321f0fbb0be0391165b5a54d5fe4.tar.gz
drm/exynos: use 4WORD dma burst length for small fbs
In case of exynos, setting dma-burst to 16Word causes permanent tearing for very small buffers, e.g. cursor buffer. Burst Mode switching, which is based on overlay size is not recommended as overlay size varies a lot towards the end of the screen. This causes unstable DMA which results into tearing again. Rendering small buffers with lower burst size doesn't cause any noticable performance overhead. 128 pixel width is selected based on mulitple experiments with exynos5 SoCs. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 173ee97..bd30d0c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -39,6 +39,7 @@
*/
#define FIMD_DEFAULT_FRAMERATE 60
+#define MIN_FB_WIDTH_FOR_16WORD_BURST 128
/* position control register for hardware window 0, 2 ~ 4.*/
#define VIDOSD_A(win) (VIDOSD_BASE + 0x00 + (win) * 16)
@@ -479,6 +480,19 @@ static void fimd_win_set_pixfmt(struct fimd_context *ctx, unsigned int win)
DRM_DEBUG_KMS("bpp = %d\n", win_data->bpp);
+ /*
+ * In case of exynos, setting dma-burst to 16Word causes permanent
+ * tearing for very small buffers, e.g. cursor buffer. Burst Mode
+ * switching which is based on overlay size is not recommended as
+ * overlay size varies alot towards the end of the screen and rapid
+ * movement causes unstable DMA which results into iommu crash/tear.
+ */
+
+ if (win_data->fb_width < MIN_FB_WIDTH_FOR_16WORD_BURST) {
+ val &= ~WINCONx_BURSTLEN_MASK;
+ val |= WINCONx_BURSTLEN_4WORD;
+ }
+
writel(val, ctx->regs + WINCON(win));
}
OpenPOWER on IntegriCloud