Commit fc1d3e44 authored by Matt Roper's avatar Matt Roper Committed by Daniel Vetter

drm: Allow drivers to register cursor planes with crtc

Universal plane support had placeholders for cursor planes, but didn't
actually do anything with them.  Save the cursor plane reference inside
the crtc and update the cursor plane parameter from void* to drm_plane.
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Reviewed-by: Pallavi G<pallavi.g@intel.com>
Acked-by: default avatarDave Airlie <airlied@linux.ie>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 17cfd91f
...@@ -727,7 +727,7 @@ DEFINE_WW_CLASS(crtc_ww_class); ...@@ -727,7 +727,7 @@ DEFINE_WW_CLASS(crtc_ww_class);
*/ */
int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_plane *primary, struct drm_plane *primary,
void *cursor, struct drm_plane *cursor,
const struct drm_crtc_funcs *funcs) const struct drm_crtc_funcs *funcs)
{ {
struct drm_mode_config *config = &dev->mode_config; struct drm_mode_config *config = &dev->mode_config;
...@@ -752,8 +752,11 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, ...@@ -752,8 +752,11 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
config->num_crtc++; config->num_crtc++;
crtc->primary = primary; crtc->primary = primary;
crtc->cursor = cursor;
if (primary) if (primary)
primary->possible_crtcs = 1 << drm_crtc_index(crtc); primary->possible_crtcs = 1 << drm_crtc_index(crtc);
if (cursor)
cursor->possible_crtcs = 1 << drm_crtc_index(crtc);
out: out:
drm_modeset_unlock_all(dev); drm_modeset_unlock_all(dev);
......
...@@ -856,7 +856,7 @@ struct drm_prop_enum_list { ...@@ -856,7 +856,7 @@ struct drm_prop_enum_list {
extern int drm_crtc_init_with_planes(struct drm_device *dev, extern int drm_crtc_init_with_planes(struct drm_device *dev,
struct drm_crtc *crtc, struct drm_crtc *crtc,
struct drm_plane *primary, struct drm_plane *primary,
void *cursor, struct drm_plane *cursor,
const struct drm_crtc_funcs *funcs); const struct drm_crtc_funcs *funcs);
extern int drm_crtc_init(struct drm_device *dev, extern int drm_crtc_init(struct drm_device *dev,
struct drm_crtc *crtc, struct drm_crtc *crtc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment