On Fri, Mar 28, 2014 at 1:44 AM, Matt Roper <matthew.d.roper@xxxxxxxxx> wrote: > 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. > > Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx> > --- > drivers/gpu/drm/drm_crtc.c | 44 +++++++++++++++++++++++++++++++++++++++++--- > include/drm/drm_crtc.h | 11 +++++++++++ > 2 files changed, 52 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 24226de..a983311 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -37,6 +37,7 @@ > #include <drm/drm_crtc.h> > #include <drm/drm_edid.h> > #include <drm/drm_fourcc.h> > +#include <drm/drm_plane_helper.h> > > #include "drm_crtc_internal.h" > > @@ -692,9 +693,12 @@ void drm_framebuffer_remove(struct drm_framebuffer *fb) > EXPORT_SYMBOL(drm_framebuffer_remove); > > /** > - * drm_crtc_init - Initialise a new CRTC object > + * drm_crtc_init_with_planes - Initialise a new CRTC object with > + * specified primary and cursor planes. > * @dev: DRM device > * @crtc: CRTC object to init > + * @primary: Primary plane for CRTC > + * @cursor: Cursor plane for CRTC > * @funcs: callbacks for the new CRTC > * > * Inits a new object created as base part of a driver crtc object. > @@ -702,8 +706,10 @@ EXPORT_SYMBOL(drm_framebuffer_remove); > * Returns: > * Zero on success, error code on failure. > */ > -int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, > - const struct drm_crtc_funcs *funcs) > +int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, > + struct drm_plane *primary, > + struct drm_plane *cursor, > + const struct drm_crtc_funcs *funcs) > { I'm not sure we should add a spare parameter for the cursor planes just yet. Or at least not quite with this type, just a void * to avoid driver changes once we do add cursor plane support. I'll explain my reasoning in a mail to your rfc re the cursor patches. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel