All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Inki Dae <inki.dae@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	"open list:DRM DRIVERS FOR EXYNOS"
	<dri-devel@lists.freedesktop.org>,
	"moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES"
	<linux-samsung-soc@vger.kernel.org>
Subject: [PATCH 1/7] drm/exynos: add atomic_check callback to exynos_crtc
Date: Mon, 26 Oct 2015 13:03:39 +0100	[thread overview]
Message-ID: <1445861025-23266-2-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1445861025-23266-1-git-send-email-a.hajda@samsung.com>

Some CRTCs needs mode validation, this patch adds neccessary
callback to Exynos DRM framework. It is called from DRM core
via atomic_check helper for drm_crtc.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 ++++++++++++
 drivers/gpu/drm/exynos/exynos_drm_drv.h  |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 50dec0d..b3ba27f 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -50,6 +50,17 @@ exynos_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
 		exynos_crtc->ops->commit(exynos_crtc);
 }
 
+static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
+				     struct drm_crtc_state *state)
+{
+	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
+
+	if (exynos_crtc->ops->atomic_check)
+		return exynos_crtc->ops->atomic_check(exynos_crtc, state);
+
+	return 0;
+}
+
 static void exynos_crtc_atomic_begin(struct drm_crtc *crtc,
 				     struct drm_crtc_state *old_crtc_state)
 {
@@ -86,6 +97,7 @@ static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
 	.enable		= exynos_drm_crtc_enable,
 	.disable	= exynos_drm_crtc_disable,
 	.mode_set_nofb	= exynos_drm_crtc_mode_set_nofb,
+	.atomic_check	= exynos_crtc_atomic_check,
 	.atomic_begin	= exynos_crtc_atomic_begin,
 	.atomic_flush	= exynos_crtc_atomic_flush,
 };
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 638fc43..f1eda7f 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -89,6 +89,7 @@ struct exynos_drm_plane {
  * @disable_vblank: specific driver callback for disabling vblank interrupt.
  * @wait_for_vblank: wait for vblank interrupt to make sure that
  *	hardware overlay is updated.
+ * @atomic_check: validate state
  * @atomic_begin: prepare a window to receive a update
  * @atomic_flush: mark the end of a window update
  * @update_plane: apply hardware specific overlay data to registers.
@@ -108,6 +109,8 @@ struct exynos_drm_crtc_ops {
 	int (*enable_vblank)(struct exynos_drm_crtc *crtc);
 	void (*disable_vblank)(struct exynos_drm_crtc *crtc);
 	void (*wait_for_vblank)(struct exynos_drm_crtc *crtc);
+	int (*atomic_check)(struct exynos_drm_crtc *crtc,
+			    struct drm_crtc_state *state);
 	void (*atomic_begin)(struct exynos_drm_crtc *crtc,
 			      struct exynos_drm_plane *plane);
 	void (*update_plane)(struct exynos_drm_crtc *crtc,
-- 
1.9.1

  reply	other threads:[~2015-10-26 12:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 12:03 [PATCH 0/7] add atomic_check callback to exynos_crtc Andrzej Hajda
2015-10-26 12:03 ` Andrzej Hajda [this message]
2015-10-26 12:03 ` [PATCH 2/7] drm/exynos/mixer: replace direct cross-driver call with drm mode validation Andrzej Hajda
2015-11-24 21:40   ` Javier Martinez Canillas
2015-11-27  6:57     ` [PATCH] drm/exynos: atomic check only enabled crtc states Andrzej Hajda
2015-11-27 13:00       ` Javier Martinez Canillas
2015-12-09 10:51         ` Javier Martinez Canillas
2015-12-11 15:18           ` Inki Dae
2015-10-26 12:03 ` [PATCH 3/7] ARM: exynos_defconfig: enable Exynos DRM Mixer driver Andrzej Hajda
2015-10-28  6:09   ` Krzysztof Kozlowski
2015-10-28  6:15     ` Inki Dae
2016-05-30  6:37   ` Krzysztof Kozlowski
2015-10-26 12:03 ` [PATCH 4/7] drm/exynos: separate Mixer and HDMI drivers Andrzej Hajda
2015-10-26 12:03 ` [PATCH 5/7] drm/exynos: abstract out common dependency Andrzej Hajda
2015-10-26 12:03 ` [PATCH 6/7] drm/exynos: re-arrange Kconfig entries Andrzej Hajda
2015-10-26 12:03 ` [PATCH 7/7] drm/exynos: simplify Kconfig component names Andrzej Hajda
2015-10-28  1:37 ` [PATCH 0/7] add atomic_check callback to exynos_crtc Krzysztof Kozlowski
2015-10-28  5:30   ` Inki Dae
2015-10-28  5:38     ` Krzysztof Kozlowski
2015-10-28  5:57       ` Krzysztof Kozlowski
2015-10-29 14:25         ` [PATCH] ARM: multi_v7_defconfig: enable Exynos DRM Mixer driver Andrzej Hajda
2015-10-30  0:47           ` Krzysztof Kozlowski

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=1445861025-23266-2-git-send-email-a.hajda@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@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 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.