[Intel-gfx] [PATCH v2 00/11] Support for sustained capturing of GuC firmware logs
akash.goel at intel.com
akash.goel at intel.com
Mon Jun 27 12:16:47 UTC 2016
From: Akash Goel <akash.goel at intel.com>
GuC firmware log its debug messages into a Host-GuC shared memory buffer
and when the buffer is half full it sends a Flush interrupt to Host.
GuC firmware expects that while it is writing to 2nd half of the buffer,
first half would get consumed by Host and then get a flush completed
acknowledgement from Host, so that it does not end up doing any overwrite
causing loss of logs.
So far Flush interrupt wasn't enabled on Host side & User could capture the
contents/snapshot of log buffer through 'i915_guc_log_dump' debugfs iface.
But this couldn't meet couple of key requirements, especially of Validation,
first is to ensure capturing of all boot time logs even with high verbosity
level and second is to enable capturing of logs in a sustained manner like
for the entire duration of a workload.
Now Driver will enable Flush interrupt and on receving it, would copy the
contents of log buffer into its local buffer. The size of local buffer would
be big enough to contain multiple snapshots of the log buffer giving ample
time to User to pull boot time messages.
Have added a debugfs interface '/sys/kernel/debug/dri/guc_log' for User to
collect the logs. Availed relay framework to implement this interface, where
Driver will have to just use a relay API to store snapshots of GuC log buffer
in a buffer managed by relay. The relay buffer will be operated in a mode
where the old data, not yet collected by User, will be overwritten if buffer
becomes full. So the behavior exhibited will be equivalent to 'dmesg -c'.
Besides mmap method, through which User can directly access the relay
buffer contents, relay also supports the 'poll' method. Through the 'poll'
call on log file, User can come to know whenever a new snapshot of the log
buffer is taken by Driver, so can run in tandem with the Driver and thus
capture logs in a sustained/streaming manner, without any loss of data.
v2: Rebased to the latest drm-intel-nightly.
Akash Goel (4):
drm/i915: Add low level set of routines for programming PM IER/IIR/IMR
register set
drm/i915: Add a relay backed debugfs interface for capturing GuC logs
drm/i915: New module param to control the size of buffer used for
storing GuC firmware logs
drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer
Chris Wilson (1):
drm/i915: Support to create write combined type vmaps
Sagar Arun Kamble (6):
drm/i915: Decouple GuC log setup from verbosity parameter
drm/i915: Add GuC ukernel logging related fields to fw interface file
drm/i915: Support for GuC interrupts
drm/i915: Handle log buffer flush interrupt event from GuC
drm/i915: Forcefully flush GuC log buffer on reset
drm/i915: Debugfs support for GuC logging control
drivers/gpu/drm/i915/i915_debugfs.c | 35 +++-
drivers/gpu/drm/i915/i915_drv.h | 6 +-
drivers/gpu/drm/i915/i915_gem.c | 57 ++++--
drivers/gpu/drm/i915/i915_gem_dmabuf.c | 2 +-
drivers/gpu/drm/i915/i915_guc_submission.c | 304 ++++++++++++++++++++++++++++-
drivers/gpu/drm/i915/i915_irq.c | 169 ++++++++++++++--
drivers/gpu/drm/i915/i915_params.c | 5 +
drivers/gpu/drm/i915/i915_params.h | 1 +
drivers/gpu/drm/i915/i915_reg.h | 11 ++
drivers/gpu/drm/i915/intel_drv.h | 9 +
drivers/gpu/drm/i915/intel_guc.h | 10 +
drivers/gpu/drm/i915/intel_guc_fwif.h | 53 +++++
drivers/gpu/drm/i915/intel_guc_loader.c | 12 +-
drivers/gpu/drm/i915/intel_lrc.c | 8 +-
drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
15 files changed, 643 insertions(+), 41 deletions(-)
--
1.9.2
More information about the Intel-gfx
mailing list