From: Hyungwon Hwang <human.hwang@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: sw0312.kim@samsung.com
Subject: [PATCH 1/2] drm/exynos: implement exynos_crtc_atomic_{begin/flush}
Date: Thu, 20 Aug 2015 11:33:26 +0900 [thread overview]
Message-ID: <1440038007-32192-1-git-send-email-human.hwang@samsung.com> (raw)
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
next reply other threads:[~2015-08-20 2:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 2:33 Hyungwon Hwang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440038007-32192-1-git-send-email-human.hwang@samsung.com \
--to=human.hwang@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).