All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com
Cc: marcheu@chromium.org
Subject: [PATCH 18/23] drm/exynos: Implement mode_fixup manager operation
Date: Thu, 10 Oct 2013 20:30:31 -0400	[thread overview]
Message-ID: <1381451436-10089-19-git-send-email-seanpaul@chromium.org> (raw)
In-Reply-To: <1381451436-10089-1-git-send-email-seanpaul@chromium.org>

This patch adds a new manager callback for mode_fixup and pipes it
through exynos_drm_crtc.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 +++++++-
 drivers/gpu/drm/exynos/exynos_drm_drv.h  | 3 +++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 576754d..083e1e3 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -105,7 +105,13 @@ exynos_drm_crtc_mode_fixup(struct drm_crtc *crtc,
 			    const struct drm_display_mode *mode,
 			    struct drm_display_mode *adjusted_mode)
 {
-	/* drm framework doesn't check NULL */
+	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
+	struct exynos_drm_manager *manager = exynos_crtc->manager;
+
+	if (manager->ops->mode_fixup)
+		return manager->ops->mode_fixup(manager->ctx, mode,
+				adjusted_mode);
+
 	return true;
 }
 
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 3a86473..0a956d0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -178,6 +178,7 @@ struct exynos_drm_display {
  * @remove: cleans up the manager for removal
  * @dpms: control device power.
  * @apply: set timing, vblank and overlay data to registers.
+ * @mode_fixup: fix mode data before applying it
  * @mode_set: set the given mode to the manager
  * @commit: set current hw specific display mode to hw.
  * @enable_vblank: specific driver callback for enabling vblank interrupt.
@@ -194,6 +195,8 @@ struct exynos_drm_manager_ops {
 	void (*remove)(void *ctx);
 	void (*dpms)(void *ctx, int mode);
 	void (*apply)(void *ctx);
+	bool (*mode_fixup)(void *ctx, const struct drm_display_mode *mode,
+				struct drm_display_mode *adjusted_mode);
 	void (*mode_set)(void *ctx, const struct drm_display_mode *mode);
 	void (*commit)(void *ctx);
 	int (*enable_vblank)(void *ctx);
-- 
1.8.4

  parent reply	other threads:[~2013-10-11  0:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11  0:30 [PATCH 00/23] drm/exynos: Refactor parts of the exynos driver Sean Paul
2013-10-11  0:30 ` [PATCH 01/23] drm/exynos: Remove useless slab.h include Sean Paul
2013-10-11  0:30 ` [PATCH 02/23] drm/exynos: Merge overlay_ops into manager_ops Sean Paul
2013-10-11  0:30 ` [PATCH 03/23] drm/exynos: Add an initialize function to manager and display Sean Paul
2013-10-11  0:30 ` [PATCH 04/23] drm/exynos: Use manager_op initialize in fimd Sean Paul
2013-10-11  0:30 ` [PATCH 05/23] drm/exynos: hdmi: Implement initialize op for hdmi Sean Paul
2013-10-11  0:30 ` [PATCH 06/23] drm/exynos: Pass context in manager ops instead of dev Sean Paul
2013-10-12  6:44   ` Inki Dae
2013-10-14 12:42   ` Inki Dae
2013-10-14 14:18     ` Sean Paul
2013-10-14 15:07       ` Inki Dae
2013-10-11  0:30 ` [PATCH 07/23] drm/exynos: Pass context in display_ops " Sean Paul
2013-10-11  0:30 ` [PATCH 08/23] drm/exynos: Remove dpms link between encoder/connector Sean Paul
2013-10-11  0:30 ` [PATCH 09/23] drm/exynos: Rename display_op power_on to dpms Sean Paul
2013-10-11  0:30 ` [PATCH 10/23] drm/exynos: Don't keep dpms state in encoder Sean Paul
2013-10-11  0:30 ` [PATCH 11/23] drm/exynos: Use unsigned long for possible_crtcs Sean Paul
2013-10-11  0:30 ` [PATCH 12/23] drm/exynos: Split manager/display/subdrv Sean Paul
2013-10-12  0:42   ` Inki Dae
2013-10-12  2:06     ` Sean Paul
2013-10-12  3:49       ` Inki Dae
2013-10-12  4:19         ` Sean Paul
2013-10-12  4:30           ` Inki Dae
2013-10-14 15:24   ` Inki Dae
2013-10-15  4:09     ` Inki Dae
2013-10-15 18:12       ` Sean Paul
2013-10-16  2:17         ` Inki Dae
2013-10-11  0:30 ` [PATCH 13/23] drm/exynos: hdmi: remove the i2c drivers and use devtree Sean Paul
2013-10-11  0:30 ` [PATCH 14/23] drm/exynos: Remove exynos_drm_hdmi shim Sean Paul
2013-10-11  0:30 ` [PATCH 15/23] drm/exynos: Use drm_mode_copy to copy modes Sean Paul
2013-10-11  0:30 ` [PATCH 16/23] drm/exynos: Disable unused crtc planes from crtc Sean Paul
2013-10-11  0:30 ` [PATCH 17/23] drm/exynos: Add mode_set manager operation Sean Paul
2013-10-11  0:30 ` Sean Paul [this message]
2013-10-11  0:30 ` [PATCH 19/23] drm/exynos: Use mode_set to configure fimd Sean Paul
2013-10-11  0:30 ` [PATCH 20/23] drm/exynos: Remove unused/useless fimd_context members Sean Paul
2013-10-11  0:30 ` [PATCH 21/23] drm/exynos: Move dp driver from video/ to drm/ Sean Paul
2013-10-11  0:30 ` [PATCH 22/23] drm/exynos: Move display implementation into dp Sean Paul
2013-10-11  0:30 ` [PATCH 23/23] ARM: dts: Move display-timings node from fimd to dp Sean Paul
2013-10-12  2:26 ` [PATCH 00/23] drm/exynos: Refactor parts of the exynos driver Tomasz Figa

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=1381451436-10089-19-git-send-email-seanpaul@chromium.org \
    --to=seanpaul@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=marcheu@chromium.org \
    /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.