Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Print the hw context status is debugfs
Date: Fri, 15 Feb 2013 11:12:17 +0100	[thread overview]
Message-ID: <20130215101217.GD5813@phenom.ffwll.local> (raw)
In-Reply-To: <1360883112-1150-1-git-send-email-ben@bwidawsk.net>

On Thu, Feb 14, 2013 at 03:05:12PM -0800, Ben Widawsky wrote:
> Print out the HW context object information per ring. Even though the
> existing code only utilizes the render ring, it's simple enough to
> support future expansion.
> 
> I had this in a patch somewhere in a rev of the original implementation,
> but I must have lost it.
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>

Applied with a tiny bikeshed, I've inserted "default".

Thanks, Daniel
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index ac75566..367a039 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1530,7 +1530,8 @@ static int i915_context_status(struct seq_file *m, void *unused)
>  	struct drm_info_node *node = (struct drm_info_node *) m->private;
>  	struct drm_device *dev = node->minor->dev;
>  	drm_i915_private_t *dev_priv = dev->dev_private;
> -	int ret;
> +	struct intel_ring_buffer *ring;
> +	int ret, i;
>  
>  	ret = mutex_lock_interruptible(&dev->mode_config.mutex);
>  	if (ret)
> @@ -1548,6 +1549,14 @@ static int i915_context_status(struct seq_file *m, void *unused)
>  		seq_printf(m, "\n");
>  	}
>  
> +	for_each_ring(ring, dev_priv, i) {
> +		if (ring->default_context) {
> +			seq_printf(m, "HW context %s ring ", ring->name);
> +			describe_obj(m, ring->default_context->obj);
> +			seq_printf(m, "\n");
> +		}
> +	}
> +
>  	mutex_unlock(&dev->mode_config.mutex);
>  
>  	return 0;
> -- 
> 1.8.1.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2013-02-15 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 23:05 [PATCH] drm/i915: Print the hw context status is debugfs Ben Widawsky
2013-02-15 10:12 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130215101217.GD5813@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox