drm/i915: Convert sandybridge_pcode_*() to use intel_wait_for_register()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 30 Jun 2016 14:32:45 +0000 (15:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 30 Jun 2016 14:41:59 +0000 (15:41 +0100)
commit3f5582dd845be5af2d1de01b99796abda9ecbdd9
tree478ab3bf5ba4dc40b70de1a3c684a7bf4192c81f
parent1758b90e38f53b93821c908201826e825a37cb65
drm/i915: Convert sandybridge_pcode_*() to use intel_wait_for_register()

We want to replace the inline wait_for() with an out-of-line hybrid
busy/sleep wait_for() in the hopes of speeding up the communication wit
the PCode unit.

Indeed, on my i5-2500s, __gen6_update_ring_freq improves from
6,080,661ns to 8172ns.

v2: Missed using _fw variants for sandybridge_pcode_read()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1467297225-21379-2-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_pm.c