drm/i915/pmu: Replace open coded kstat_irqs() copy
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2020 19:25:50 +0000 (20:25 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Dec 2020 15:19:32 +0000 (16:19 +0100)
Driver code has no business with the internals of the irq descriptor.

Aside of that the count is per interrupt line and therefore takes
interrupts from other devices into account which share the interrupt line
and are not handled by the graphics driver.

Replace it with a pmu private count which only counts interrupts which
originate from the graphics card.

To avoid atomics or heuristics of some sort make the counter field
'unsigned long'. That limits the count to 4e9 on 32bit which is a lot and
postprocessing can easily deal with the occasional wraparound.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: https://lore.kernel.org/r/20201210194043.957046529@linutronix.de

No differences found