All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/17] Support for sustained capturing of GuC firmware logs
@ 2016-07-10 13:41 akash.goel
  2016-07-10 13:41 ` [PATCH 01/17] drm/i915: Decouple GuC log setup from verbosity parameter akash.goel
                   ` (17 more replies)
  0 siblings, 18 replies; 87+ messages in thread
From: akash.goel @ 2016-07-10 13:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: Akash Goel

From: Akash Goel <akash.goel@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 follows the half-full draining protocol where it 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.

v3: Aligned with the modification of late debugfs registration, at the end of
    i915 Driver load. Did cleanup as per Tvrtko's review comments, added 3
    new patches to optimize the log-buffer flush interrupt handling, gather
    and report the logging related stats.

v4: Added 2 new patches to further optimize the log-buffer flush interrupt
    handling. Did cleanup as per Chris's review comments, fixed couple of
    issues related to clearing of Guc2Host message register. Switched to
    no-overwrite mode for the relay.

Akash Goel (10):
  drm/i915: New structure to contain GuC logging related fields
  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
  drm/i915: New lock to serialize the Host2GuC actions
  drm/i915: Add stats for GuC log buffer flush interrupts
  drm/i915: Increase GuC log buffer size to reduce flush interrupts
  drm/i915: Optimization to reduce the sampling time of GuC log buffer
  drm/i915: Use rt priority kthread to do GuC log buffer sampling

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        |  60 +++-
 drivers/gpu/drm/i915/i915_drv.c            |   2 +
 drivers/gpu/drm/i915/i915_drv.h            |   8 +-
 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 | 554 ++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_irq.c            | 159 +++++++--
 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           |   6 +
 drivers/gpu/drm/i915/intel_guc.h           |  30 +-
 drivers/gpu/drm/i915/intel_guc_fwif.h      |  82 ++++-
 drivers/gpu/drm/i915/intel_guc_loader.c    |  12 +-
 drivers/gpu/drm/i915/intel_lrc.c           |   8 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c    |   6 +-
 16 files changed, 934 insertions(+), 69 deletions(-)

-- 
1.9.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 87+ messages in thread

end of thread, other threads:[~2016-07-21  9:44 UTC | newest]

Thread overview: 87+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-10 13:41 [PATCH v4 00/17] Support for sustained capturing of GuC firmware logs akash.goel
2016-07-10 13:41 ` [PATCH 01/17] drm/i915: Decouple GuC log setup from verbosity parameter akash.goel
2016-07-11  9:37   ` Tvrtko Ursulin
2016-07-11 11:41     ` Goel, Akash
2016-07-11 11:50       ` Tvrtko Ursulin
2016-07-11 12:11         ` Goel, Akash
2016-07-11 13:07           ` Tvrtko Ursulin
2016-07-10 13:41 ` [PATCH 02/17] drm/i915: Add GuC ukernel logging related fields to fw interface file akash.goel
2016-07-10 13:41 ` [PATCH 03/17] drm/i915: New structure to contain GuC logging related fields akash.goel
2016-07-10 13:41 ` [PATCH 04/17] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set akash.goel
2016-07-11 10:04   ` Tvrtko Ursulin
2016-07-10 13:41 ` [PATCH 05/17] drm/i915: Support for GuC interrupts akash.goel
2016-07-11 10:30   ` Tvrtko Ursulin
2016-07-11 13:15     ` Goel, Akash
2016-07-11 13:23       ` Tvrtko Ursulin
2016-07-11 13:38         ` Goel, Akash
2016-07-11 13:43           ` Tvrtko Ursulin
2016-07-11 14:20             ` Goel, Akash
2016-07-10 13:41 ` [PATCH 06/17] drm/i915: Handle log buffer flush interrupt event from GuC akash.goel
2016-07-19 10:58   ` Tvrtko Ursulin
2016-07-20  3:29     ` Goel, Akash
2016-07-10 13:41 ` [PATCH 07/17] drm/i915: Add a relay backed debugfs interface for capturing GuC logs akash.goel
2016-07-10 17:07   ` kbuild test robot
2016-07-19 11:31   ` Tvrtko Ursulin
2016-07-20  3:41     ` Goel, Akash
2016-07-10 13:41 ` [PATCH 08/17] drm/i915: Forcefully flush GuC log buffer on reset akash.goel
2016-07-19 11:12   ` Tvrtko Ursulin
2016-07-19 11:21     ` Chris Wilson
2016-07-20  4:21       ` Goel, Akash
2016-07-20  9:12         ` Chris Wilson
2016-07-20  9:48           ` Goel, Akash
2016-07-10 13:41 ` [PATCH 09/17] drm/i915: Debugfs support for GuC logging control akash.goel
2016-07-10 17:59   ` kbuild test robot
2016-07-19 11:24   ` Tvrtko Ursulin
2016-07-20  4:42     ` Goel, Akash
2016-07-20  9:08       ` Tvrtko Ursulin
2016-07-20  9:32         ` Goel, Akash
2016-07-20  9:47           ` Tvrtko Ursulin
2016-07-20 10:12             ` Goel, Akash
2016-07-20 10:40               ` Tvrtko Ursulin
2016-07-20 11:29                 ` Goel, Akash
2016-07-20 11:50                   ` Tvrtko Ursulin
2016-07-20 12:16                     ` Goel, Akash
2016-07-10 13:41 ` [PATCH 10/17] drm/i915: New module param to control the size of buffer used for storing GuC firmware logs akash.goel
2016-07-15 11:15   ` Tvrtko Ursulin
2016-07-15 15:36     ` Goel, Akash
2016-07-18 10:06       ` Tvrtko Ursulin
2016-07-18 12:19         ` Goel, Akash
2016-07-18 13:06           ` Tvrtko Ursulin
2016-07-18 13:40             ` Goel, Akash
2016-07-10 13:41 ` [PATCH 11/17] drm/i915: Support to create write combined type vmaps akash.goel
2016-07-15 11:31   ` Tvrtko Ursulin
2016-07-15 11:45     ` Chris Wilson
2016-07-15 16:30     ` Goel, Akash
2016-07-18 10:18       ` Tvrtko Ursulin
2016-07-10 13:41 ` [PATCH 12/17] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer akash.goel
2016-07-10 13:41 ` [PATCH 13/17] drm/i915: New lock to serialize the Host2GuC actions akash.goel
2016-07-15 11:40   ` Tvrtko Ursulin
2016-07-15 15:51     ` Goel, Akash
2016-07-18 10:12       ` Tvrtko Ursulin
2016-07-18 10:46         ` Goel, Akash
2016-07-18 11:18           ` Tvrtko Ursulin
2016-07-18 11:31             ` Goel, Akash
2016-07-18 11:36               ` Tvrtko Ursulin
2016-07-10 13:41 ` [PATCH 14/17] drm/i915: Add stats for GuC log buffer flush interrupts akash.goel
2016-07-15 11:51   ` Tvrtko Ursulin
2016-07-15 15:58     ` Goel, Akash
2016-07-18 10:16       ` Tvrtko Ursulin
2016-07-18 10:59         ` Goel, Akash
2016-07-18 11:33           ` Tvrtko Ursulin
2016-07-18 11:47             ` Goel, Akash
2016-07-10 13:41 ` [PATCH 15/17] drm/i915: Increase GuC log buffer size to reduce " akash.goel
2016-07-15 11:57   ` Tvrtko Ursulin
2016-07-15 14:42     ` Goel, Akash
2016-07-15 15:07       ` Tvrtko Ursulin
2016-07-15 16:20         ` Goel, Akash
2016-07-18  9:54           ` Tvrtko Ursulin
2016-07-18 12:35             ` Goel, Akash
2016-07-18 13:08               ` Tvrtko Ursulin
2016-07-10 13:41 ` [PATCH 16/17] drm/i915: Optimization to reduce the sampling time of GuC log buffer akash.goel
2016-07-10 13:41 ` [PATCH 17/17] drm/i915: Use rt priority kthread to do GuC log buffer sampling akash.goel
2016-07-20 19:34   ` Chris Wilson
2016-07-21  3:41     ` Goel, Akash
2016-07-21  5:43       ` Chris Wilson
2016-07-21  6:18         ` Goel, Akash
2016-07-21  9:44           ` Tvrtko Ursulin
2016-07-10 14:12 ` ✗ Ro.CI.BAT: failure for Support for sustained capturing of GuC firmware logs (rev5) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.