From: Akash Goel <akash.goel@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx> Signed-off-by: Akash Goel <akash.goel@xxxxxxxxx> --- 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx