[Intel-gfx] [PATCH 13/20] drm/i915: Augment i915 error state to include the dump of GuC log buffer

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 12 15:32:34 UTC 2016


On Fri, Aug 12, 2016 at 04:20:03PM +0100, Tvrtko Ursulin wrote:
> 
> On 12/08/16 07:25, akash.goel at intel.com wrote:
> >From: Akash Goel <akash.goel at intel.com>
> >
> >Added the dump of GuC log buffer to i915 error state, as the contents of
> >GuC log buffer would also be useful to determine that why the GPU reset
> >was triggered.
> >
> >Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
> >Signed-off-by: Akash Goel <akash.goel at intel.com>
> >---
> >  drivers/gpu/drm/i915/i915_drv.h       |  1 +
> >  drivers/gpu/drm/i915/i915_gpu_error.c | 27 +++++++++++++++++++++++++++
> >  2 files changed, 28 insertions(+)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> >index 28ffac5..4bd3790 100644
> >--- a/drivers/gpu/drm/i915/i915_drv.h
> >+++ b/drivers/gpu/drm/i915/i915_drv.h
> >@@ -509,6 +509,7 @@ struct drm_i915_error_state {
> >  	struct intel_overlay_error_state *overlay;
> >  	struct intel_display_error_state *display;
> >  	struct drm_i915_error_object *semaphore_obj;
> >+	struct drm_i915_error_object *guc_log_obj;
> >
> >  	struct drm_i915_error_engine {
> >  		int engine_id;
> >diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> >index eecb870..561b523 100644
> >--- a/drivers/gpu/drm/i915/i915_gpu_error.c
> >+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> >@@ -546,6 +546,21 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
> >  		}
> >  	}
> >
> >+	if ((obj = error->guc_log_obj)) {
> >+		err_printf(m, "GuC log buffer = 0x%08x\n",
> >+			   lower_32_bits(obj->gtt_offset));
> >+		for (i = 0; i < obj->page_count; i++) {
> >+			for (elt = 0; elt < PAGE_SIZE/4; elt += 4) {
> 
> Should the condition be PAGE_SIZE / 16 ? I am not sure, looks like
> it is counting in u32 * 4 chunks so it might be. Or I might be
> confused..

There's (or will be) a function to dump the error object in a uniform
manner. This patch is obsolete.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list