diff options
| author | Matt Roper <matthew.d.roper@intel.com> | 2014-04-01 18:22:38 -0400 |
|---|---|---|
| committer | Rob Clark <robdclark@gmail.com> | 2014-04-01 20:18:27 -0400 |
| commit | e13161af80c185ecd8dc4641d0f5df58f9e3e0af (patch) | |
| tree | f91577cef047892521deed04a077c87babcfeb2c /include/drm/drm_crtc.h | |
| 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/drm/drm_crtc.h')
| -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 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); | |||
| 824 | extern void drm_modeset_unlock_all(struct drm_device *dev); | 830 | extern void drm_modeset_unlock_all(struct drm_device *dev); |
| 825 | extern void drm_warn_on_modeset_not_all_locked(struct drm_device *dev); | 831 | extern void drm_warn_on_modeset_not_all_locked(struct drm_device *dev); |
| 826 | 832 | ||
| 833 | extern 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); | ||
| 827 | extern int drm_crtc_init(struct drm_device *dev, | 838 | extern 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); |
