From: Ville Syrjälä <[email protected]>

We already have GEN8_GT_IRQS to teel whether any of the GT
interrupts need processing. If none of the relevant bits are
set skip the whole gen8_gt_irq_handler(), as a micro optimization.
We already do the equivalent for the display irqs, so why not
do it for GT irqs as well.

Originally gen8_gt_irq_handler() was a static inline, so this
probably wouldn't have made sense. But these days it's a proper
function call every time.

Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/i915_irq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 0762017d9089..448c4730d178 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -455,7 +455,8 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
        }
 
        /* Find, queue (onto bottom-halves), then clear each source */
-       gen8_gt_irq_handler(to_gt(dev_priv), master_ctl);
+       if (master_ctl & GEN8_GT_IRQS)
+               gen8_gt_irq_handler(to_gt(dev_priv), master_ctl);
 
        /* IRQs are synced during runtime_suspend, we don't require a wakeref */
        if (master_ctl & ~GEN8_GT_IRQS) {
-- 
2.56.0

Reply via email to