All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Yuanhan Liu <yuanhan.liu@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: ringbuffer: use defined get_head/tail method
Date: Mon, 23 Aug 2010 12:16:51 +0100	[thread overview]
Message-ID: <89k77n$oo9bjn@fmsmga001.fm.intel.com> (raw)
In-Reply-To: <1282645653-7870-1-git-send-email-yuanhan.liu@intel.com>

On Tue, 24 Aug 2010 18:27:32 +0800, Yuanhan Liu <yuanhan.liu@intel.com> wrote:
> Use defined get_head/tail method to get the vaule of head/tail. Since each
> ring buffer has it's own get_head/tail method defined, use it.
> 
> Signed-off-by: Yuanhan Liu <yuanhan.liu@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c     |    5 +++--
>  drivers/gpu/drm/i915/i915_dma.c         |    4 ++--
>  drivers/gpu/drm/i915/i915_irq.c         |    2 +-
>  drivers/gpu/drm/i915/intel_ringbuffer.c |    2 +-
>  4 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 92d5605..068e3fa 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -339,10 +339,11 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data)
>  	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;
> +	struct intel_ring_buffer *ring = &dev_priv->render_ring;
>  	unsigned int head, tail;
>  
> -	head = I915_READ(PRB0_HEAD) & HEAD_ADDR;
> -	tail = I915_READ(PRB0_TAIL) & TAIL_ADDR;
> +	head = ring->get_head(dev, ring);
> +	tail = ring->get_tail(dev, ring);

Now that you've converted i915_ringbuffer_info to use the abstract
interface, can you also extend the debugfs to dump all ringbuffers.

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2010-08-23 11:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24 10:27 [PATCH 1/2] drm/i915: ringbuffer: use defined get_head/tail method Yuanhan Liu
2010-08-23 11:16 ` Chris Wilson [this message]
2010-08-24 10:27 ` [PATCH 2/2] drm/i915: ringbuffer: Add a helper function to update ring buffer space Yuanhan Liu
2010-08-23 11:13   ` Chris Wilson

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='89k77n$oo9bjn@fmsmga001.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yuanhan.liu@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.