Skip to content

Commit 9f01b25

Browse files
committed
drm/i915: Busy-spin wait_for condition in atomic contexts
During modesetting, we need to wait for the hardware to report readiness by polling the registers. Normally, we call msleep() between reads, because some state changes may take a whole vblank or more to complete. However during a panic, we are in an atomic context and cannot sleep. Instead, busy spin polling the termination condition. References: https://bugzilla.kernel.org/show_bug.cgi?id=31772 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent 6ee3b5a commit 9f01b25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/intel_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
ret__ = -ETIMEDOUT; \
4040
break; \
4141
} \
42-
if (W && !in_dbg_master()) msleep(W); \
42+
if (W && !(in_atomic() || in_dbg_master())) msleep(W); \
4343
} \
4444
ret__; \
4545
})

0 commit comments

Comments
 (0)