aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2012-08-20 06:58:05 -0400
committerInki Dae <inki.dae@samsung.com>2012-10-03 21:05:59 -0400
commit479cbc3eeed060879dc89652e497d7719f7ee1dc (patch)
treeef8e5938338a50b63e32ec28a7e2be1daecc244f /drivers/gpu/drm
parentb011941f0ffdefb87585d9ed786164037d0d50df (diff)
drm/exynos: make sure that hardware overlay for fimd is disabled
Changelog v2: wait for VSYNC instead of BACKPORCH. Changelog v1: the values set to registers will be updated into real registers at vsync so dma operation could be malfunctioned when accessed to memory after gem buffer was released. this patch makes sure that hw overlay is disabled before the gem buffer is released. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 28733cd52745..1da741fc7460 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -570,10 +570,22 @@ static void fimd_win_disable(struct device *dev, int zpos)
570 win_data->enabled = false; 570 win_data->enabled = false;
571} 571}
572 572
573static void fimd_wait_for_vblank(struct device *dev)
574{
575 struct fimd_context *ctx = get_fimd_context(dev);
576 int ret;
577
578 ret = wait_for((__raw_readl(ctx->regs + VIDCON1) &
579 VIDCON1_VSTATUS_VSYNC), 50);
580 if (ret < 0)
581 DRM_DEBUG_KMS("vblank wait timed out.\n");
582}
583
573static struct exynos_drm_overlay_ops fimd_overlay_ops = { 584static struct exynos_drm_overlay_ops fimd_overlay_ops = {
574 .mode_set = fimd_win_mode_set, 585 .mode_set = fimd_win_mode_set,
575 .commit = fimd_win_commit, 586 .commit = fimd_win_commit,
576 .disable = fimd_win_disable, 587 .disable = fimd_win_disable,
588 .wait_for_vblank = fimd_wait_for_vblank,
577}; 589};
578 590
579static struct exynos_drm_manager fimd_manager = { 591static struct exynos_drm_manager fimd_manager = {