]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: don't queue PM events we won't process
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Thu, 15 Aug 2013 14:50:01 +0000 (11:50 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 23 Aug 2013 12:52:29 +0000 (14:52 +0200)
commit60611c137641af41895828cfc74f5be64ed69b49
tree151ed550b03b1555fb982ffbe6148074db22bae1
parent333a820416ccb0e24974b6ebe7d447c0c28c7b76
drm/i915: don't queue PM events we won't process

On SNB/IVB/VLV we only call gen6_rps_irq_handler if one of the IIR
bits set is part of GEN6_PM_RPS_EVENTS, but at gen6_rps_irq_handler we
add all the enabled IIR bits to the work queue, not only the ones that
are part of GEN6_PM_RPS_EVENTS. But then gen6_pm_rps_work only
processes GEN6_PM_RPS_EVENTS, so it's useless to add anything that's
not GEN6_PM_RPS_EVENTS to the work queue.

As a bonus, gen6_rps_irq_handler looks more similar to
hsw_pm_irq_handler, so we may be able to merge them in the future.

v2: - Add a WARN in case we queued something we're not going to
      process.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c