]> git.karo-electronics.de Git - karo-tx-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>
Tue, 20 Aug 2013 18:24:10 +0000 (20:24 +0200)
commit6ae3352a68981ee3c9c3553121d7d6d39151472b
tree9238a93cd0fa07f53441ec6b7308e5b3228f3706
parent8e848b777a5c210eff87a6654db39fbedf5b7d17
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