summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2015-09-25 12:06:47 +0100
committerJohn Harrison <John.C.Harrison@Intel.com>2016-06-28 17:19:16 +0100
commit4f52a62a47369a88e6d68efa86384df61b032a2d (patch)
tree7371935de452bbbbea72d61ded34d86cdf0e7f9d
parent4800b00c6079665bf3c27198fb91cdc48a9656a0 (diff)
drm/i915/guc: Expose GuC-maintained statistics
For: VIZ-2021 Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_guc_submission.c20
-rw-r--r--drivers/gpu/drm/i915/intel_guc_fwif.h7
2 files changed, 25 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 438d15128d93..23f3080f26db 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -168,9 +168,27 @@ 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;
+ int i;
+
+ gsp = kmap_atomic(i915_gem_object_get_page(ctx_obj, LRC_GUCSHR_PN));
+ 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 7032bae1b700..32324f8d0454 100644
--- a/drivers/gpu/drm/i915/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
@@ -258,7 +258,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*/