[Intel-gfx] [PATCH 02/10] drm/i915: move vbetool invoked ier stuff

Chris Wilson chris at chris-wilson.co.uk
Sat Apr 21 11:26:53 CEST 2012


On Fri, 20 Apr 2012 18:23:24 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> This extra bit of interrupt enabling code doesn't belong in the wait
> seqno function. If anything we should pull it out to a helper so the
> throttle code can also use it. The history is a bit vague, but I am
> going to attempt to just dump it, unless someone can argue otherwise.
> 
> Removing this allows for a shared lock free wait seqno function. To keep
> tabs on this issue though, the IER value is stored on error capture
> (recommended by Chris Wilson)
> 
> Signed-off-by: Ben Widawsky <benjamin.widawsky at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |    1 +
>  drivers/gpu/drm/i915/i915_drv.h     |    1 +
>  drivers/gpu/drm/i915/i915_gem.c     |   14 --------------
>  drivers/gpu/drm/i915/i915_irq.c     |    7 ++++++-
>  4 files changed, 8 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 35462df..5c4af9a 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -791,6 +791,7 @@ static int i915_error_state(struct seq_file *m, void *unused)
>  		   error->time.tv_usec);
>  	seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device);
>  	seq_printf(m, "EIR: 0x%08x\n", error->eir);
> +	seq_printf(m, "EIR: 0x%08x\n", error->ier);
>  	seq_printf(m, "PGTBL_ER: 0x%08x\n", error->pgtbl_er);

Thinking about this a bit more, the error state also needs to know if we
had anybody waiting on a ring->irq_queue.
	error->waiting = 0;
	for_each_ring(ring)
		if (waitqueue_active(&ring->irq_queue)
			error->waiting |= 1 << ring->id;
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list