From mboxrd@z Thu Jan 1 00:00:00 1970 From: "G, Pallavi" Subject: Re: [PATCH 4/6] drm: Allow drivers to register cursor planes with crtc Date: Thu, 12 Jun 2014 09:08:09 +0000 Message-ID: <1402564759.1130.8.camel@pg3-desktop> References: <1402414093-13401-1-git-send-email-matthew.d.roper@intel.com> <1402414093-13401-5-git-send-email-matthew.d.roper@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 42A6D6E8EC for ; Thu, 12 Jun 2014 02:08:38 -0700 (PDT) In-Reply-To: <1402414093-13401-5-git-send-email-matthew.d.roper@intel.com> Content-Language: en-US Content-ID: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Roper, Matthew D" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Tue, 2014-06-10 at 08:28 -0700, Matt Roper wrote: > 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: Daniel Vetter > Signed-off-by: Matt Roper > --- > drivers/gpu/drm/drm_crtc.c | 5 ++++- > include/drm/drm_crtc.h | 2 +- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index b5bce5b..74ad72f 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -727,7 +727,7 @@ DEFINE_WW_CLASS(crtc_ww_class); > */ > int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, > struct drm_plane *primary, > - void *cursor, > + struct drm_plane *cursor, > const struct drm_crtc_funcs *funcs) > { > 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, > config->num_crtc++; > > crtc->primary = primary; > + crtc->cursor = cursor; > if (primary) > primary->possible_crtcs = 1 << drm_crtc_index(crtc); > + if (cursor) > + cursor->possible_crtcs = 1 << drm_crtc_index(crtc); > > out: > drm_modeset_unlock_all(dev); > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index b8c7a9a..4ee7e26 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -856,7 +856,7 @@ struct drm_prop_enum_list { > extern int drm_crtc_init_with_planes(struct drm_device *dev, > struct drm_crtc *crtc, > struct drm_plane *primary, > - void *cursor, > + struct drm_plane *cursor, > const struct drm_crtc_funcs *funcs); > extern int drm_crtc_init(struct drm_device *dev, > struct drm_crtc *crtc, Reviewed-by: Pallavi G