[PATCH 4/9] drm/exynos: don't disable planes already disabled

Gustavo Padovan gustavo at padovan.org
Wed Jun 3 07:30:27 PDT 2015


From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>

on resume (or enable()) do not call disable_plane() on planes that
are already disabled.

Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 2b0080d..9c8522b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -786,23 +786,10 @@ static void fimd_window_resume(struct fimd_context *ctx)
 		plane = &ctx->planes[i];
 		plane->enabled = plane->resume;
 		plane->resume = false;
-	}
-}
 
-static void fimd_apply(struct fimd_context *ctx)
-{
-	struct exynos_drm_plane *plane;
-	int i;
-
-	for (i = 0; i < WINDOWS_NR; i++) {
-		plane = &ctx->planes[i];
 		if (plane->enabled)
 			fimd_update_plane(ctx->crtc, i);
-		else
-			fimd_disable_plane(ctx->crtc, i);
 	}
-
-	fimd_commit(ctx->crtc);
 }
 
 static void fimd_enable(struct exynos_drm_crtc *crtc)
@@ -835,7 +822,7 @@ static void fimd_enable(struct exynos_drm_crtc *crtc)
 
 	fimd_window_resume(ctx);
 
-	fimd_apply(ctx);
+	fimd_commit(ctx->crtc);
 }
 
 static void fimd_disable(struct exynos_drm_crtc *crtc)
-- 
2.1.0



More information about the dri-devel mailing list