瀏覽代碼

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>
Chris Wilson 14 年之前
父節點
當前提交
9f01b25048
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/i915/intel_drv.h

+ 1 - 1
drivers/gpu/drm/i915/intel_drv.h

@@ -39,7 +39,7 @@
 			ret__ = -ETIMEDOUT;				\
 			break;						\
 		}							\
-		if (W && !in_dbg_master()) msleep(W);			\
+		if (W && !(in_atomic() || in_dbg_master())) msleep(W);	\
 	}								\
 	ret__;								\
 })