aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2014-04-01 18:22:38 -0400
committerRob Clark <robdclark@gmail.com>2014-04-01 20:18:27 -0400
commite13161af80c185ecd8dc4641d0f5df58f9e3e0af (patch)
treef91577cef047892521deed04a077c87babcfeb2c /include/drm
parent9922ab5a7e4a4e089b2abfb1425590b97a7a90a3 (diff)
drm: Add drm_crtc_init_with_planes() (v2)
Add a new drm_crtc_init_with_planes() to allow drivers to provide specific primary and cursor planes at CRTC initialization. The existing drm_crtc_init() interface remains to avoid driver churn in existing drivers; it will initialize the CRTC with a plane helper-created primary plane and no cursor plane. v2: - Move drm_crtc_init() to plane helper file so that nothing in the DRM core depends on helpers. [suggested by Daniel Vetter] - Keep cursor parameter to drm_crtc_init_with_planes() a void* until we actually add cursor support. [suggested by Daniel Vetter] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 4c4f792588e9..46790c0de845 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -270,6 +270,8 @@ struct drm_crtc_funcs {
270 * @dev: parent DRM device 270 * @dev: parent DRM device
271 * @head: list management 271 * @head: list management
272 * @base: base KMS object for ID tracking etc. 272 * @base: base KMS object for ID tracking etc.
273 * @primary: primary plane for this CRTC
274 * @cursor: cursor plane for this CRTC
273 * @enabled: is this CRTC enabled? 275 * @enabled: is this CRTC enabled?
274 * @mode: current mode timings 276 * @mode: current mode timings
275 * @hwmode: mode timings as programmed to hw regs 277 * @hwmode: mode timings as programmed to hw regs
@@ -305,6 +307,10 @@ struct drm_crtc {
305 307
306 struct drm_mode_object base; 308 struct drm_mode_object base;
307 309
310 /* primary and cursor planes for CRTC */
311 struct drm_plane *primary;
312 struct drm_plane *cursor;
313
308 /* framebuffer the connector is currently bound to */ 314 /* framebuffer the connector is currently bound to */
309 struct drm_framebuffer *fb; 315 struct drm_framebuffer *fb;
310 316
@@ -824,6 +830,11 @@ extern void drm_modeset_lock_all(struct drm_device *dev);
824extern void drm_modeset_unlock_all(struct drm_device *dev); 830extern void drm_modeset_unlock_all(struct drm_device *dev);
825extern void drm_warn_on_modeset_not_all_locked(struct drm_device *dev); 831extern void drm_warn_on_modeset_not_all_locked(struct drm_device *dev);
826 832
833extern int drm_crtc_init_with_planes(struct drm_device *dev,
834 struct drm_crtc *crtc,
835 struct drm_plane *primary,
836 void *cursor,
837 const struct drm_crtc_funcs *funcs);
827extern int drm_crtc_init(struct drm_device *dev, 838extern int drm_crtc_init(struct drm_device *dev,
828 struct drm_crtc *crtc, 839 struct drm_crtc *crtc,
829 const struct drm_crtc_funcs *funcs); 840 const struct drm_crtc_funcs *funcs);