From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752290AbcDZQfJ (ORCPT ); Tue, 26 Apr 2016 12:35:09 -0400 Received: from mga02.intel.com ([134.134.136.20]:55014 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750843AbcDZQfI (ORCPT ); Tue, 26 Apr 2016 12:35:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,537,1455004800"; d="scan'208";a="966938014" Date: Tue, 26 Apr 2016 19:34:32 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Gustavo Padovan 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: <20160426163432.GV4329@intel.com> References: <1461623608-29538-1-git-send-email-gustavo@padovan.org> <1461623608-29538-8-git-send-email-gustavo@padovan.org> <20160426101200.GO4329@intel.com> <20160426142306.GH7857@joana> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160426142306.GH7857@joana> 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 On Tue, Apr 26, 2016 at 11:23:06AM -0300, Gustavo Padovan wrote: > 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" ? I'm fine either way if it's an internal thing. So pick whichever makes people's life easier I guess. -- Ville Syrjälä Intel OTC