All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: Fix disharmony when setting plane on/off
@ 2015-02-03 13:41 Gustavo Padovan
  2015-02-04  2:02 ` Joonyoung Shim
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Padovan @ 2015-02-03 13:41 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: Gustavo Padovan, dri-devel

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

This issue was caused by the latest exynos_update_plane() clean up
that unified plane operations. After those changes the plane failed
to go the On state. This patch fix this problem by doing correct account
of exynos_crtc->enabled.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index a85c451..1dbd0e3 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -119,6 +119,7 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
 	struct drm_framebuffer *fb = crtc->primary->fb;
 	unsigned int crtc_w;
 	unsigned int crtc_h;
+	int ret;
 
 	/* when framebuffer changing is requested, crtc's dpms should be on */
 	if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
@@ -129,8 +130,15 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
 	crtc_w = fb->width - x;
 	crtc_h = fb->height - y;
 
-	return exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
-				   crtc_w, crtc_h, x, y, crtc_w, crtc_h);
+	ret = exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
+				  crtc_w, crtc_h, x, y, crtc_w, crtc_h);
+	if (!ret)
+		return ret;
+
+	exynos_plane_dpms(crtc->primary, DRM_MODE_DPMS_ON);
+
+	return 0;
+
 }
 
 static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
-- 
1.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-04  2:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-03 13:41 [PATCH] drm/exynos: Fix disharmony when setting plane on/off Gustavo Padovan
2015-02-04  2:02 ` Joonyoung Shim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.