• Akash Goel's avatar
    drm/i915: Add stats for GuC log buffer flush interrupts · 5aa1ee4b
    Akash Goel authored
    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: default avatarAkash Goel <akash.goel@intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    5aa1ee4b
i915_irq.c 132 KB