summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_guc.h
diff options
context:
space:
mode:
authorAkash Goel <akash.goel@intel.com>2016-10-12 21:54:36 +0530
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2016-10-25 09:34:23 +0100
commit5aa1ee4b12bee127576b3ea41eeafda2c45bc118 (patch)
treee05bbfd54560869a83f6119e98b03b3eed5d8a8b /drivers/gpu/drm/i915/intel_guc.h
parent5dd7989bbd28a76f1740344e4e2d01dc848158a9 (diff)
downloadlinux-5aa1ee4b12bee127576b3ea41eeafda2c45bc118.tar.gz
linux-5aa1ee4b12bee127576b3ea41eeafda2c45bc118.tar.bz2
linux-5aa1ee4b12bee127576b3ea41eeafda2c45bc118.zip
drm/i915: Add stats for GuC log buffer flush interrupts
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 the overflow count of each buffer type. Augmented i915_log_info debugfs to report back these statistics. v2: - Update the logic to detect multiple overflows between the 2 flush interrupts and also log a message for overflow (Tvrtko) - Track the number of times there was no free sub buffer to capture the GuC log buffer. (Tvrtko) v3: - Fix the printf field width for overflow counter, set it to 10 as per the max value of u32, which takes 10 digits in decimal form. (Tvrtko) v4: - Move the log buffer overflow handling to a new function for better readability. (Tvrtko) Signed-off-by: Akash Goel <akash.goel@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.h')
-rw-r--r--drivers/gpu/drm/i915/intel_guc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 907d13a71c23..d034c9845a22 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -130,6 +130,13 @@ struct intel_guc_log {
struct workqueue_struct *flush_wq;
struct work_struct flush_work;
struct rchan *relay_chan;
+
+ /* logging related stats */
+ u32 capture_miss_count;
+ u32 flush_interrupt_count;
+ u32 prev_overflow_count[GUC_MAX_LOG_BUFFER];
+ u32 total_overflow_count[GUC_MAX_LOG_BUFFER];
+ u32 flush_count[GUC_MAX_LOG_BUFFER];
};
struct intel_guc {