[Intel-gfx] [PATCH] Implement batch and ring buffer dumping

Chris Wilson chris at chris-wilson.co.uk
Wed Feb 4 15:36:22 CET 2009


Just a minor issue I spotted:

On Tue, 2009-02-03 at 17:06 -0500, Ben Gamari wrote:
> +static int i915_execinfo_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;
> +	unsigned int head, tail, mask;
> +
> +	head = dev_priv->ring.head & HEAD_ADDR;
> +	tail = dev_priv->ring.tail & TAIL_ADDR;
> +	mask = dev_priv->ring.tail_mask;
> +
> +	seq_printf(m, "RingHead :  %08x\n", head);
> +	seq_printf(m, "RingTail :  %08x\n", tail);
> +	seq_printf(m, "RingMask :  %08x\n", mask);
> +	seq_printf(m, "RingSize :  %08lx\n", dev_priv->ring.Size);
> +	seq_printf(m, "Acthd :  %08x\n", I915_READ(ACTHD_I965));

This needs to be I915_READ(IS_I965G(dev) ? ACTHD_I965 : ACTHD)

As an aside, is there a standalone utility to decode the ringbuf and
batchbuffers? 
-ickle




More information about the Intel-gfx mailing list