]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Ensure that while(INREG()) are bounded (v2)
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Aug 2010 10:01:35 +0000 (11:01 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:35 +0000 (11:24 -0700)
commitcd565a50c9be30afb9dcb58c6dbe50e9813ed7d2
tree982a622078194b438bf75d0ee4c77cf1e4f0260e
parent0c5157130bf5e3d46b4cf674f92cdb5d198195c6
drm/i915: Ensure that while(INREG()) are bounded (v2)

Add a new macro, wait_for, to simplify the act of waiting on a register
to change state. wait_for() takes three arguments, the condition to
inspect on every loop, the maximum amount of time to wait and whether to
yield the cpu for a length of time after each check.

v2: Upgrade failure messages to DRM_ERROR on the suggestion of
Eric Anholt. We do not expect to hit these conditions as they reflect
programming errors, so if we do we want to be notified.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_lvds.c