drm/i915/guc: Add capture region into intel_guc_log
authorAlan Previn <alan.previn.teres.alexis@intel.com>
Mon, 21 Mar 2022 16:45:22 +0000 (09:45 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 22 Mar 2022 17:33:30 +0000 (10:33 -0700)
commitdaff407a083da2a50bc5a46c07756a9ccd7842df
tree1ff45251c4bddecdbda7f171c4e74c2cb5df5ce2
parent580329a3a4a2ffb5168b43e7a1fc1610e6bcae98
drm/i915/guc: Add capture region into intel_guc_log

GuC log buffer regions for debug-log-events, crash-dumps and
error-state-capture are all part of a single bo allocation that
also includes the guc_log_buffer_state structures. Now that we
support it, increase the size allocation for error-capture.

Since the error-capture region is accessed at non-deterministic
times (as part of GuC triggered context reset) while debug-log-
events region is accessed as part of relay logging or during
debugfs triggered dumps, move the mapping and unmapping of the
shared buffer into intel_guc_log_create and intel_guc_log_destroy
so that it's always mapped throughout life of GuC operation.

Additionally, while here, update the guc log region layout
diagram to follow the order according to the enum definition
as per the GuC interface.

NOTE: A future effort to visit (part of baseline code) is that
buf_addr should be updated to be a io_sys_map and use the
io_sys_map wrapper functions to access the various GuC log
buffer regions.

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321164527.2500062-9-alan.previn.teres.alexis@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
drivers/gpu/drm/i915/gt/uc/intel_guc_log.h