[Intel-gfx] [PATCH 1/1] drm/i915: Copy user requested buffers into the error state

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 24 21:17:20 UTC 2017

On Tue, Jan 24, 2017 at 11:44:26AM -0800, Ben Widawsky wrote:
> On 17-01-24 13:16:56, Mika Kuoppala wrote:
> >+		for (j = 0; j < ee->user_bo_count; j++)
> >+			print_error_obj(m, dev_priv->engine[i],
> >+					"user", ee->user_bo[j]);
> >+
> We'll need a way to be able to figure out which bo corresponds to what we asked
> to capture. I'm not quite sure what the best way to do this is, but I'd like
> userspace to have to make minimal effort to figure it out.

You know the offset of each bo you request and that matches the output
here. That's how I checked the selected bo was captured in my testcase.

Given that the offset (in this context) will be fixed from submission to
hang and you are accurately tracking the offset of each bo in each
context, that should be enough to reverse map from the error to
userspace struct. Hmm, actually identifying which context hung is not
obvious from the error state at the moment.

I think we should also start sketching ideas to make error state parsing
easier. A more structured output, json like?

Chris Wilson, Intel Open Source Technology Centre

More information about the Intel-gfx mailing list