From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH 37/43] drm/i915/bdw: Display execlists info in debugfs Date: Fri, 8 Aug 2014 17:02:32 +0100 Message-ID: <20140808160232.GI2751@strange.ger.corp.intel.com> References: <1406217891-8912-38-git-send-email-thomas.daniel@intel.com> <1407414200-6022-1-git-send-email-thomas.daniel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 46B896E886 for ; Fri, 8 Aug 2014 09:03:00 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1407414200-6022-1-git-send-email-thomas.daniel@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Thomas Daniel Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Aug 07, 2014 at 01:23:20PM +0100, Thomas Daniel wrote: > From: Oscar Mateo > > v2: Warn and return if LRCs are not enabled. > > v3: Grab the Execlists spinlock (noticed by Daniel Vetter). > > Signed-off-by: Oscar Mateo > > v4: Lock the struct mutex for atomic state capture > > Signed-off-by: Thomas Daniel > --- > drivers/gpu/drm/i915/i915_debugfs.c | 80 +++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/intel_lrc.c | 6 --- > drivers/gpu/drm/i915/intel_lrc.h | 7 +++ > 3 files changed, 87 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index fc39610..f8f0e11 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -1674,6 +1674,85 @@ static int i915_context_status(struct seq_file *m, void *unused) > return 0; > } > > +static int i915_execlists(struct seq_file *m, void *data) > +{ > + struct drm_info_node *node = (struct drm_info_node *) m->private; > + struct drm_device *dev = node->minor->dev; > + struct drm_i915_private *dev_priv = dev->dev_private; > + struct intel_engine_cs *ring; > + u32 status_pointer; > + u8 read_pointer; > + u8 write_pointer; > + u32 status; > + u32 ctx_id; > + struct list_head *cursor; > + int ring_id, i; > + int ret; > + > + if (!i915.enable_execlists) { > + seq_printf(m, "Logical Ring Contexts are disabled\n"); > + return 0; > + } checkpatch.pl will tell you seq_puts() should be used here I guess. Reviewed-by: Damien Lespiau -- Damien