aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2014-01-30 16:19:19 -0500
committerInki Dae <daeinki@gmail.com>2014-03-23 11:36:33 -0400
commit4b4052699ae4e913c4d2b965061f10eec122e558 (patch)
tree2b8a30bb30e60f86500ab4e68721e67048ac0fd0
parentcd706aa8dfd16b150be8294da2c1f1903abacb2c (diff)
drm/exynos: Implement mode_fixup manager operation
This patch adds a new manager callback for mode_fixup and pipes it through exynos_drm_crtc. This will allow the manager drivers to alter the mode during modeset. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c7
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h4
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 7810338591df..9cc92ae6b710 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -105,7 +105,12 @@ exynos_drm_crtc_mode_fixup(struct drm_crtc *crtc,
105 const struct drm_display_mode *mode, 105 const struct drm_display_mode *mode,
106 struct drm_display_mode *adjusted_mode) 106 struct drm_display_mode *adjusted_mode)
107{ 107{
108 /* drm framework doesn't check NULL */ 108 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
109 struct exynos_drm_manager *manager = exynos_crtc->manager;
110
111 if (manager->ops->mode_fixup)
112 return manager->ops->mode_fixup(manager, mode, adjusted_mode);
113
109 return true; 114 return true;
110} 115}
111 116
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index caba2993482e..81f7de4e2a51 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -184,6 +184,7 @@ struct exynos_drm_display {
184 * @initialize: initializes the manager with drm_dev 184 * @initialize: initializes the manager with drm_dev
185 * @remove: cleans up the manager for removal 185 * @remove: cleans up the manager for removal
186 * @dpms: control device power. 186 * @dpms: control device power.
187 * @mode_fixup: fix mode data before applying it
187 * @mode_set: set the given mode to the manager 188 * @mode_set: set the given mode to the manager
188 * @commit: set current hw specific display mode to hw. 189 * @commit: set current hw specific display mode to hw.
189 * @enable_vblank: specific driver callback for enabling vblank interrupt. 190 * @enable_vblank: specific driver callback for enabling vblank interrupt.
@@ -201,6 +202,9 @@ struct exynos_drm_manager_ops {
201 struct drm_device *drm_dev, int pipe); 202 struct drm_device *drm_dev, int pipe);
202 void (*remove)(struct exynos_drm_manager *mgr); 203 void (*remove)(struct exynos_drm_manager *mgr);
203 void (*dpms)(struct exynos_drm_manager *mgr, int mode); 204 void (*dpms)(struct exynos_drm_manager *mgr, int mode);
205 bool (*mode_fixup)(struct exynos_drm_manager *mgr,
206 const struct drm_display_mode *mode,
207 struct drm_display_mode *adjusted_mode);
204 void (*mode_set)(struct exynos_drm_manager *mgr, 208 void (*mode_set)(struct exynos_drm_manager *mgr,
205 const struct drm_display_mode *mode); 209 const struct drm_display_mode *mode);
206 void (*commit)(struct exynos_drm_manager *mgr); 210 void (*commit)(struct exynos_drm_manager *mgr);