]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use wait_for() to wait for Punit to change GPU freq on VLV
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Jun 2013 14:43:24 +0000 (17:43 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 2 Jul 2013 13:40:23 +0000 (15:40 +0200)
commit7d9ae9155467fb234f0c4d589a0b8929b5cbda8f
tree69a670adc45ceed249b06d3c1b50a27d776b2952
parent8ab56414b3279b5fb613eea1bc97a6d8dd1a0de6
drm/i915: Use wait_for() to wait for Punit to change GPU freq on VLV

Use wait_for() instead of the open coded loop to avoid spreading the
same old timeout related bugs.

This changes the loop to use msleep(1) instead of udelay(10) when the
Punit had not yet completed the frequency change. In practice that
doesn't seem to hurt performance as the Punit appears to be ready pretty
much always.

Also give the status bit a name, instead of using the magic number 1.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_pm.c