From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gustavo Padovan Subject: Re: [RFC v2 7/8] drm/fence: add fence timeline to drm_crtc Date: Tue, 26 Apr 2016 11:23:06 -0300 Message-ID: <20160426142306.GH7857@joana> References: <1461623608-29538-1-git-send-email-gustavo@padovan.org> <1461623608-29538-8-git-send-email-gustavo@padovan.org> <20160426101200.GO4329@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20160426101200.GO4329@intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Gustavo Padovan , Daniel Stone , Daniel Vetter , Riley Andrews , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Arve =?iso-8859-1?B?SGr4bm5lduVn?= , John Harrison List-Id: dri-devel@lists.freedesktop.org 2016-04-26 Ville Syrj=E4l=E4 : > On Mon, Apr 25, 2016 at 07:33:27PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > >=20 > > Create one timeline context for each CRTC to be able to handle out-= fences > > and signal them. It adds a few members to struct drm_crtc: fence_co= ntext, > > where we store the context we get from fence_context_alloc(), the > > fence seqno and the fence lock, that we pass in fence_init() to be > > used by the fence. > >=20 > > Signed-off-by: Gustavo Padovan > > --- > > drivers/gpu/drm/drm_crtc.c | 29 +++++++++++++++++++++++++++++ > > include/drm/drm_crtc.h | 19 +++++++++++++++++++ > > 2 files changed, 48 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.= c > > index 65212ce..cf9750a 100644 > > --- a/drivers/gpu/drm/drm_crtc.c > > +++ b/drivers/gpu/drm/drm_crtc.c > > @@ -659,6 +659,32 @@ static unsigned int drm_num_crtcs(struct drm_d= evice *dev) > > return num; > > } > > =20 > > +static const char *drm_crtc_fence_get_driver_name(struct fence *fe= nce) > > +{ > > + struct drm_crtc *crtc =3D fence_to_crtc(fence); > > + > > + return crtc->dev->driver->name; > > +} > > + > > +static const char *drm_crtc_fence_get_timeline_name(struct fence *= fence) > > +{ > > + struct drm_crtc *crtc =3D fence_to_crtc(fence); > > + > > + return crtc->name; > > +} >=20 > Is that exported to userspace? crtc->name is an internal thing, not > meant for outside consumption. No. However it may be exported via debugfs at some point. Maybe have drm_crtc->timeline_name which has the obj_id instead, eg., "drm_crtc19"= ? Gustavo