[Intel-gfx] [PATCH 05/14] drm/i915: Handle log buffer flush interrupt event from GuC

2016-07-02 Thread akash . goel
y the state structure data in first page. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.c| 13 + drivers/gpu/drm/i915/i915_guc_submission.c | 87 ++ drivers/gpu/drm/i915/i915_irq.c| 6 ++- dr

[Intel-gfx] [PATCH 02/14] drm/i915: New structure to contain GuC logging related fields

2016-07-02 Thread akash . goel
From: Akash Goel So far there were 2 fields related to GuC logs in 'intel_guc' structure. For the support of capturing GuC logs & storing them in a local buffer, multiple new fields would have to be added. This warrants a separate structure to contain the fields related to GuC

[Intel-gfx] [PATCH 08/14] drm/i915: Debugfs support for GuC logging control

2016-07-02 Thread akash . goel
verbosity info. v2: Add a forceful flush, to collect left over logs, on disabling logging. Useful for Validation. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_debugfs.c| 32 - drivers/gpu/drm/i915/i915_guc_submission.c | 57

[Intel-gfx] [PATCH 01/14] drm/i915: Add GuC ukernel logging related fields to fw interface file

2016-07-02 Thread akash . goel
buffer state structure more elaborate. (Tvrtko) Rename LOGBUFFERFLUSH action to LOG_BUFFER_FLUSH for consistency. (Tvrtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/intel_guc_fwif.h | 64 +++ 1 file changed, 64

[Intel-gfx] [PATCH v3 00/14] Support for sustained capturing of GuC firmware logs

2016-07-02 Thread akash . goel
From: Akash Goel 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

[Intel-gfx] [PATCH 09/14] drm/i915: New module param to control the size of buffer used for storing GuC firmware logs

2016-07-02 Thread akash . goel
From: Akash Goel On recieving the log buffer flush interrupt from GuC firmware, Driver stores the snapshot of the log buffer in a local buffer, from which Userspace can pull the logs. By default Driver store, up to, 4 snapshots of the log buffer in a local buffer (managed by relay). Added a new

[Intel-gfx] [PATCH 14/14] drm/i915: Optimization to reduce the sampling time of GuC log buffer

2016-07-02 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full, so Driver doesn't really need to sample the complete buffer and can just copy only the newly written data by GuC into the local buffer, i.e. as per the read & write pointer values. Mor

[Intel-gfx] [PATCH 11/14] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer

2016-07-02 Thread akash . goel
From: Akash Goel Host needs to sample the GuC log buffer on every flush interrupt from GuC. To ensure that we always get the up-to-date data from log buffer, its better to access the buffer through an uncached CPU mapping. Also the way buffer is accessed from GuC & Host side, manually d

[Intel-gfx] [PATCH 06/14] drm/i915: Add a relay backed debugfs interface for capturing GuC logs

2016-07-02 Thread akash . goel
From: Akash Goel Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the User to capture GuC firmware logs. Availed relay framework to implement the interface, where Driver will have to just use a relay API to store snapshots of the GuC log buffer in the buffer manage

[Intel-gfx] [PATCH 10/14] drm/i915: Support to create write combined type vmaps

2016-07-02 Thread akash . goel
v2: Remove the redundant braces around pin count check and fix the marker in documentation (Chris) Signed-off-by: Chris Wilson Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h | 4 ++- drivers/gpu/drm/i915/i915_gem.c | 57 + drive

[Intel-gfx] [PATCH 13/14] drm/i915: Add stats for GuC log buffer flush interrupts

2016-07-02 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full. GuC firmware also tracks how many times the buffer overflowed. It would be useful to maintain a statistics of how many flush interrupts were received and for which type of log buffer, along with

[Intel-gfx] [PATCH 12/14] drm/i915: New lock to serialize the Host2GuC actions

2016-07-02 Thread akash . goel
From: Akash Goel With the addition of new Host2GuC actions related to GuC logging, there is a need of a lock to serialize them, as they can execute concurrently with each other and also with other existing actions. Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 3

[Intel-gfx] [PATCH 07/14] drm/i915: Forcefully flush GuC log buffer on reset

2016-07-02 Thread akash . goel
: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 32 ++ drivers/gpu/drm/i915/i915_irq.c| 2 ++ drivers/gpu/drm/i915/intel_guc.h | 1 + 3 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b

[Intel-gfx] [PATCH 03/14] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set

2016-07-02 Thread akash . goel
From: Akash Goel So far PM IER/IIR/IMR registers were being used only for Turbo related interrupts. But interrupts coming from GuC also use the same set. As a precursor to supporting GuC interrupts, added new low level routines so as to allow sharing the programming of PM IER/IIR/IMR registers

[Intel-gfx] [PATCH 04/14] drm/i915: Support for GuC interrupts

2016-07-02 Thread akash . goel
-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 5 ++ drivers/gpu/drm/i915/i915_irq.c| 108 +++-- drivers/gpu/drm/i915/i915_reg.h| 11 +++ drivers/gpu/drm/i915/intel_d

[Intel-gfx] [PATCH 09/17] drm/i915: Debugfs support for GuC logging control

2016-07-10 Thread akash . goel
verbosity info. v2: Add a forceful flush, to collect left over logs, on disabling logging. Useful for Validation. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_debugfs.c| 32 - drivers/gpu/drm/i915/i915_guc_submission.c | 57

[Intel-gfx] [PATCH 10/17] drm/i915: New module param to control the size of buffer used for storing GuC firmware logs

2016-07-10 Thread akash . goel
From: Akash Goel On recieving the log buffer flush interrupt from GuC firmware, Driver stores the snapshot of the log buffer in a local buffer, from which Userspace can pull the logs. By default Driver store, up to, 4 snapshots of the log buffer in a local buffer (managed by relay). Added a new

[Intel-gfx] [PATCH 01/17] drm/i915: Decouple GuC log setup from verbosity parameter

2016-07-10 Thread akash . goel
d on the value of module paramter guc_log_level. v2: Update commit message to describe the constraint with allocation of log buffer at runtime. (Tvrtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 3 --- drivers/gpu/drm/

[Intel-gfx] [PATCH 07/17] drm/i915: Add a relay backed debugfs interface for capturing GuC logs

2016-07-10 Thread akash . goel
From: Akash Goel Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the User to capture GuC firmware logs. Availed relay framework to implement the interface, where Driver will have to just use a relay API to store snapshots of the GuC log buffer in the buffer manage

[Intel-gfx] [PATCH 12/17] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer

2016-07-10 Thread akash . goel
From: Akash Goel Host needs to sample the GuC log buffer on every flush interrupt from GuC. To ensure that we always get the up-to-date data from log buffer, its better to access the buffer through an uncached CPU mapping. Also the way buffer is accessed from GuC & Host side, manually d

[Intel-gfx] [PATCH 08/17] drm/i915: Forcefully flush GuC log buffer on reset

2016-07-10 Thread akash . goel
Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 32 ++ drivers/gpu/drm/i915/i915_irq.c| 2 ++ drivers/gpu/drm/i915/intel_guc.h | 1 + 3 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 05/17] drm/i915: Support for GuC interrupts

2016-07-10 Thread akash . goel
- Rename guc_events to pm_guc_events so as to be indicative of the register/control block it is associated with. (Chris) - Add handling for back to back log buffer flush interrupts. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 1 + dri

[Intel-gfx] [PATCH 06/17] drm/i915: Handle log buffer flush interrupt event from GuC

2016-07-10 Thread akash . goel
by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.c| 13 +++ drivers/gpu/drm/i915/i915_guc_submission.c | 148 + drivers/gpu/drm/i915/i915_irq.c| 5 +- drivers/gpu/drm/i915/intel_guc.h | 3 + 4 file

[Intel-gfx] [PATCH 11/17] drm/i915: Support to create write combined type vmaps

2016-07-10 Thread akash . goel
v2: Remove the redundant braces around pin count check and fix the marker in documentation (Chris) Signed-off-by: Chris Wilson Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 4 ++- drivers/gpu/drm/i915/i915_gem.c| 57 +++--- d

[Intel-gfx] [PATCH 14/17] drm/i915: Add stats for GuC log buffer flush interrupts

2016-07-10 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full. GuC firmware also tracks how many times the buffer overflowed. It would be useful to maintain a statistics of how many flush interrupts were received and for which type of log buffer, along with

[Intel-gfx] [PATCH 15/17] drm/i915: Increase GuC log buffer size to reduce flush interrupts

2016-07-10 Thread akash . goel
From: Akash Goel In cases where GuC generate logs at a very high rate, correspondingly the rate of flush interrupts is also very high. So far total 8 pages were allocated for storing both ISR & DPC logs. As per the half-full draining protocol followed by GuC, by doubling the number of pages,

[Intel-gfx] [PATCH 13/17] drm/i915: New lock to serialize the Host2GuC actions

2016-07-10 Thread akash . goel
From: Akash Goel With the addition of new Host2GuC actions related to GuC logging, there is a need of a lock to serialize them, as they can execute concurrently with each other and also with other existing actions. Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 3

[Intel-gfx] [PATCH 04/17] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set

2016-07-10 Thread akash . goel
From: Akash Goel So far PM IER/IIR/IMR registers were being used only for Turbo related interrupts. But interrupts coming from GuC also use the same set. As a precursor to supporting GuC interrupts, added new low level routines so as to allow sharing the programming of PM IER/IIR/IMR registers

[Intel-gfx] [PATCH v4 00/17] Support for sustained capturing of GuC firmware logs

2016-07-10 Thread akash . goel
From: Akash Goel 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

[Intel-gfx] [PATCH 02/17] drm/i915: Add GuC ukernel logging related fields to fw interface file

2016-07-10 Thread akash . goel
buffer state structure more elaborate. (Tvrtko) Rename LOGBUFFERFLUSH action to LOG_BUFFER_FLUSH for consistency. (Tvrtko) v3: Add GuC log buffer layout diagram for more clarity. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 03/17] drm/i915: New structure to contain GuC logging related fields

2016-07-10 Thread akash . goel
From: Akash Goel So far there were 2 fields related to GuC logs in 'intel_guc' structure. For the support of capturing GuC logs & storing them in a local buffer, multiple new fields would have to be added. This warrants a separate structure to contain the fields related to GuC

[Intel-gfx] [PATCH 16/17] drm/i915: Optimization to reduce the sampling time of GuC log buffer

2016-07-10 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full, so Driver doesn't really need to sample the complete buffer and can just copy only the newly written data by GuC into the local buffer, i.e. as per the read & write pointer values. Mor

[Intel-gfx] [PATCH 17/17] drm/i915: Use rt priority kthread to do GuC log buffer sampling

2016-07-10 Thread akash . goel
From: Akash Goel In cases where GuC firmware generates logs at a very high rate, Driver too needs to be fast enough to sample the log buffer in time for the half-full draining protocol to be effective and prevent any overflows of log buffer. So the scheduling latency of bottom half, where

[Intel-gfx] [PATCH 02/20] drm/i915: Add GuC ukernel logging related fields to fw interface file

2016-08-11 Thread akash . goel
buffer state structure more elaborate. (Tvrtko) Rename LOGBUFFERFLUSH action to LOG_BUFFER_FLUSH for consistency. (Tvrtko) v3: Add GuC log buffer layout diagram for more clarity. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 03/20] drm/i915: New structure to contain GuC logging related fields

2016-08-11 Thread akash . goel
From: Akash Goel So far there were 2 fields related to GuC logs in 'intel_guc' structure. For the support of capturing GuC logs & storing them in a local buffer, multiple new fields would have to be added. This warrants a separate structure to contain the fields related to GuC

[Intel-gfx] [PATCH 04/20] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set

2016-08-11 Thread akash . goel
From: Akash Goel So far PM IER/IIR/IMR registers were being used only for Turbo related interrupts. But interrupts coming from GuC also use the same set. As a precursor to supporting GuC interrupts, added new low level routines so as to allow sharing the programming of PM IER/IIR/IMR registers

[Intel-gfx] [PATCH 05/20] drm/i915: Support for GuC interrupts

2016-08-11 Thread akash . goel
igned-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 5 ++ drivers/gpu/drm/i915/i915_irq.c| 100 +++-- drivers/gpu/drm/i915/i915_reg.h| 11 +

[Intel-gfx] [PATCH v5 00/20] Support for sustained capturing of GuC firmware logs

2016-08-11 Thread akash . goel
From: Akash Goel 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

[Intel-gfx] [PATCH 01/20] drm/i915: Decouple GuC log setup from verbosity parameter

2016-08-11 Thread akash . goel
d on the value of module paramter guc_log_level. v2: Update commit message to describe the constraint with allocation of log buffer at runtime. (Tvrtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_guc_submission.c

[Intel-gfx] [PATCH 06/20] drm/i915: Handle log buffer flush interrupt event from GuC

2016-08-11 Thread akash . goel
stroy the wq under the same condition in which it was created, pass dev_piv pointer instead of dev to newly added GuC function, add more comments & rename variable for clarity. (Tvrtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH 08/20] drm/i915: Add a relay backed debugfs interface for capturing GuC logs

2016-08-11 Thread akash . goel
From: Akash Goel Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the User to capture GuC firmware logs. Availed relay framework to implement the interface, where Driver will have to just use a relay API to store snapshots of the GuC log buffer in the buffer manage

[Intel-gfx] [PATCH 09/20] drm/i915: New lock to serialize the Host2GuC actions

2016-08-11 Thread akash . goel
From: Akash Goel With the addition of new Host2GuC actions related to GuC logging, there is a need of a lock to serialize them, as they can execute concurrently with each other and also with other existing actions. v2: Use mutex in place of spinlock to serialize, as sleep can happen while

[Intel-gfx] [PATCH 10/20] drm/i915: Add stats for GuC log buffer flush interrupts

2016-08-11 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full. GuC firmware also tracks how many times the buffer overflowed. It would be useful to maintain a statistics of how many flush interrupts were received and for which type of log buffer, along with

[Intel-gfx] [PATCH 07/20] relay: Use per CPU constructs for the relay channel buffer pointers

2016-08-11 Thread akash . goel
From: Akash Goel relay essentially needs to maintain the per CPU array of channel buffer pointers but it manually creates that array. Instead its better to avail the per CPU constructs, provided by the kernel, to allocate & access the array of pointer to channel buffers. v2: Include in rel

[Intel-gfx] [PATCH 14/20] drm/i915: Forcefully flush GuC log buffer on reset

2016-08-11 Thread akash . goel
particularly useful to understand that why the GPU reset was initiated. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_gpu_error.c | 2 ++ drivers/gpu/drm/i915/i915_guc_submission.c | 27 +++ drivers/gpu/drm/i915/intel_guc.h

[Intel-gfx] [PATCH 19/20] drm/i915: Use SSE4.1 movntdqa based memcpy for sampling GuC log buffer

2016-08-11 Thread akash . goel
From: Akash Goel In order to have fast reads from the GuC log buffer, used SSE4.1 movntdqa based memcpy function i915_memcpy_from_wc. GuC log buffer has a WC type vmalloc mapping and copying using movntqda from WC type memory is almost as fast as reading from WB memory. This will further reduce

[Intel-gfx] [PATCH 18/20] drm/i915: Use SSE4.1 movntdqa to accelerate reads from WC memory

2016-08-11 Thread akash . goel
ntqda, use kernel_fpu_begin. Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Damien Lespiau Cc: Mika Kuoppala Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/Makefile | 3 ++ drivers/gpu/drm/i915/i915_drv.c| 2 + drivers/gpu/drm/i915/i915_drv.h| 3 ++ drivers/gpu/drm/i915/i915_memc

[Intel-gfx] [PATCH 17/20] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer

2016-08-11 Thread akash . goel
From: Akash Goel Host needs to sample the GuC log buffer on every flush interrupt from GuC. To ensure that we always get the up-to-date data from log buffer, its better to access the buffer through an uncached CPU mapping. Also the way buffer is accessed from GuC & Host side, manually d

[Intel-gfx] [PATCH 11/20] drm/i915: Optimization to reduce the sampling time of GuC log buffer

2016-08-11 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full, so Driver doesn't really need to sample the complete buffer and can just copy only the newly written data by GuC into the local buffer, i.e. as per the read & write pointer values. Mor

[Intel-gfx] [PATCH 15/20] drm/i915: Debugfs support for GuC logging control

2016-08-11 Thread akash . goel
Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_debugfs.c| 44 - drivers/gpu/drm/i915/i915_guc_submission.c | 63 ++ drivers/gpu/drm/i915/intel_guc.h | 1 + 3 files changed, 107 insertions(+), 1 deletion(-) diff --git a/drivers

[Intel-gfx] [PATCH 20/20] drm/i915: Early creation of relay channel for capturing boot time logs

2016-08-11 Thread akash . goel
From: Akash Goel As per the current i915 Driver load sequence, debugfs registration is done at the end and so the relay channel debugfs file is also created after that but the GuC firmware is loaded much earlier in the sequence. As a result Driver could miss capturing the boot-time logs of GuC

[Intel-gfx] [PATCH 12/20] drm/i915: Increase GuC log buffer size to reduce flush interrupts

2016-08-11 Thread akash . goel
From: Akash Goel In cases where GuC generate logs at a very high rate, correspondingly the rate of flush interrupts is also very high. So far total 8 pages were allocated for storing both ISR & DPC logs. As per the half-full draining protocol followed by GuC, by doubling the number of pages,

[Intel-gfx] [PATCH 16/20] drm/i915: Support to create write combined type vmaps

2016-08-11 Thread akash . goel
rfluous BUG_ON.(Tvrtko) v4: - Rename the enums and clean up the pin_map function. (Chris) Signed-off-by: Chris Wilson Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 9 - drivers/gpu/drm/i915/i915_gem.c| 58 +++--- driver

[Intel-gfx] [PATCH 13/20] drm/i915: Augment i915 error state to include the dump of GuC log buffer

2016-08-11 Thread akash . goel
From: Akash Goel Added the dump of GuC log buffer to i915 error state, as the contents of GuC log buffer would also be useful to determine that why the GPU reset was triggered. Suggested-by: Chris Wilson Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu

[Intel-gfx] [PATCH 04/18] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set

2016-08-15 Thread akash . goel
From: Akash Goel So far PM IER/IIR/IMR registers were being used only for Turbo related interrupts. But interrupts coming from GuC also use the same set. As a precursor to supporting GuC interrupts, added new low level routines so as to allow sharing the programming of PM IER/IIR/IMR registers

[Intel-gfx] [PATCH 07/18] relay: Use per CPU constructs for the relay channel buffer pointers

2016-08-15 Thread akash . goel
From: Akash Goel relay essentially needs to maintain the per CPU array of channel buffer pointers but it manually creates that array. Instead its better to avail the per CPU constructs, provided by the kernel, to allocate & access the array of pointer to channel buffers. v2: Include in rel

[Intel-gfx] [PATCH 03/18] drm/i915: New structure to contain GuC logging related fields

2016-08-15 Thread akash . goel
From: Akash Goel So far there were 2 fields related to GuC logs in 'intel_guc' structure. For the support of capturing GuC logs & storing them in a local buffer, multiple new fields would have to be added. This warrants a separate structure to contain the fields related to GuC

[Intel-gfx] [PATCH 14/18] drm/i915: Forcefully flush GuC log buffer on reset

2016-08-15 Thread akash . goel
particularly useful to understand that why the GPU reset was initiated. v2: - Avoid the wait via flush_work, to serialize against an ongoing log buffer flush, from the error state capture path. (Chris) - Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 13/18] drm/i915: Augment i915 error state to include the dump of GuC log buffer

2016-08-15 Thread akash . goel
From: Akash Goel Added the dump of GuC log buffer to i915 error state, as the contents of GuC log buffer would also be useful to determine that why the GPU reset was triggered. v2: - For uniformity use existing helper function print_error_obj() to dump out contents of GuC log buffer, pretty

[Intel-gfx] [PATCH 17/18] drm/i915: Use SSE4.1 movntdqa based memcpy for sampling GuC log buffer

2016-08-15 Thread akash . goel
From: Akash Goel In order to have fast reads from the GuC log buffer, used SSE4.1 movntdqa based memcpy function i915_memcpy_from_wc. GuC log buffer has a WC type vmalloc mapping and copying using movntqda from WC type memory is almost as fast as reading from WB memory. This will further reduce

[Intel-gfx] [PATCH 06/18] drm/i915: Handle log buffer flush interrupt event from GuC

2016-08-15 Thread akash . goel
n routines of GuC logging. (Chris) - Validate the log buffer size value retrieved from state structure and do some minor cleanup. (Tvrtko) - Fix error/warnings reported by checkpatch. (Tvrtko) - Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_s

[Intel-gfx] [PATCH v6 00/18] Support for sustained capturing of GuC firmware logs

2016-08-15 Thread akash . goel
From: Akash Goel 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

[Intel-gfx] [PATCH 01/18] drm/i915: Decouple GuC log setup from verbosity parameter

2016-08-15 Thread akash . goel
d on the value of module parameter guc_log_level. v2: Update commit message to describe the constraint with allocation of log buffer at runtime. (Tvrtko) v3: Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/

[Intel-gfx] [PATCH 12/18] drm/i915: Increase GuC log buffer size to reduce flush interrupts

2016-08-15 Thread akash . goel
From: Akash Goel In cases where GuC generate logs at a very high rate, correspondingly the rate of flush interrupts is also very high. So far total 8 pages were allocated for storing both ISR & DPC logs. As per the half-full draining protocol followed by GuC, by doubling the number of pages,

[Intel-gfx] [PATCH 09/18] drm/i915: New lock to serialize the Host2GuC actions

2016-08-15 Thread akash . goel
From: Akash Goel With the addition of new Host2GuC actions related to GuC logging, there is a need of a lock to serialize them, as they can execute concurrently with each other and also with other existing actions. v2: Use mutex in place of spinlock to serialize, as sleep can happen while

[Intel-gfx] [PATCH 08/18] drm/i915: Add a relay backed debugfs interface for capturing GuC logs

2016-08-15 Thread akash . goel
From: Akash Goel Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the User to capture GuC firmware logs. Availed relay framework to implement the interface, where Driver will have to just use a relay API to store snapshots of the GuC log buffer in the buffer manage

[Intel-gfx] [PATCH 05/18] drm/i915: Support for GuC interrupts

2016-08-15 Thread akash . goel
: - Move the log buffer flush interrupt related stuff to the following patch so as to do only generic bits in this patch. (Tvrtko) - Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_guc_submi

[Intel-gfx] [PATCH 16/18] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer

2016-08-15 Thread akash . goel
From: Akash Goel Host needs to sample the GuC log buffer on every flush interrupt from GuC. To ensure that we always get the up-to-date data from log buffer, its better to access the buffer through an uncached CPU mapping. Also the way buffer is accessed from GuC & Host side, manually d

[Intel-gfx] [PATCH 10/18] drm/i915: Add stats for GuC log buffer flush interrupts

2016-08-15 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full. GuC firmware also tracks how many times the buffer overflowed. It would be useful to maintain a statistics of how many flush interrupts were received and for which type of log buffer, along with

[Intel-gfx] [PATCH 15/18] drm/i915: Debugfs support for GuC logging control

2016-08-15 Thread akash . goel
rtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_debugfs.c| 44 - drivers/gpu/drm/i915/i915_guc_submission.c | 62 ++ drivers/gpu/drm/i915/intel_guc.h | 1 + 3 files changed, 106 insert

[Intel-gfx] [PATCH 11/18] drm/i915: Optimization to reduce the sampling time of GuC log buffer

2016-08-15 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full, so Driver doesn't really need to sample the complete buffer and can just copy only the newly written data by GuC into the local buffer, i.e. as per the read & write pointer values. Mor

[Intel-gfx] [PATCH 02/18] drm/i915: Add GuC ukernel logging related fields to fw interface file

2016-08-15 Thread akash . goel
buffer state structure more elaborate & rename LOGBUFFERFLUSH action to LOG_BUFFER_FLUSH for consistency.(Tvrtko) v3: Add GuC log buffer layout diagram for more clarity. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/

[Intel-gfx] [PATCH 18/18] drm/i915: Early creation of relay channel for capturing boot time logs

2016-08-15 Thread akash . goel
From: Akash Goel As per the current i915 Driver load sequence, debugfs registration is done at the end and so the relay channel debugfs file is also created after that but the GuC firmware is loaded much earlier in the sequence. As a result Driver could miss capturing the boot-time logs of GuC

[Intel-gfx] [PATCH 04/19] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set

2016-08-17 Thread akash . goel
From: Akash Goel So far PM IER/IIR/IMR registers were being used only for Turbo related interrupts. But interrupts coming from GuC also use the same set. As a precursor to supporting GuC interrupts, added new low level routines so as to allow sharing the programming of PM IER/IIR/IMR registers

[Intel-gfx] [PATCH v7 00/19] Support for sustained capturing of GuC firmware logs

2016-08-17 Thread akash . goel
From: Akash Goel 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, 1st half would

[Intel-gfx] [PATCH 01/19] drm/i915: Decouple GuC log setup from verbosity parameter

2016-08-17 Thread akash . goel
d on the value of module parameter guc_log_level. v2: Update commit message to describe the constraint with allocation of log buffer at runtime. (Tvrtko) v3: Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/

[Intel-gfx] [PATCH 03/19] drm/i915: New structure to contain GuC logging related fields

2016-08-17 Thread akash . goel
From: Akash Goel So far there were 2 fields related to GuC logs in 'intel_guc' structure. For the support of capturing GuC logs & storing them in a local buffer, multiple new fields would have to be added. This warrants a separate structure to contain the fields related to GuC

[Intel-gfx] [PATCH 02/19] drm/i915: Add GuC ukernel logging related fields to fw interface file

2016-08-17 Thread akash . goel
buffer state structure more elaborate & rename LOGBUFFERFLUSH action to LOG_BUFFER_FLUSH for consistency.(Tvrtko) v3: Add GuC log buffer layout diagram for more clarity. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/

[Intel-gfx] [PATCH 06/19] drm/i915: Handle log buffer flush interrupt event from GuC

2016-08-17 Thread akash . goel
the log packet, as much possible and let Userspace parser detect the anomaly. (Chris) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 186 + drivers/gpu/drm/i915/i915_irq.c| 28 - driver

[Intel-gfx] [PATCH 09/19] drm/i915: New lock to serialize the Host2GuC actions

2016-08-17 Thread akash . goel
From: Akash Goel With the addition of new Host2GuC actions related to GuC logging, there is a need of a lock to serialize them, as they can execute concurrently with each other and also with other existing actions. v2: Use mutex in place of spinlock to serialize, as sleep can happen while

[Intel-gfx] [PATCH 05/19] drm/i915: Support for GuC interrupts

2016-08-17 Thread akash . goel
nst the work queued by irq handler will be done by caller disabling the interrupt. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 5 +++ drivers/gpu/drm/i915/i915_irq.c

[Intel-gfx] [PATCH 07/19] relay: Use per CPU constructs for the relay channel buffer pointers

2016-08-17 Thread akash . goel
From: Akash Goel relay essentially needs to maintain the per CPU array of channel buffer pointers but it manually creates that array. Instead its better to avail the per CPU constructs, provided by the kernel, to allocate & access the array of pointer to channel buffers. v2: Include in rel

[Intel-gfx] [PATCH 08/19] drm/i915: Add a relay backed debugfs interface for capturing GuC logs

2016-08-17 Thread akash . goel
From: Akash Goel Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the User to capture GuC firmware logs. Availed relay framework to implement the interface, where Driver will have to just use a relay API to store snapshots of the GuC log buffer in the buffer manage

[Intel-gfx] [PATCH 14/19] drm/i915: Forcefully flush GuC log buffer on reset

2016-08-17 Thread akash . goel
particularly useful to understand that why the GPU reset was initiated. v2: - Avoid the wait via flush_work, to serialize against an ongoing log buffer flush, from the error state capture path. (Chris) - Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 12/19] drm/i915: Increase GuC log buffer size to reduce flush interrupts

2016-08-17 Thread akash . goel
From: Akash Goel In cases where GuC generate logs at a very high rate, correspondingly the rate of flush interrupts is also very high. So far total 8 pages were allocated for storing both ISR & DPC logs. As per the half-full draining protocol followed by GuC, by doubling the number of pages,

[Intel-gfx] [PATCH 13/19] drm/i915: Augment i915 error state to include the dump of GuC log buffer

2016-08-17 Thread akash . goel
From: Akash Goel Added the dump of GuC log buffer to i915 error state, as the contents of GuC log buffer would also be useful to determine that why the GPU reset was triggered. v2: - For uniformity use existing helper function print_error_obj() to dump out contents of GuC log buffer, pretty

[Intel-gfx] [PATCH 11/19] drm/i915: Optimization to reduce the sampling time of GuC log buffer

2016-08-17 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full, so Driver doesn't really need to sample the complete buffer and can just copy only the newly written data by GuC into the local buffer, i.e. as per the read & write pointer values. Mor

[Intel-gfx] [PATCH 10/19] drm/i915: Add stats for GuC log buffer flush interrupts

2016-08-17 Thread akash . goel
From: Akash Goel GuC firmware sends an interrupt to flush the log buffer when it becomes half full. GuC firmware also tracks how many times the buffer overflowed. It would be useful to maintain a statistics of how many flush interrupts were received and for which type of log buffer, along with

[Intel-gfx] [PATCH 17/19] drm/i915: Use SSE4.1 movntdqa based memcpy for sampling GuC log buffer

2016-08-17 Thread akash . goel
From: Akash Goel In order to have fast reads from the GuC log buffer, used SSE4.1 movntdqa based memcpy function i915_memcpy_from_wc. GuC log buffer has a WC type vmalloc mapping and copying using movntqda from WC type memory is almost as fast as reading from WB memory. This will further reduce

[Intel-gfx] [PATCH 15/19] drm/i915: Debugfs support for GuC logging control

2016-08-17 Thread akash . goel
rtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_debugfs.c| 44 - drivers/gpu/drm/i915/i915_guc_submission.c | 62 ++ drivers/gpu/drm/i915/intel_guc.h | 1

[Intel-gfx] [PATCH 19/19] drm/i915: Sync against the GuC log buffer flush work item on system suspend

2016-08-17 Thread akash . goel
From: Akash Goel The GuC log buffer flush work item does a register access to send the ack to GuC and this work item, if not synced before suspend, can potentially get executed after the GFX device is suspended. The work item function uses rpm_get/rpm_put calls around the Hw access, this covers

[Intel-gfx] [PATCH 16/19] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer

2016-08-17 Thread akash . goel
From: Akash Goel Host needs to sample the GuC log buffer on every flush interrupt from GuC. To ensure that we always get the up-to-date data from log buffer, its better to access the buffer through an uncached CPU mapping. Also the way buffer is accessed from GuC & Host side, manually d

[Intel-gfx] [PATCH 18/19] drm/i915: Early creation of relay channel for capturing boot time logs

2016-08-17 Thread akash . goel
From: Akash Goel As per the current i915 Driver load sequence, debugfs registration is done at the end and so the relay channel debugfs file is also created after that but the GuC firmware is loaded much earlier in the sequence. As a result Driver could miss capturing the boot-time logs of GuC

[Intel-gfx] [PATCH 04/19] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set

2016-08-19 Thread akash . goel
From: Akash Goel So far PM IER/IIR/IMR registers were being used only for Turbo related interrupts. But interrupts coming from GuC also use the same set. As a precursor to supporting GuC interrupts, added new low level routines so as to allow sharing the programming of PM IER/IIR/IMR registers

[Intel-gfx] [PATCH 06/19] drm/i915: Handle log buffer flush interrupt event from GuC

2016-08-19 Thread akash . goel
better readability. (Tvrtko) Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 189 + drivers/gpu/drm/i915/i915_irq.c| 28 - drivers/gpu/drm/i915/intel_guc.h | 4 + 3 files changed, 22

[Intel-gfx] [PATCH v8 00/19] Support for sustained capturing of GuC firmware logs

2016-08-19 Thread akash . goel
From: Akash Goel 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, 1st half would

[Intel-gfx] [PATCH 01/19] drm/i915: Decouple GuC log setup from verbosity parameter

2016-08-19 Thread akash . goel
d on the value of module parameter guc_log_level. v2: Update commit message to describe the constraint with allocation of log buffer at runtime. (Tvrtko) v3: Rebase. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/

[Intel-gfx] [PATCH 05/19] drm/i915: Support for GuC interrupts

2016-08-19 Thread akash . goel
nst the work queued by irq handler will be done by caller disabling the interrupt. Signed-off-by: Sagar Arun Kamble Signed-off-by: Akash Goel Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 5 +++ drivers/

[Intel-gfx] [PATCH 08/19] drm/i915: Add a relay backed debugfs interface for capturing GuC logs

2016-08-19 Thread akash . goel
From: Akash Goel Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the User to capture GuC firmware logs. Availed relay framework to implement the interface, where Driver will have to just use a relay API to store snapshots of the GuC log buffer in the buffer manage

[Intel-gfx] [PATCH 03/19] drm/i915: New structure to contain GuC logging related fields

2016-08-19 Thread akash . goel
From: Akash Goel So far there were 2 fields related to GuC logs in 'intel_guc' structure. For the support of capturing GuC logs & storing them in a local buffer, multiple new fields would have to be added. This warrants a separate structure to contain the fields related to GuC

  1   2   3   4   5   >