diff mbox

drm/exynos: make sure that overlay data are updated

Message ID 1352964150-31675-1-git-send-email-inki.dae@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Inki Dae Nov. 15, 2012, 7:22 a.m. UTC
This patch removes wait_for_vblank call from
exynos_drm_encoder_plane_disable function and move it to
exynos_drm_encoder_plane_commit function.

Disabling dma channel to each plane doens't need vblank
signal to update data to real hardware. But updating
overlay data to real hardware does need vblank signal.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_encoder.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 607231a..b284dea 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -473,6 +473,13 @@  void exynos_drm_encoder_plane_commit(struct drm_encoder *encoder, void *data)
 
 	if (overlay_ops && overlay_ops->commit)
 		overlay_ops->commit(manager->dev, zpos);
+
+	/*
+	 * wait for vblank interrupt
+	 * - this makes user that overlay data are updated to real hardware.
+	 */
+	if (overlay_ops->wait_for_vblank)
+		overlay_ops->wait_for_vblank(manager->dev);
 }
 
 void exynos_drm_encoder_plane_enable(struct drm_encoder *encoder, void *data)
@@ -505,14 +512,4 @@  void exynos_drm_encoder_plane_disable(struct drm_encoder *encoder, void *data)
 
 	if (overlay_ops && overlay_ops->disable)
 		overlay_ops->disable(manager->dev, zpos);
-
-	/*
-	 * wait for vblank interrupt
-	 * - this makes sure that hardware overlay is disabled to avoid
-	 * for the dma accesses to memory after gem buffer was released
-	 * because the setting for disabling the overlay will be updated
-	 * at vsync.
-	 */
-	if (overlay_ops->wait_for_vblank)
-		overlay_ops->wait_for_vblank(manager->dev);
 }