[Intel-gfx] [RFC 14/37] drm/i915/guc: Expose GuC-maintained statistics
John.C.Harrison at Intel.com
John.C.Harrison at Intel.com
Mon Nov 23 03:41:49 PST 2015
From: Dave Gordon <david.s.gordon at intel.com>
For: VIZ-2021
Signed-off-by: Dave Gordon <david.s.gordon at intel.com>
---
drivers/gpu/drm/i915/i915_guc_submission.c | 19 ++++++++++++++++++-
drivers/gpu/drm/i915/intel_guc_fwif.h | 7 ++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 38c431d..d11bba9 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -170,9 +170,26 @@ host2guc_preempt(struct i915_guc_client *client,
data[4] = guc->execbuf_client->priority; // victim priority
data[5] = guc->execbuf_client->ctx_index; // victim ctx/wq
data[6] = i915_gem_obj_ggtt_offset(ctx_obj) + LRC_GUCSHR_PN*PAGE_SIZE;
+ data[7] = 0;
ret = host2guc_action(guc, data, 7);
- WARN_ON(ret);
+ if (WARN_ON(ret)) {
+ u32 *gsp = kmap_atomic(i915_gem_object_get_page(ctx_obj, LRC_GUCSHR_PN));
+ int i;
+
+ DRM_DEBUG_DRIVER("GuC preemption request data:\n");
+ for (i = 0; i < 8; i += 4)
+ DRM_DEBUG_DRIVER("\t%08x %08x %08x %08x\n",
+ data[i+0], data[i+1], data[i+2], data[i+3]);
+
+ DRM_DEBUG_DRIVER("GuC per-context shared data @ 0x%llx:\n",
+ i915_gem_obj_ggtt_offset(ctx_obj) + LRC_GUCSHR_PN*PAGE_SIZE);
+ for (i = 0; i < 32; i += 4)
+ DRM_DEBUG_DRIVER("\t%08x %08x %08x %08x\n",
+ gsp[i+0], gsp[i+1], gsp[i+2], gsp[i+3]);
+
+ kunmap_atomic(gsp);
+ }
return ret;
}
diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
index 48da20d..110496a 100644
--- a/drivers/gpu/drm/i915/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
@@ -233,7 +233,12 @@ struct guc_process_desc {
u32 wq_status;
u32 engine_presence;
u32 priority;
- u32 reserved[30];
+ u32 reserved1[4];
+ u32 reserved2[5];
+ u32 items_parsed,
+ items_collaped,
+ items_cancelled;
+ u32 reserved3[18];
} __packed;
/* engine id and context id is packed into guc_execlist_context.context_id*/
--
1.9.1
More information about the Intel-gfx
mailing list