[Intel-gfx] [RFC 06/12] drm/i915: Store GuC ukernel logs in the relay buffer
akash.goel at intel.com
akash.goel at intel.com
Fri May 27 19:42:57 UTC 2016
From: Akash Goel <akash.goel at intel.com>
Using the buffer managed by relay to store the snapshots of GuC log
buffer. The snapshot will be taken when GuC ukernel sends a log buffer
flush interrupt.
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_guc_submission.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 379e2843..d6d6ead 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -773,14 +773,30 @@ err:
static void guc_move_to_next_buf(struct intel_guc *guc)
{
+#ifdef CONFIG_DEBUG_FS
+ /* nothing to do here, all managed by relay */
return;
+#endif
}
static void* guc_get_write_buffer(struct intel_guc *guc)
{
void *base_addr = NULL;
+#ifdef CONFIG_DEBUG_FS
+ if (!guc->log_relay_chan)
+ return NULL;
+
+ /* Get the pointer to relay sub buffer and copy data into it ourselves.
+ * Could have used the relay_write() but we anyways need the pointer
+ * to update the state data in first page so to be consistent directly
+ * write to all pages of sub buffer.
+ */
+ base_addr =
+ relay_reserve(guc->log_relay_chan, guc->log_obj->base.size);
+
return base_addr;
+#endif
}
static void guc_read_update_log_buffer(struct drm_device *dev)
--
1.9.2
More information about the Intel-gfx
mailing list