All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/exynos: implement exynos_crtc_atomic_{begin/flush}
@ 2015-08-20  2:33 Hyungwon Hwang
  2015-08-20  2:33 ` [PATCH 2/2] drm/exynos: implement atomic_{begin/flush} of FIMD and DECON Hyungwon Hwang
  0 siblings, 1 reply; 3+ messages in thread
From: Hyungwon Hwang @ 2015-08-20  2:33 UTC (permalink / raw)
  To: dri-devel; +Cc: sw0312.kim

All chagnes in CRTCs of Exynos are applied in H/W, only when the protection
for shadow register update is not enabled. Using these protection, every
change can be applied at once. Now exynos_crtc_atomic_{begin/flush} stops
or starts the update of shadow registers by calling each CRTC specific
atomic_{begin/flush}.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 7 +++++++
 drivers/gpu/drm/exynos/exynos_drm_drv.h  | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index c478997..0201b54 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -88,11 +88,18 @@ static void exynos_crtc_atomic_begin(struct drm_crtc *crtc,
 		WARN_ON(drm_crtc_vblank_get(crtc) != 0);
 		exynos_crtc->event = crtc->state->event;
 	}
+
+	if (exynos_crtc->ops->atomic_begin)
+		exynos_crtc->ops->atomic_begin(exynos_crtc);
 }
 
 static void exynos_crtc_atomic_flush(struct drm_crtc *crtc,
 				     struct drm_crtc_state *old_crtc_state)
 {
+	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
+
+	if (exynos_crtc->ops->atomic_flush)
+		exynos_crtc->ops->atomic_flush(exynos_crtc);
 }
 
 static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 6b8a30f..887922d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -95,6 +95,10 @@ struct exynos_drm_plane {
  *	called from exynos-dp driver before powering up (with
  *	'enable' argument as true) and after powering down (with
  *	'enable' as false).
+ * @atomic_begin: stop the changes in the CRTC shadow registers to being
+ *		updated the CRTC active registers
+ * @atomic_flush: start the changes in the CRTC shadow registers to being
+ *		updated the CRTC active registers
  */
 struct exynos_drm_crtc;
 struct exynos_drm_crtc_ops {
@@ -113,6 +117,8 @@ struct exynos_drm_crtc_ops {
 			      struct exynos_drm_plane *plane);
 	void (*te_handler)(struct exynos_drm_crtc *crtc);
 	void (*clock_enable)(struct exynos_drm_crtc *crtc, bool enable);
+	void (*atomic_begin)(struct exynos_drm_crtc *crtc);
+	void (*atomic_flush)(struct exynos_drm_crtc *crtc);
 };
 
 /*
-- 
2.4.3

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

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

end of thread, other threads:[~2015-08-27  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20  2:33 [PATCH 1/2] drm/exynos: implement exynos_crtc_atomic_{begin/flush} Hyungwon Hwang
2015-08-20  2:33 ` [PATCH 2/2] drm/exynos: implement atomic_{begin/flush} of FIMD and DECON Hyungwon Hwang
2015-08-27  8:00   ` Inki Dae

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.