diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-04-01 15:22:38 -0700 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-04-01 20:18:27 -0400 |
commit | e13161af80c185ecd8dc4641d0f5df58f9e3e0af (patch) | |
tree | f91577cef047892521deed04a077c87babcfeb2c /include | |
parent | 9922ab5a7e4a4e089b2abfb1425590b97a7a90a3 (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')
-rw-r--r-- | include/drm/drm_crtc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 4c4f792588e..46790c0de84 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -270,6 +270,8 @@ struct drm_crtc_funcs { * @dev: parent DRM device * @head: list management * @base: base KMS object for ID tracking etc. + * @primary: primary plane for this CRTC + * @cursor: cursor plane for this CRTC * @enabled: is this CRTC enabled? * @mode: current mode timings * @hwmode: mode timings as programmed to hw regs @@ -305,6 +307,10 @@ struct drm_crtc { struct drm_mode_object base; + /* primary and cursor planes for CRTC */ + struct drm_plane *primary; + struct drm_plane *cursor; + /* framebuffer the connector is currently bound to */ struct drm_framebuffer *fb; @@ -824,6 +830,11 @@ extern void drm_modeset_lock_all(struct drm_device *dev); extern void drm_modeset_unlock_all(struct drm_device *dev); extern void drm_warn_on_modeset_not_all_locked(struct drm_device *dev); +extern int drm_crtc_init_with_planes(struct drm_device *dev, + struct drm_crtc *crtc, + struct drm_plane *primary, + void *cursor, + const struct drm_crtc_funcs *funcs); extern int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, const struct drm_crtc_funcs *funcs); |