From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbcDZOXP (ORCPT ); Tue, 26 Apr 2016 10:23:15 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45240 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751735AbcDZOXO convert rfc822-to-8bit (ORCPT ); Tue, 26 Apr 2016 10:23:14 -0400 Date: Tue, 26 Apr 2016 11:23:06 -0300 From: Gustavo Padovan 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 Subject: Re: [RFC v2 7/8] drm/fence: add fence timeline to drm_crtc 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-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20160426101200.GO4329@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-04-26 Ville Syrjälä : > On Mon, Apr 25, 2016 at 07:33:27PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > 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_context, > > 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. > > > > Signed-off-by: Gustavo Padovan > > --- > > drivers/gpu/drm/drm_crtc.c | 29 +++++++++++++++++++++++++++++ > > include/drm/drm_crtc.h | 19 +++++++++++++++++++ > > 2 files changed, 48 insertions(+) > > > > 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_device *dev) > > return num; > > } > > > > +static const char *drm_crtc_fence_get_driver_name(struct fence *fence) > > +{ > > + struct drm_crtc *crtc = 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 = fence_to_crtc(fence); > > + > > + return crtc->name; > > +} > > 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