[1/2] drm/i915: Show the logical context ring state on dumping
diff mbox series

Message ID 20190915203701.29163-1-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [1/2] drm/i915: Show the logical context ring state on dumping
Related show

Commit Message

Chris Wilson Sept. 15, 2019, 8:37 p.m. UTC
Include the active context register state when dumping the engine.

Suggested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_engine_cs.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Summers, Stuart Sept. 16, 2019, 5:32 p.m. UTC | #1
On Sun, 2019-09-15 at 21:37 +0100, Chris Wilson wrote:
> Include the active context register state when dumping the engine.
> 
> Suggested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Reviewed-by: Stuart Summers <stuart.summers@intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index a8014c59b388..3c176b0f4b45 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -1404,6 +1404,11 @@ void intel_engine_dump(struct intel_engine_cs
> *engine,
>  			   rq->timeline->hwsp_offset);
>  
>  		print_request_ring(m, rq);
> +
> +		if (rq->hw_context->lrc_reg_state) {
> +			drm_printf(m, "Logical Ring Context:\n");
> +			hexdump(m, rq->hw_context->lrc_reg_state,
> PAGE_SIZE);
> +		}
>  	}
>  	spin_unlock_irqrestore(&engine->active.lock, flags);
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index a8014c59b388..3c176b0f4b45 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1404,6 +1404,11 @@  void intel_engine_dump(struct intel_engine_cs *engine,
 			   rq->timeline->hwsp_offset);
 
 		print_request_ring(m, rq);
+
+		if (rq->hw_context->lrc_reg_state) {
+			drm_printf(m, "Logical Ring Context:\n");
+			hexdump(m, rq->hw_context->lrc_reg_state, PAGE_SIZE);
+		}
 	}
 	spin_unlock_irqrestore(&engine->active.lock, flags);