[Intel-gfx] [PATCH 7/8] drm/i915: Show RING registers through debugfs

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 4 13:11:12 UTC 2016


On Tue, Oct 04, 2016 at 03:35:20PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > +		rcu_read_unlock();
> > +
> > +		addr = intel_engine_get_active_head(engine);
> > +		seq_printf(m, "\tACTHD:  0x%08x_%08x\n",
> > +			   upper_32_bits(addr), lower_32_bits(addr));
> > +		addr = intel_engine_get_last_batch_head(engine);
> > +		seq_printf(m, "\tBBADDR: 0x%08x_%08x\n",
> > +			   upper_32_bits(addr), lower_32_bits(addr));
> > +
> > +		if (i915.enable_execlists) {
> > +			u32 ptr, read, write;
> >
> 
> Ok, in here I am thinking that the requests in ports would be intresting
> also. But it seems impossible to sample the ports without taking
> locks. And we don't want to go there.

It's even worse than that. execlist_port[] are entirely unlocked and
only updated by the sole owner. However... We can read them under the
rcu guarantee that the requests themselves will not disappear (with the
exception that the contents may be reallocated - but not explode!).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list