]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drm/i915: Avoid using msleep under kdb and wait_for()
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Aug 2010 11:16:25 +0000 (12:16 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Sep 2010 09:13:30 +0000 (10:13 +0100)
wait_for() uses msleep() to yield the cpu whilst spinning waiting for a
register to change. kdb asserts that mode changes are atomic and so
prohibits msleep. The alternative would be to use mdelay or to simply
probe the register more often instead of busy waiting.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_drv.h

index 686ed533dbe32a3d15e4b28c18976940777ce2db..1ca3c9e2667a2f49c3afb009b4b8198437b68a77 100644 (file)
@@ -41,7 +41,7 @@
                        ret__ = -ETIMEDOUT;                             \
                        break;                                          \
                }                                                       \
-               if (W) msleep(W);                                       \
+               if (W && !in_dbg_master()) msleep(W);                   \
        }                                                               \
        ret__;                                                          \
 })