* [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us()
@ 2026-12-02 15:40 Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us() Sebastian Brzezinka
` (24 more replies)
0 siblings, 25 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
This is an attempt to get rid of the i915 wait_for() family of macros
(wait_for(), wait_for_us(), wait_for_atomic(), wait_for_atomic_us()
and their _wait_for*() variants in i915_wait_util.h) and use the
core poll_timeout_us() and poll_timeout_us_atomic() helpers from
<linux/iopoll.h> instead.
Jani Nikula suggested this direction when he split the macros out into
i915_wait_util.h, in commit 65805c2ed74e ("drm/i915: split out
i915_wait_util.h"), which says: "Many of the various wait macro usages
could likely be refactored to use poll_timeout_us()."
This is not a purely mechanical change. The core helpers behave
differently from the i915 macros in a few ways, and I tried to document
each one in the commit message of the patch where it matters.
This series was prepared with the help of an AI, mostly because of the
large number of small edits.
Sebastian Brzezinka (25):
drm/i915: Convert wait_for() wrappers to poll_timeout_us()
drm/i915: Convert remaining intel_uncore.c wait_for() users to
poll_timeout_us()
drm/i915/guc: Convert intel_guc_send_mmio() to poll_timeout_us()
drm/i915/guc: Convert CTB response wait_for()/wait_for_us() to
poll_timeout_us()
drm/i915/gsc: Convert proxy waits to poll_timeout_us()
drm/i915/guc: Convert request alloc waits to poll_timeout_us()
drm/i915/guc: Convert guc_wait_ucode() to poll_timeout_us()
drm/i915/guc: Convert slpc_reset() to poll_timeout_us()
drm/i915/gsc: Convert HECI packet submit waits to poll_timeout_us()
drm/i915/huc: Update stale wait_for() comment reference
drm/i915/rps: Convert wait_for()/wait_for_atomic() to
poll_timeout_us()
drm/i915/gt: Convert wait_for()/wait_for_atomic() to poll_timeout_us()
drm/i915/gt: Convert wait_for_atomic() to poll_timeout_us_atomic()
drm/i915/gt: Convert wait_for_atomic_us()/wait_for() to
poll_timeout_us*()
drm/i915/gt: Convert _wait_for_atomic()/wait_for*() to
poll_timeout_us*()
drm/i915/gt: Convert pte_tlbinv() selftest wait to poll_timeout_us()
drm/i915/gvt: Convert wait_for_atomic() to poll_timeout_us_atomic()
drm/i915: Convert wait_for() to poll_timeout_us() in i915_debugfs.c
drm/i915: Convert _wait_for()/wait_for_atomic() to poll_timeout_us*()
drm/i915/pxp: Convert wait_for() to poll_timeout_us()
drm/i915: Convert wait_for() to poll_timeout_us() in vlv_suspend.c
drm/i915: Convert wait_for() to poll_timeout_us() in i915_request.c
selftests
drm/i915: Convert wait_for() to poll_timeout_us() in i915_selftest.c
drm/i915/selftests: Convert wait_for_us()/wait_for() to
poll_timeout_us()
drm/i915: Remove now-unused i915_wait_util.h
.../drm/i915/gt/intel_execlists_submission.c | 7 +-
drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 14 ++-
drivers/gpu/drm/i915/gt/intel_reset.c | 12 +-
.../gpu/drm/i915/gt/intel_ring_submission.c | 7 +-
drivers/gpu/drm/i915/gt/intel_rps.c | 6 +-
drivers/gpu/drm/i915/gt/selftest_execlists.c | 3 +-
drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 18 +--
drivers/gpu/drm/i915/gt/selftest_rps.c | 14 +--
drivers/gpu/drm/i915/gt/selftest_tlb.c | 6 +-
drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c | 7 +-
.../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 9 +-
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 5 +-
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 +-
drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 10 +-
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 5 +-
.../gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 +-
drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 +-
drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 5 +-
drivers/gpu/drm/i915/gvt/mmio_context.c | 6 +-
drivers/gpu/drm/i915/i915_debugfs.c | 4 +-
drivers/gpu/drm/i915/i915_request.c | 1 +
drivers/gpu/drm/i915/i915_wait_util.h | 119 ------------------
drivers/gpu/drm/i915/intel_pcode.c | 17 ++-
drivers/gpu/drm/i915/intel_uncore.c | 37 +++---
drivers/gpu/drm/i915/pxp/intel_pxp.c | 6 +-
drivers/gpu/drm/i915/selftests/i915_request.c | 15 ++-
.../gpu/drm/i915/selftests/i915_selftest.c | 10 +-
drivers/gpu/drm/i915/selftests/igt_spinner.c | 15 +--
drivers/gpu/drm/i915/selftests/intel_uncore.c | 4 +-
drivers/gpu/drm/i915/vlv_suspend.c | 9 +-
30 files changed, 154 insertions(+), 231 deletions(-)
delete mode 100644 drivers/gpu/drm/i915/i915_wait_util.h
--
2.56.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 18:38 ` Jani Nikula
2026-12-02 15:40 ` [RFC PATCH 02/25] drm/i915: Convert remaining intel_uncore.c wait_for() users " Sebastian Brzezinka
` (23 subsequent siblings)
24 siblings, 1 reply; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert __intel_wait_for_register_fw() and __intel_wait_for_register()
to poll_timeout_us() and poll_timeout_us_atomic().
The atomic fast path used to busy-loop and measure time with
local_clock(). poll_timeout_us_atomic() has no clock and only charges
its udelay() against the timeout, so use a 1us delay. The register
read time is not counted, so a wait that times out can last longer than
fast_timeout_us, and a wait that succeeds can be noticed up to 1us later.
The sleeping paths backed off from 10us to 1000us, but poll_timeout_us()
only takes a fixed interval. Poll every 1% of the timeout, capped at
1000us. A register that settles shortly after the fast phase is now
noticed up to that interval later, instead of after about 10us.
intel_de_wait_for_register() keeps its backoff: it runs with atomic
timeouts from a few us to several ms, and a fixed interval short enough
for the small waits would busy loop on the long ones.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/intel_uncore.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 170e83a8c9fc..77dd1bc435ba 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
*/
+#include <linux/iopoll.h>
#include <linux/pm_runtime.h>
#include <drm/drm_managed.h>
@@ -2761,7 +2762,8 @@ int __intel_wait_for_register_fw(struct intel_uncore *uncore,
u32 *out_value)
{
u32 reg_value = 0;
-#define done (((reg_value = intel_uncore_read_fw(uncore, reg)) & mask) == value)
+#define read_reg (reg_value = intel_uncore_read_fw(uncore, reg))
+#define done ((reg_value & mask) == value)
int ret;
/* Catch any overuse of this function */
@@ -2771,15 +2773,18 @@ int __intel_wait_for_register_fw(struct intel_uncore *uncore,
ret = -ETIMEDOUT;
if (fast_timeout_us && fast_timeout_us <= 20000)
- ret = _wait_for_atomic(done, fast_timeout_us, 0);
+ ret = poll_timeout_us_atomic(read_reg, done, 1, fast_timeout_us, false);
if (ret && slow_timeout_ms)
- ret = wait_for(done, slow_timeout_ms);
+ ret = poll_timeout_us(read_reg, done,
+ min_t(unsigned int, slow_timeout_ms * 10, 1000),
+ slow_timeout_ms * 1000, false);
if (out_value)
*out_value = reg_value;
return ret;
#undef done
+#undef read_reg
}
/**
@@ -2827,10 +2832,10 @@ int __intel_wait_for_register(struct intel_uncore *uncore,
spin_unlock_irq(&uncore->lock);
if (ret && slow_timeout_ms)
- ret = __wait_for(reg_value = intel_uncore_read_notrace(uncore,
- reg),
- (reg_value & mask) == value,
- slow_timeout_ms * 1000, 10, 1000);
+ ret = poll_timeout_us(reg_value = intel_uncore_read_notrace(uncore, reg),
+ (reg_value & mask) == value,
+ min_t(unsigned int, slow_timeout_ms * 10, 1000),
+ slow_timeout_ms * 1000, false);
/* just trace the final value */
trace_i915_reg_rw(false, reg, reg_value, sizeof(reg_value), true);
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 02/25] drm/i915: Convert remaining intel_uncore.c wait_for() users to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 18:34 ` Jani Nikula
2026-12-02 15:40 ` [RFC PATCH 03/25] drm/i915/guc: Convert intel_guc_send_mmio() " Sebastian Brzezinka
` (22 subsequent siblings)
24 siblings, 1 reply; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the remaining wait_for()/wait_for_atomic*() users in
intel_uncore.c and its selftest to poll_timeout_us*().
The atomic waits used to busy loop and measure time with local_clock().
poll_timeout_us_atomic() has no clock and only charges its udelay()
against the timeout, so use a 1us delay. Register read time is not
counted, so a wait that times out can last longer than before.
The sleeping waits backed off up to usleep_range(1000, 2000), but
poll_timeout_us() takes a fixed interval, so poll every 1000us.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/intel_uncore.c | 18 ++++++++++--------
drivers/gpu/drm/i915/selftests/intel_uncore.c | 4 +++-
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 77dd1bc435ba..23837b7277a8 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -36,7 +36,6 @@
#include "i915_iosf_mbi.h"
#include "i915_reg.h"
#include "i915_vgpu.h"
-#include "i915_wait_util.h"
#include "i915_mmio_range.h"
#include "intel_uncore_trace.h"
@@ -168,8 +167,8 @@ __wait_for_ack(const struct intel_uncore_forcewake_domain *d,
const u32 ack,
const u32 value)
{
- return wait_for_atomic((fw_ack(d) & ack) == value,
- FORCEWAKE_ACK_TIMEOUT_MS);
+ return poll_timeout_us_atomic(, (fw_ack(d) & ack) == value,
+ 1, FORCEWAKE_ACK_TIMEOUT_MS * 1000, false);
}
static inline int
@@ -387,7 +386,8 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)
* thread to wake up.
*/
drm_WARN_ONCE(&uncore->i915->drm,
- wait_for_atomic_us(gt_thread_status(uncore) == 0, 5000),
+ poll_timeout_us_atomic(, gt_thread_status(uncore) == 0,
+ 1, 5000, false),
"GT thread status wait timed out\n");
}
@@ -439,6 +439,7 @@ static inline u32 fifo_free_entries(struct intel_uncore *uncore)
static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)
{
u32 n;
+ int ret;
/* On VLV, FIFO will be shared by both SW and HW.
* So, we need to read the FREE_ENTRIES everytime */
@@ -448,9 +449,10 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)
n = uncore->fifo_count;
if (n <= GT_FIFO_NUM_RESERVED_ENTRIES) {
- if (wait_for_atomic((n = fifo_free_entries(uncore)) >
- GT_FIFO_NUM_RESERVED_ENTRIES,
- GT_FIFO_TIMEOUT_MS)) {
+ ret = poll_timeout_us_atomic(n = fifo_free_entries(uncore),
+ n > GT_FIFO_NUM_RESERVED_ENTRIES,
+ 1, GT_FIFO_TIMEOUT_MS * 1000, false);
+ if (ret) {
drm_dbg(&uncore->i915->drm,
"GT_FIFO timeout, entries: %u\n", n);
return;
@@ -2521,7 +2523,7 @@ static int sanity_check_mmio_access(struct intel_uncore *uncore)
* recovers, then give up.
*/
#define COND (__raw_uncore_read32(uncore, FORCEWAKE_MT) != ~0)
- if (wait_for(COND, 2000) == -ETIMEDOUT) {
+ if (poll_timeout_us(, COND, 1000, 2000 * 1000, false) == -ETIMEDOUT) {
drm_err(&i915->drm, "Device is non-operational; MMIO access returns 0xFFFFFFFF!\n");
return -EIO;
}
diff --git a/drivers/gpu/drm/i915/selftests/intel_uncore.c b/drivers/gpu/drm/i915/selftests/intel_uncore.c
index 514d2200751b..c80e923b2745 100644
--- a/drivers/gpu/drm/i915/selftests/intel_uncore.c
+++ b/drivers/gpu/drm/i915/selftests/intel_uncore.c
@@ -22,6 +22,8 @@
*
*/
+#include <linux/iopoll.h>
+
#include "../i915_selftest.h"
#include "gt/intel_gt.h"
@@ -259,7 +261,7 @@ static int live_forcewake_ops(void *arg)
}
/* We then expect the read to return 0 outside of the fw */
- if (wait_for(readl(reg) == 0, 100)) {
+ if (poll_timeout_us(, readl(reg) == 0, 1000, 100 * 1000, false)) {
pr_err("%s:%s=%0x, fw_domains 0x%x still up after 100ms!\n",
engine->name, r->name, readl(reg), fw_domains);
err = -ETIMEDOUT;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 03/25] drm/i915/guc: Convert intel_guc_send_mmio() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 02/25] drm/i915: Convert remaining intel_uncore.c wait_for() users " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 04/25] drm/i915/guc: Convert CTB response wait_for()/wait_for_us() " Sebastian Brzezinka
` (21 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in intel_guc_send_mmio() to poll_timeout_us().
poll_timeout_us() only takes a fixed interval, so poll every 1000us
instead of backing off from 10us. The wait stays 1000 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
index 1c2764440323..9cef066432f7 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
@@ -3,6 +3,8 @@
* Copyright © 2014-2019 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include "gem/i915_gem_lmem.h"
#include "gt/intel_gt.h"
#include "gt/intel_gt_irq.h"
@@ -12,7 +14,6 @@
#include "i915_drv.h"
#include "i915_irq.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_guc.h"
#include "intel_guc_ads.h"
#include "intel_guc_capture.h"
@@ -555,7 +556,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
FIELD_GET(GUC_HXG_MSG_0_ORIGIN, header) != GUC_HXG_ORIGIN_GUC || \
FIELD_GET(GUC_HXG_MSG_0_TYPE, header) != GUC_HXG_TYPE_NO_RESPONSE_BUSY; })
- ret = wait_for(done, 1000);
+ ret = poll_timeout_us(, done, 1000, 1000 * 1000, false);
if (unlikely(ret))
goto timeout;
if (unlikely(FIELD_GET(GUC_HXG_MSG_0_ORIGIN, header) !=
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 04/25] drm/i915/guc: Convert CTB response wait_for()/wait_for_us() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (2 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 03/25] drm/i915/guc: Convert intel_guc_send_mmio() " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 05/25] drm/i915/gsc: Convert proxy waits " Sebastian Brzezinka
` (20 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for_us()/wait_for() calls in wait_for_ct_request_update()
to poll_timeout_us_atomic()/poll_timeout_us().
GUC_CTB_RESPONSE_TIMEOUT_SHORT_MS is misnamed: its value is 10 and it
was passed to wait_for_us(), so it is in microseconds. Keep the value
and the name to keep this change minimal.
poll_timeout_us_atomic() only charges its udelay() against the timeout,
so use a 1us delay. poll_timeout_us() takes a fixed interval instead of
backing off from 10us, so poll every 1000us. The long wait stays 1000 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index 1c455d84bf9d..ee269c08f386 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -4,13 +4,13 @@
*/
#include <linux/circ_buf.h>
+#include <linux/iopoll.h>
#include <linux/ktime.h>
#include <linux/string_helpers.h>
#include <linux/time64.h>
#include <linux/timekeeping.h>
#include "i915_drv.h"
-#include "i915_wait_util.h"
#include "intel_guc_ct.h"
#include "intel_guc_print.h"
@@ -552,9 +552,9 @@ static int wait_for_ct_request_update(struct intel_guc_ct *ct, struct ct_request
(!(ct_enabled = intel_guc_ct_enabled(ct)) || \
FIELD_GET(GUC_HXG_MSG_0_ORIGIN, READ_ONCE(req->status)) == \
GUC_HXG_ORIGIN_GUC)
- err = wait_for_us(done, GUC_CTB_RESPONSE_TIMEOUT_SHORT_MS);
+ err = poll_timeout_us_atomic(, done, 1, GUC_CTB_RESPONSE_TIMEOUT_SHORT_MS, false);
if (err)
- err = wait_for(done, GUC_CTB_RESPONSE_TIMEOUT_LONG_MS);
+ err = poll_timeout_us(, done, 1000, GUC_CTB_RESPONSE_TIMEOUT_LONG_MS * 1000, false);
#undef done
if (!ct_enabled)
err = -ENODEV;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 05/25] drm/i915/gsc: Convert proxy waits to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (3 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 04/25] drm/i915/guc: Convert CTB response wait_for()/wait_for_us() " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 06/25] drm/i915/guc: Convert request alloc " Sebastian Brzezinka
` (19 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() calls in proxy_send_to_gsc() and
intel_gsc_proxy_request_handler() to poll_timeout_us(). poll_timeout_us()
only takes a fixed interval, so poll every 1000us instead of backing
off from 10us. The waits are 300 ms and 20 s.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c
index e7444ebc373e..ffa30fbd3d56 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c
@@ -4,6 +4,7 @@
*/
#include <linux/component.h>
+#include <linux/iopoll.h>
#include <drm/intel/i915_component.h>
#include <drm/intel/i915_gsc_proxy_mei_interface.h>
@@ -13,7 +14,6 @@
#include "i915_drv.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_gsc_proxy.h"
#include "intel_gsc_uc.h"
#include "intel_gsc_uc_heci_cmd_submit.h"
@@ -149,7 +149,7 @@ static int proxy_send_to_gsc(struct intel_gsc_uc *gsc)
if (!err) {
/* wait for the reply to show up */
- err = wait_for(*marker != 0, 300);
+ err = poll_timeout_us(, *marker != 0, 1000, 300 * 1000, false);
if (err)
gt_err(gt, "Failed to get a proxy reply from gsc\n");
}
@@ -265,7 +265,8 @@ int intel_gsc_proxy_request_handler(struct intel_gsc_uc *gsc)
assert_rpm_wakelock_held(gt->uncore->rpm);
/* when GSC is loaded, we can queue this before the component is bound */
- err = wait_for(gsc->proxy.component, GSC_PROXY_INIT_TIMEOUT_MS);
+ err = poll_timeout_us(, gsc->proxy.component, 1000,
+ GSC_PROXY_INIT_TIMEOUT_MS * 1000, false);
if (err) {
gt_err(gt, "GSC proxy component didn't bind within the expected timeout\n");
return -EIO;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 06/25] drm/i915/guc: Convert request alloc waits to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (4 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 05/25] drm/i915/gsc: Convert proxy waits " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 07/25] drm/i915/guc: Convert guc_wait_ucode() " Sebastian Brzezinka
` (18 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() calls in guc_request_alloc() and the
intel_guc_fast_request() selftest to poll_timeout_us().
poll_timeout_us() only takes a fixed interval, so poll every 1000us
instead of backing off from 10us. The waits are 1500 ms and 1000 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++--
drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 788e59cdfac9..92795cc19f48 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -4,6 +4,7 @@
*/
#include <linux/circ_buf.h>
+#include <linux/iopoll.h>
#include "gem/i915_gem_context.h"
#include "gem/i915_gem_lmem.h"
@@ -29,7 +30,6 @@
#include "i915_irq.h"
#include "i915_reg.h"
#include "i915_trace.h"
-#include "i915_wait_util.h"
#include "intel_guc_ads.h"
#include "intel_guc_capture.h"
#include "intel_guc_print.h"
@@ -3925,7 +3925,7 @@ static int guc_request_alloc(struct i915_request *rq)
if (cancel_delayed_work_sync(&ce->guc_state.sched_disable_delay_work))
intel_context_sched_disable_unpin(ce);
else if (intel_context_is_closed(ce))
- if (wait_for(context_close_done(ce), 1500))
+ if (poll_timeout_us(, context_close_done(ce), 1000, 1500 * 1000, false))
guc_warn(guc, "timed out waiting on context sched close before realloc\n");
/*
* Call pin_guc_id here rather than in the pinning step as with
diff --git a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
index 63a75272924f..ee46e360a034 100644
--- a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
@@ -359,8 +359,9 @@ static int intel_guc_fast_request(void *arg)
goto err_rq;
}
- ret = wait_for(gt->uc.guc.fast_response_selftest != 1 || i915_request_completed(rq),
- FAST_RESPONSE_TIMEOUT_MS);
+ ret = poll_timeout_us(,
+ gt->uc.guc.fast_response_selftest != 1 || i915_request_completed(rq),
+ 1000, FAST_RESPONSE_TIMEOUT_MS * 1000, false);
if (ret) {
gt_err(gt, "Request wait failed: %pe\n", ERR_PTR(ret));
goto err_rq;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 07/25] drm/i915/guc: Convert guc_wait_ucode() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (5 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 06/25] drm/i915/guc: Convert request alloc " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 08/25] drm/i915/guc: Convert slpc_reset() " Sebastian Brzezinka
` (17 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in guc_wait_ucode() to poll_timeout_us() and
update the comments that name wait_for(). poll_timeout_us() only takes
a fixed interval, so poll every 1000us instead of backing off from
10us. The wait is 1000 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
index b1bda1b84f0a..4c055e1a3619 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
@@ -9,13 +9,14 @@
* Alex Dai <yu.dai@intel.com>
*/
+#include <linux/iopoll.h>
+
#include "gt/intel_gt.h"
#include "gt/intel_gt_mcr.h"
#include "gt/intel_gt_regs.h"
#include "gt/intel_rps.h"
#include "i915_drv.h"
-#include "i915_wait_util.h"
#include "intel_guc_fw.h"
#include "intel_guc_print.h"
@@ -101,7 +102,7 @@ static int guc_xfer_rsa(struct intel_uc_fw *guc_fw,
* specified location; then return a boolean indicating whether
* the value matches either completion or a known failure code.
*
- * This is used for polling the GuC status in a wait_for()
+ * This is used for polling the GuC status in a poll_timeout_us()
* loop below.
*/
static inline bool guc_load_done(struct intel_uncore *uncore, u32 *status, bool *success)
@@ -193,12 +194,13 @@ static int guc_wait_ucode(struct intel_guc *guc)
* the requested frequency not being granted and thus the firmware
* load is attempted at minimum frequency. That can lead to load times
* in the seconds range. However, there is a limit on how long an
- * individual wait_for() can wait. So wrap it in a loop.
+ * individual poll_timeout_us() can wait. So wrap it in a loop.
*/
before_freq = intel_rps_read_actual_frequency(>->rps);
before = ktime_get();
for (count = 0; count < GUC_LOAD_RETRY_LIMIT; count++) {
- ret = wait_for(guc_load_done(uncore, &status, &success), 1000);
+ ret = poll_timeout_us(, guc_load_done(uncore, &status, &success),
+ 1000, 1000 * 1000, false);
if (!ret || !success)
break;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 08/25] drm/i915/guc: Convert slpc_reset() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (6 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 07/25] drm/i915/guc: Convert guc_wait_ucode() " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 09/25] drm/i915/gsc: Convert HECI packet submit waits " Sebastian Brzezinka
` (16 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in slpc_reset() to poll_timeout_us().
poll_timeout_us() only takes a fixed interval, so poll every 50us
(1% of the 5 ms timeout) instead of backing off from 10us.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
index a75f05ff1110..91189a6a2229 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
@@ -3,6 +3,7 @@
* Copyright © 2021 Intel Corporation
*/
+#include <linux/iopoll.h>
#include <linux/string_helpers.h>
#include <drm/drm_cache.h>
@@ -13,7 +14,6 @@
#include "i915_drv.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_guc_print.h"
#include "intel_guc_slpc.h"
@@ -357,7 +357,8 @@ static int slpc_reset(struct intel_guc_slpc *slpc)
}
if (!ret) {
- if (wait_for(slpc_is_running(slpc), SLPC_RESET_TIMEOUT_MS)) {
+ if (poll_timeout_us(, slpc_is_running(slpc), 50,
+ SLPC_RESET_TIMEOUT_MS * 1000, false)) {
guc_probe_error(guc, "SLPC not enabled! State = %s\n",
slpc_get_state_string(slpc));
return -EIO;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 09/25] drm/i915/gsc: Convert HECI packet submit waits to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (7 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 08/25] drm/i915/guc: Convert slpc_reset() " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 10/25] drm/i915/huc: Update stale wait_for() comment reference Sebastian Brzezinka
` (15 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() calls in intel_gsc_uc_heci_cmd_submit_packet()
and intel_gsc_uc_heci_cmd_submit_nonpriv() to poll_timeout_us().
poll_timeout_us() only takes a fixed interval, so poll every 1000us
instead of backing off from 10us. The waits are 500 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
.../gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c
index dabb870dcdb1..68bf74ab0b9d 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c
@@ -3,6 +3,8 @@
* Copyright © 2023 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include <drm/drm_print.h>
#include "gt/intel_context.h"
@@ -11,7 +13,6 @@
#include "gt/intel_gt.h"
#include "gt/intel_ring.h"
-#include "i915_wait_util.h"
#include "intel_gsc_uc_heci_cmd_submit.h"
struct gsc_heci_pkt {
@@ -90,7 +91,8 @@ int intel_gsc_uc_heci_cmd_submit_packet(struct intel_gsc_uc *gsc, u64 addr_in,
* Start timeout for i915_request_wait only after considering one possible
* pending GSC-HECI submission cycle on the other (non-privileged) path.
*/
- if (wait_for(i915_request_started(rq), GSC_HECI_REPLY_LATENCY_MS))
+ if (poll_timeout_us(, i915_request_started(rq), 1000,
+ GSC_HECI_REPLY_LATENCY_MS * 1000, false))
drm_dbg(&gsc_uc_to_gt(gsc)->i915->drm,
"Delay in gsc-heci-priv submission to gsccs-hw");
if (i915_request_wait(rq, 0, msecs_to_jiffies(GSC_HECI_REPLY_LATENCY_MS)) < 0)
@@ -203,7 +205,8 @@ intel_gsc_uc_heci_cmd_submit_nonpriv(struct intel_gsc_uc *gsc,
* Start timeout for i915_request_wait only after considering one possible
* pending GSC-HECI submission cycle on the other (privileged) path.
*/
- if (wait_for(i915_request_started(rq), GSC_HECI_REPLY_LATENCY_MS))
+ if (poll_timeout_us(, i915_request_started(rq), 1000,
+ GSC_HECI_REPLY_LATENCY_MS * 1000, false))
drm_dbg(&gsc_uc_to_gt(gsc)->i915->drm,
"Delay in gsc-heci-non-priv submission to gsccs-hw");
if (i915_request_wait(rq, I915_WAIT_INTERRUPTIBLE,
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 10/25] drm/i915/huc: Update stale wait_for() comment reference
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (8 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 09/25] drm/i915/gsc: Convert HECI packet submit waits " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 11/25] drm/i915/rps: Convert wait_for()/wait_for_atomic() to poll_timeout_us() Sebastian Brzezinka
` (14 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
intel_huc_wait_for_auth_complete() calls __intel_wait_for_register(), not
wait_for(), update the comment to name the function actually called. No
functional change.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
index f3249b98c992..5f87ea398c4c 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
@@ -463,8 +463,8 @@ int intel_huc_wait_for_auth_complete(struct intel_huc *huc,
* really should never get that hot in real life!). IFWI issues have been
* seen to cause sporadic failures to grant the higher frequency. And at
* minimum frequency, the authentication time can be in the seconds range.
- * Note that there is a limit on how long an individual wait_for() can wait.
- * So wrap it in a loop.
+ * Note that there is a limit on how long an individual
+ * __intel_wait_for_register() can wait. So wrap it in a loop.
*/
before_freq = intel_rps_read_actual_frequency(>->rps);
before = ktime_get();
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 11/25] drm/i915/rps: Convert wait_for()/wait_for_atomic() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (9 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 10/25] drm/i915/huc: Update stale wait_for() comment reference Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 12/25] drm/i915/gt: " Sebastian Brzezinka
` (13 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for_atomic() in gen5_rps_enable() and the wait_for()
calls in the RPS selftests to poll_timeout_us_atomic()/poll_timeout_us().
poll_timeout_us_atomic() has no clock and only charges its udelay()
against the timeout, so use a 1us delay. The MMIO read time is not
counted, so a wait that times out can last longer than 10 ms.
poll_timeout_us() only takes a fixed interval, so the selftests poll
every 1% of their timeout (100us for 10 ms, 500us for 50 ms) instead of
backing off from 10us.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/intel_rps.c | 6 +++---
drivers/gpu/drm/i915/gt/selftest_rps.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index 0f9b4f1dd3cb..77b3109481cf 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -3,6 +3,7 @@
* Copyright © 2019 Intel Corporation
*/
+#include <linux/iopoll.h>
#include <linux/string_helpers.h>
#include <drm/intel/display_parent_interface.h>
@@ -17,7 +18,6 @@
#include "i915_freq.h"
#include "i915_irq.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_breadcrumbs.h"
#include "intel_gt.h"
#include "intel_gt_clock_utils.h"
@@ -601,8 +601,8 @@ static bool gen5_rps_enable(struct intel_rps *rps)
rgvmodectl |= MEMMODE_SWMODE_EN;
intel_uncore_write(uncore, MEMMODECTL, rgvmodectl);
- if (wait_for_atomic((intel_uncore_read(uncore, MEMSWCTL) &
- MEMCTL_CMD_STS) == 0, 10))
+ if (poll_timeout_us_atomic(, (intel_uncore_read(uncore, MEMSWCTL) &
+ MEMCTL_CMD_STS) == 0, 1, 10 * 1000, false))
drm_err(&uncore->i915->drm,
"stuck trying to change perf mode\n");
mdelay(1);
diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c b/drivers/gpu/drm/i915/gt/selftest_rps.c
index be77fba2ec49..cffc59c33e55 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rps.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
@@ -3,6 +3,7 @@
* Copyright © 2020 Intel Corporation
*/
+#include <linux/iopoll.h>
#include <linux/pm_qos.h>
#include <linux/sort.h>
@@ -189,7 +190,7 @@ static u8 rps_set_check(struct intel_rps *rps, u8 freq)
{
mutex_lock(&rps->lock);
GEM_BUG_ON(!intel_rps_is_active(rps));
- if (wait_for(!intel_rps_set(rps, freq), 50)) {
+ if (poll_timeout_us(, !intel_rps_set(rps, freq), 500, 50 * 1000, false)) {
mutex_unlock(&rps->lock);
return 0;
}
@@ -286,9 +287,8 @@ int live_rps_clock_interval(void *arg)
intel_uncore_write_fw(gt->uncore, GEN6_RP_CONTROL,
GEN6_RP_ENABLE | GEN6_RP_UP_BUSY_AVG);
- if (wait_for(intel_uncore_read_fw(gt->uncore,
- GEN6_RP_CUR_UP_EI),
- 10)) {
+ if (poll_timeout_us(, intel_uncore_read_fw(gt->uncore, GEN6_RP_CUR_UP_EI),
+ 100, 10 * 1000, false)) {
/* Just skip the test; assume lack of HW support */
pr_notice("%s: rps evaluation interval not ticking\n",
engine->name);
@@ -667,8 +667,8 @@ int live_rps_frequency_cs(void *arg)
if (err)
goto err_vma;
- if (wait_for(intel_uncore_read(engine->uncore, CS_GPR(0)),
- 10)) {
+ if (poll_timeout_us(, intel_uncore_read(engine->uncore, CS_GPR(0)),
+ 100, 10 * 1000, false)) {
pr_err("%s: timed loop did not start\n",
engine->name);
goto err_vma;
@@ -806,7 +806,7 @@ int live_rps_frequency_srm(void *arg)
if (err)
goto err_vma;
- if (wait_for(READ_ONCE(*cntr), 10)) {
+ if (poll_timeout_us(, READ_ONCE(*cntr), 100, 10 * 1000, false)) {
pr_err("%s: timed loop did not start\n",
engine->name);
goto err_vma;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 12/25] drm/i915/gt: Convert wait_for()/wait_for_atomic() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (10 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 11/25] drm/i915/rps: Convert wait_for()/wait_for_atomic() to poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 13/25] drm/i915/gt: Convert wait_for_atomic() to poll_timeout_us_atomic() Sebastian Brzezinka
` (12 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in intel_gt_mcr_lock() and the
wait_for()/_wait_for_atomic() calls in intel_gt_mcr_wait_for_reg()
to poll_timeout_us*().
poll_timeout_us_atomic() has no clock and only charges its
udelay() against the timeout, so use a 1us delay. Each poll in
intel_gt_mcr_wait_for_reg() does steered MMIO that is not counted,
so a wait that times out can last much longer than fast_timeout_us.
poll_timeout_us() only takes a fixed interval. The MCR semaphore is only
held briefly, so poll it every 50us in intel_gt_mcr_lock(). The slow
leg of intel_gt_mcr_wait_for_reg() polls every 1% of the caller supplied
timeout, capped at 1000us.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
index c3afa321fe30..afda40f1b33d 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
@@ -3,8 +3,9 @@
* Copyright © 2022 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include "i915_drv.h"
-#include "i915_wait_util.h"
#include "intel_gt.h"
#include "intel_gt_mcr.h"
#include "intel_gt_print.h"
@@ -353,8 +354,9 @@ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags)
*/
intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_GT);
- err = wait_for(intel_uncore_read_fw(gt->uncore,
- MTL_STEER_SEMAPHORE) == 0x1, 100);
+ err = poll_timeout_us(, intel_uncore_read_fw(gt->uncore,
+ MTL_STEER_SEMAPHORE) == 0x1,
+ 50, 100 * 1000, false);
}
/*
@@ -861,9 +863,11 @@ int intel_gt_mcr_wait_for_reg(struct intel_gt *gt,
ret = -ETIMEDOUT;
if (fast_timeout_us && fast_timeout_us <= 20000)
- ret = _wait_for_atomic(done, fast_timeout_us, 0);
+ ret = poll_timeout_us_atomic(, done, 1, fast_timeout_us, false);
if (ret && slow_timeout_ms)
- ret = wait_for(done, slow_timeout_ms);
+ ret = poll_timeout_us(, done,
+ min_t(unsigned int, slow_timeout_ms * 10, 1000),
+ slow_timeout_ms * 1000, false);
return ret;
#undef done
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 13/25] drm/i915/gt: Convert wait_for_atomic() to poll_timeout_us_atomic()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (11 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 12/25] drm/i915/gt: " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 14/25] drm/i915/gt: Convert wait_for_atomic_us()/wait_for() to poll_timeout_us*() Sebastian Brzezinka
` (11 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for_atomic() in reset_prepare() to
poll_timeout_us_atomic() and update the adjacent comment.
poll_timeout_us_atomic() has no clock and only charges its udelay()
against the timeout. Each poll runs stop_ring(), which does several
MMIO accesses that are not counted, so use a 10us delay to keep the 20
ms budget close to wall-clock time.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/intel_ring_submission.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
index 064e7cce412f..f8487c962733 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
@@ -3,6 +3,8 @@
* Copyright © 2008-2021 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include <drm/drm_cache.h>
#include <drm/intel/intel_gmd_interrupt_regs.h>
#include <drm/intel/intel_gmd_misc_regs.h>
@@ -17,7 +19,6 @@
#include "i915_irq.h"
#include "i915_mitigations.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_breadcrumbs.h"
#include "intel_context.h"
#include "intel_engine_heartbeat.h"
@@ -369,11 +370,11 @@ static void reset_prepare(struct intel_engine_cs *engine)
ENGINE_READ_FW(engine, RING_START));
/*
* Sometimes engine head failed to set to zero even after writing into it.
- * Use wait_for_atomic() with 20ms delay to let engine resumes from
+ * Use poll_timeout_us_atomic() with 20ms timeout to let engine resumes from
* correct RING_HEAD. Experimented different values and determined
* that 20ms works best based on testing.
*/
- if (wait_for_atomic((!stop_ring(engine) == 0), 20)) {
+ if (poll_timeout_us_atomic(, (!stop_ring(engine) == 0), 10, 20 * 1000, false)) {
drm_err(&engine->i915->drm,
"failed to set %s head to zero "
"ctl %08x head %08x tail %08x start %08x\n",
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 14/25] drm/i915/gt: Convert wait_for_atomic_us()/wait_for() to poll_timeout_us*()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (12 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 13/25] drm/i915/gt: Convert wait_for_atomic() to poll_timeout_us_atomic() Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 15/25] drm/i915/gt: Convert _wait_for_atomic()/wait_for*() " Sebastian Brzezinka
` (10 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert wait_for_atomic_us() in wa_csb_read() and wait_for() in the
live_busywait_preempt() selftest to poll_timeout_us*().
poll_timeout_us_atomic() has no clock and only charges its udelay()
against the timeout, so use a 1us delay in wa_csb_read(). The poll only
reads memory, so the 10us budget stays accurate, but a stale entry can
be noticed up to 1us later.
poll_timeout_us() only takes a fixed interval, so the selftest polls
every 100us (1% of its 10 ms timeout) instead of backing off from 10us.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 7 +++++--
drivers/gpu/drm/i915/gt/selftest_execlists.c | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 841f71932675..c97ca59225a7 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -108,6 +108,7 @@
*/
#include <linux/interrupt.h>
+#include <linux/iopoll.h>
#include <linux/string_helpers.h>
#include <drm/drm_print.h>
@@ -119,7 +120,6 @@
#include "i915_timer_util.h"
#include "i915_trace.h"
#include "i915_vgpu.h"
-#include "i915_wait_util.h"
#include "intel_breadcrumbs.h"
#include "intel_context.h"
#include "intel_engine_heartbeat.h"
@@ -1742,6 +1742,7 @@ static noinline u64
wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb)
{
u64 entry;
+ int ret;
/*
* Reading from the HWSP has one particular advantage: we can detect
@@ -1753,7 +1754,9 @@ wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb)
* tgl,dg1:HSDES#22011327657
*/
preempt_disable();
- if (wait_for_atomic_us((entry = READ_ONCE(*csb)) != -1, 10)) {
+ ret = poll_timeout_us_atomic(entry = READ_ONCE(*csb), entry != -1,
+ 1, 10, false);
+ if (ret) {
int idx = csb - engine->execlists.csb_status;
int status;
diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c b/drivers/gpu/drm/i915/gt/selftest_execlists.c
index 21e5ed9f72a3..c693c4c2f169 100644
--- a/drivers/gpu/drm/i915/gt/selftest_execlists.c
+++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c
@@ -3,6 +3,7 @@
* Copyright © 2018 Intel Corporation
*/
+#include <linux/iopoll.h>
#include <linux/prime_numbers.h>
#include <drm/drm_print.h>
@@ -1639,7 +1640,7 @@ static int live_busywait_preempt(void *arg)
i915_request_get(lo);
i915_request_add(lo);
- if (wait_for(READ_ONCE(*map), 10)) {
+ if (poll_timeout_us(, READ_ONCE(*map), 100, 10 * 1000, false)) {
i915_request_put(lo);
err = -ETIMEDOUT;
goto err_vma;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 15/25] drm/i915/gt: Convert _wait_for_atomic()/wait_for*() to poll_timeout_us*()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (13 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 14/25] drm/i915/gt: Convert wait_for_atomic_us()/wait_for() to poll_timeout_us*() Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 16/25] drm/i915/gt: Convert pte_tlbinv() selftest wait to poll_timeout_us() Sebastian Brzezinka
` (9 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert _wait_for_atomic() in i915_do_reset(), g33_do_reset() and
g4x_do_reset(), and wait_for_us()/wait_for() in the wait_until_running(),
wait_for_idle() and __igt_reset_evict_vma() selftests, to
poll_timeout_us*().
The old _wait_for_atomic() measured elapsed time with local_clock().
poll_timeout_us_atomic() only charges its udelay() against the timeout and
does not count the slow pci_read_config_byte() in each poll, so use a 10us
delay in the reset functions to keep the 50 ms budget closer to wall-clock
time. Use a 1us delay in wait_until_running(), which only reads memory.
poll_timeout_us() only takes a fixed interval, so poll every 1000us for
the 2000 ms wait in wait_until_running(), and every 1% of the timeout
(500us for 50 ms, 100us for 10 ms) for the others.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/intel_reset.c | 12 ++++++------
drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 18 ++++++++++--------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index bd1f26336ac4..a6d4a692f646 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -3,6 +3,7 @@
* Copyright © 2008-2018 Intel Corporation
*/
+#include <linux/iopoll.h>
#include <linux/sched/mm.h>
#include <linux/stop_machine.h>
#include <linux/string_helpers.h>
@@ -22,7 +23,6 @@
#include "i915_gpu_error.h"
#include "i915_irq.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_breadcrumbs.h"
#include "intel_engine_pm.h"
#include "intel_engine_regs.h"
@@ -164,13 +164,13 @@ static int i915_do_reset(struct intel_gt *gt,
/* Assert reset for at least 50 usec, and wait for acknowledgement. */
pci_write_config_byte(pdev, I915_GDRST, GRDOM_RESET_ENABLE);
udelay(50);
- err = _wait_for_atomic(i915_in_reset(pdev), 50000, 0);
+ err = poll_timeout_us_atomic(, i915_in_reset(pdev), 10, 50000, false);
/* Clear the reset request. */
pci_write_config_byte(pdev, I915_GDRST, 0);
udelay(50);
if (!err)
- err = _wait_for_atomic(!i915_in_reset(pdev), 50000, 0);
+ err = poll_timeout_us_atomic(, !i915_in_reset(pdev), 10, 50000, false);
return err;
}
@@ -190,7 +190,7 @@ static int g33_do_reset(struct intel_gt *gt,
struct pci_dev *pdev = to_pci_dev(gt->i915->drm.dev);
pci_write_config_byte(pdev, I915_GDRST, GRDOM_RESET_ENABLE);
- return _wait_for_atomic(g4x_reset_complete(pdev), 50000, 0);
+ return poll_timeout_us_atomic(, g4x_reset_complete(pdev), 10, 50000, false);
}
static int g4x_do_reset(struct intel_gt *gt,
@@ -207,7 +207,7 @@ static int g4x_do_reset(struct intel_gt *gt,
pci_write_config_byte(pdev, I915_GDRST,
GRDOM_MEDIA | GRDOM_RESET_ENABLE);
- ret = _wait_for_atomic(g4x_reset_complete(pdev), 50000, 0);
+ ret = poll_timeout_us_atomic(, g4x_reset_complete(pdev), 10, 50000, false);
if (ret) {
GT_TRACE(gt, "Wait for media reset failed\n");
goto out;
@@ -215,7 +215,7 @@ static int g4x_do_reset(struct intel_gt *gt,
pci_write_config_byte(pdev, I915_GDRST,
GRDOM_RENDER | GRDOM_RESET_ENABLE);
- ret = _wait_for_atomic(g4x_reset_complete(pdev), 50000, 0);
+ ret = poll_timeout_us_atomic(, g4x_reset_complete(pdev), 10, 50000, false);
if (ret) {
GT_TRACE(gt, "Wait for render reset failed\n");
goto out;
diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
index 53f3ce5c33a4..e0c8fdef03a6 100644
--- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
+++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
@@ -3,6 +3,7 @@
* Copyright © 2016 Intel Corporation
*/
+#include <linux/iopoll.h>
#include <linux/kthread.h>
#include "gem/i915_gem_context.h"
@@ -273,12 +274,12 @@ static void hang_fini(struct hang *h)
static bool wait_until_running(struct hang *h, struct i915_request *rq)
{
- return !(wait_for_us(i915_seqno_passed(hws_seqno(h, rq),
- rq->fence.seqno),
- 10) &&
- wait_for(i915_seqno_passed(hws_seqno(h, rq),
- rq->fence.seqno),
- 2000));
+ return !(poll_timeout_us_atomic(, i915_seqno_passed(hws_seqno(h, rq),
+ rq->fence.seqno),
+ 1, 10, false) &&
+ poll_timeout_us(, i915_seqno_passed(hws_seqno(h, rq),
+ rq->fence.seqno),
+ 1000, 2000 * 1000, false));
}
static int igt_hang_sanitycheck(void *arg)
@@ -342,7 +343,8 @@ static int igt_hang_sanitycheck(void *arg)
static bool wait_for_idle(struct intel_engine_cs *engine)
{
- return wait_for(intel_engine_is_idle(engine), IGT_IDLE_TIMEOUT) == 0;
+ return poll_timeout_us(, intel_engine_is_idle(engine),
+ 500, IGT_IDLE_TIMEOUT * 1000, false) == 0;
}
static int igt_reset_nop(void *arg)
@@ -1541,7 +1543,7 @@ static int __igt_reset_evict_vma(struct intel_gt *gt,
wait_for_completion(&arg.completion);
- if (wait_for(!list_empty(&rq->fence.cb_list), 10)) {
+ if (poll_timeout_us(, !list_empty(&rq->fence.cb_list), 100, 10 * 1000, false)) {
struct drm_printer p = drm_info_printer(gt->i915->drm.dev);
pr_err("igt/evict_vma kthread did not wait\n");
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 16/25] drm/i915/gt: Convert pte_tlbinv() selftest wait to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (14 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 15/25] drm/i915/gt: Convert _wait_for_atomic()/wait_for*() " Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 17/25] drm/i915/gvt: Convert wait_for_atomic() to poll_timeout_us_atomic() Sebastian Brzezinka
` (8 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in the pte_tlbinv() selftest to
poll_timeout_us(). poll_timeout_us() only takes a fixed interval, so
poll every 1000us instead of backing off from 10us.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gt/selftest_tlb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_tlb.c b/drivers/gpu/drm/i915/gt/selftest_tlb.c
index a5184f09d1de..8992f800a099 100644
--- a/drivers/gpu/drm/i915/gt/selftest_tlb.c
+++ b/drivers/gpu/drm/i915/gt/selftest_tlb.c
@@ -3,6 +3,8 @@
* Copyright © 2022 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include "gem/i915_gem_internal.h"
#include "gem/i915_gem_lmem.h"
#include "gem/i915_gem_region.h"
@@ -10,7 +12,6 @@
#include "gen8_engine_cs.h"
#include "i915_gem_ww.h"
#include "i915_selftest.h"
-#include "i915_wait_util.h"
#include "intel_context.h"
#include "intel_engine_regs.h"
#include "intel_gpu_commands.h"
@@ -170,7 +171,8 @@ pte_tlbinv(struct intel_context *ce,
/* Flush the PTE update to concurrent HW */
tlbinv(ce->vm, addr & -length, length);
- if (wait_for(i915_request_completed(rq), HZ / 2)) {
+ if (poll_timeout_us(, i915_request_completed(rq),
+ 1000, (HZ / 2) * 1000, false)) {
pr_err("%s: Request did not complete; the COND_BBE did not read the updated PTE\n",
ce->engine->name);
err = -EINVAL;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 17/25] drm/i915/gvt: Convert wait_for_atomic() to poll_timeout_us_atomic()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (15 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 16/25] drm/i915/gt: Convert pte_tlbinv() selftest wait to poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 15:40 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 18/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_debugfs.c Sebastian Brzezinka
` (7 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:40 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for_atomic() in handle_tlb_pending_event() to
poll_timeout_us_atomic().
poll_timeout_us_atomic() has no clock and only charges its udelay()
against the timeout, so use a 1us delay. The MMIO read in each poll is
not counted, so a wait that times out can last longer than 50 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/gvt/mmio_context.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c
index a93999ba8092..ffed5987d8da 100644
--- a/drivers/gpu/drm/i915/gvt/mmio_context.c
+++ b/drivers/gpu/drm/i915/gvt/mmio_context.c
@@ -33,6 +33,8 @@
*
*/
+#include <linux/iopoll.h>
+
#include <drm/drm_print.h>
#include <drm/intel/intel_gmd_misc_regs.h>
@@ -45,7 +47,6 @@
#include "gvt.h"
#include "i915_drv.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "trace.h"
#define GEN9_MOCS_SIZE 64
@@ -398,7 +399,8 @@ static void handle_tlb_pending_event(struct intel_vgpu *vgpu,
intel_uncore_write_fw(uncore, reg, 0x1);
- if (wait_for_atomic(intel_uncore_read_fw(uncore, reg) == 0, 50))
+ if (poll_timeout_us_atomic(, intel_uncore_read_fw(uncore, reg) == 0,
+ 1, 50 * 1000, false))
gvt_vgpu_err("timeout in invalidate ring %s tlb\n",
engine->name);
else
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 18/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_debugfs.c
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (16 preceding siblings ...)
2026-12-02 15:40 ` [RFC PATCH 17/25] drm/i915/gvt: Convert wait_for_atomic() to poll_timeout_us_atomic() Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 19/25] drm/i915: Convert _wait_for()/wait_for_atomic() to poll_timeout_us*() Sebastian Brzezinka
` (6 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in gt_drop_caches() to poll_timeout_us().
poll_timeout_us() only takes a fixed interval, so poll every 1000us
instead of backing off from 10us. The wait is 200 ms.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 04bc3d27b836..2f1254a3a4b4 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -27,6 +27,7 @@
*/
#include <linux/debugfs.h>
+#include <linux/iopoll.h>
#include <linux/sched/mm.h>
#include <linux/sort.h>
#include <linux/string_helpers.h>
@@ -57,7 +58,6 @@
#include "i915_irq.h"
#include "i915_reg.h"
#include "i915_scheduler.h"
-#include "i915_wait_util.h"
static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node)
{
@@ -583,7 +583,7 @@ gt_drop_caches(struct intel_gt *gt, u64 val)
int ret;
if (val & DROP_RESET_ACTIVE &&
- wait_for(intel_engines_are_idle(gt), 200))
+ poll_timeout_us(, intel_engines_are_idle(gt), 1000, 200 * 1000, false))
intel_gt_set_wedged(gt);
if (val & DROP_RETIRE)
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 19/25] drm/i915: Convert _wait_for()/wait_for_atomic() to poll_timeout_us*()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (17 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 18/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_debugfs.c Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 20/25] drm/i915/pxp: Convert wait_for() to poll_timeout_us() Sebastian Brzezinka
` (5 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the _wait_for()/wait_for_atomic() calls in skl_pcode_request()
to poll_timeout_us().
The sleeping wait used a fixed 10us interval, which poll_timeout_us()
passes as the upper bound of usleep_range(). Use 20us to keep the old
upper bound between requests.
The retry with preemption disabled polls a slow PCODE mailbox
transaction. poll_timeout_us_atomic() only charges its udelay() against
the timeout, so it would run far longer than 50 ms. Use poll_timeout_us()
with no sleep instead: it busya loops like the old code and bounds the
wait by wall clock time.
Also fix the comment above the priming request, which named _wait_for()
and wrongly suggested it may not evaluate the condition right away.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/intel_pcode.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pcode.c b/drivers/gpu/drm/i915/intel_pcode.c
index 1c9d1f413757..c826ffbbf48a 100644
--- a/drivers/gpu/drm/i915/intel_pcode.c
+++ b/drivers/gpu/drm/i915/intel_pcode.c
@@ -3,13 +3,14 @@
* Copyright © 2013-2021 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include <drm/drm_print.h>
#include <drm/intel/display_parent_interface.h>
#include <drm/intel/intel_pcode_regs.h>
#include "i915_drv.h"
#include "i915_reg.h"
-#include "i915_wait_util.h"
#include "intel_pcode.h"
static int gen6_check_mailbox_status(u32 mbox)
@@ -173,15 +174,14 @@ int skl_pcode_request(struct intel_uncore *uncore, u32 mbox, u32 request,
/*
* Prime the PCODE by doing a request first. Normally it guarantees
- * that a subsequent request, at most @timeout_base_ms later, succeeds.
- * _wait_for() doesn't guarantee when its passed condition is evaluated
- * first, so send the first request explicitly.
+ * that a subsequent request, at most @timeout_base_ms later, succeeds,
+ * so send the first request explicitly before polling.
*/
if (COND) {
ret = 0;
goto out;
}
- ret = _wait_for(COND, timeout_base_ms * 1000, 10, 10);
+ ret = poll_timeout_us(, COND, 20, timeout_base_ms * 1000, false);
if (!ret)
goto out;
@@ -199,7 +199,12 @@ int skl_pcode_request(struct intel_uncore *uncore, u32 mbox, u32 request,
"PCODE timeout, retrying with preemption disabled\n");
drm_WARN_ON_ONCE(&uncore->i915->drm, timeout_base_ms > 3);
preempt_disable();
- ret = wait_for_atomic(COND, 50);
+ /*
+ * Each request is a slow mailbox transaction, so bound the retry by
+ * wall-clock time and don't sleep or delay between requests.
+ * poll_timeout_us_atomic() only counts its udelay() time.
+ */
+ ret = poll_timeout_us(, COND, 0, 50 * USEC_PER_MSEC, false);
preempt_enable();
out:
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 20/25] drm/i915/pxp: Convert wait_for() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (18 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 19/25] drm/i915: Convert _wait_for()/wait_for_atomic() to poll_timeout_us*() Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 21/25] drm/i915: Convert wait_for() to poll_timeout_us() in vlv_suspend.c Sebastian Brzezinka
` (4 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in intel_pxp_get_readiness_status() to
poll_timeout_us().
poll_timeout_us() only takes a fixed interval, so it can't back off like
wait_for() did. The timeout is caller supplied, so scale the interval with
it: poll every 1% of the timeout, so short timeouts still get several
polls, capped at 1000us, the largest interval the old backoff reached,
so a long timeout doesn't delay noticing completion.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/pxp/intel_pxp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c
index 3d7f045f662d..3db2368fed44 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c
@@ -3,6 +3,7 @@
* Copyright(c) 2020 Intel Corporation.
*/
+#include <linux/iopoll.h>
#include <linux/workqueue.h>
#include <drm/drm_print.h>
@@ -12,7 +13,6 @@
#include "gt/intel_gt.h"
#include "i915_drv.h"
-#include "i915_wait_util.h"
#include "intel_pxp.h"
#include "intel_pxp_gsccs.h"
#include "intel_pxp_irq.h"
@@ -407,7 +407,9 @@ int intel_pxp_get_readiness_status(struct intel_pxp *pxp, int timeout_ms)
return -ENODEV;
if (timeout_ms) {
- if (wait_for(pxp_fw_dependencies_completed(pxp), timeout_ms))
+ if (poll_timeout_us(, pxp_fw_dependencies_completed(pxp),
+ min_t(unsigned int, timeout_ms * 10, 1000),
+ timeout_ms * 1000, false))
return 2;
} else if (!pxp_fw_dependencies_completed(pxp)) {
return 2;
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 21/25] drm/i915: Convert wait_for() to poll_timeout_us() in vlv_suspend.c
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (19 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 20/25] drm/i915/pxp: Convert wait_for() to poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 22/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_request.c selftests Sebastian Brzezinka
` (3 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() in vlv_wait_for_pw_status() to
poll_timeout_us(). poll_timeout_us() only takes a fixed interval, so
poll every 30us (1% of the 3 ms timeout)
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/vlv_suspend.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/vlv_suspend.c b/drivers/gpu/drm/i915/vlv_suspend.c
index 3612b03cabd1..0f7a805b5f71 100644
--- a/drivers/gpu/drm/i915/vlv_suspend.c
+++ b/drivers/gpu/drm/i915/vlv_suspend.c
@@ -3,8 +3,9 @@
* Copyright © 2020 Intel Corporation
*/
-#include <linux/string_helpers.h>
+#include <linux/iopoll.h>
#include <linux/kernel.h>
+#include <linux/string_helpers.h>
#include <drm/drm_print.h>
#include <drm/intel/intel_gmd_interrupt_regs.h>
@@ -15,7 +16,6 @@
#include "i915_reg.h"
#include "i915_trace.h"
#include "i915_utils.h"
-#include "i915_wait_util.h"
#include "intel_clock_gating.h"
#include "intel_uncore_trace.h"
#include "vlv_suspend.h"
@@ -293,9 +293,8 @@ static int vlv_wait_for_pw_status(struct drm_i915_private *i915,
* Transitioning between RC6 states should be at most 2ms (see
* valleyview_enable_rps) so use a 3ms timeout.
*/
- ret = wait_for(((reg_value =
- intel_uncore_read_notrace(&i915->uncore, reg)) & mask)
- == val, 3);
+ ret = poll_timeout_us(reg_value = intel_uncore_read_notrace(&i915->uncore, reg),
+ (reg_value & mask) == val, 30, 3 * 1000, false);
/* just trace the final value */
trace_i915_reg_rw(false, reg, reg_value, sizeof(reg_value), true);
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 22/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_request.c selftests
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (20 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 21/25] drm/i915: Convert wait_for() to poll_timeout_us() in vlv_suspend.c Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 23/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_selftest.c Sebastian Brzezinka
` (2 subsequent siblings)
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the 7 wait_for() calls in measure_semaphore_response(),
measure_busy_dispatch(), measure_preemption() and measure_completion()
to poll_timeout_us(). poll_timeout_us() only takes a fixed interval,
so poll every 1% of the timeout (500us for 50 ms, 1000us for 500 ms)
The selftest is included by i915_request.c, so add the iopoll.h include
there.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/i915_request.c | 1 +
drivers/gpu/drm/i915/selftests/i915_request.c | 15 +++++++--------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index f66f8efc7062..a8ac2070e135 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -24,6 +24,7 @@
#include <linux/dma-fence-array.h>
#include <linux/dma-fence-chain.h>
+#include <linux/iopoll.h>
#include <linux/irq_work.h>
#include <linux/prefetch.h>
#include <linux/sched.h>
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index e1a7c454a0a9..f300648ec296 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -41,7 +41,6 @@
#include "i915_random.h"
#include "i915_selftest.h"
-#include "i915_wait_util.h"
#include "igt_flush_test.h"
#include "igt_live_test.h"
#include "igt_spinner.h"
@@ -2055,7 +2054,7 @@ static int measure_semaphore_response(struct intel_context *ce)
intel_ring_advance(rq, cs);
i915_request_add(rq);
- if (wait_for(READ_ONCE(*sema) == 0, 50)) {
+ if (poll_timeout_us(, READ_ONCE(*sema) == 0, 500, 50 * 1000, false)) {
err = -EIO;
goto err;
}
@@ -2066,7 +2065,7 @@ static int measure_semaphore_response(struct intel_context *ce)
semaphore_set(sema, i);
preempt_enable();
- if (wait_for(READ_ONCE(*sema) == 0, 50)) {
+ if (poll_timeout_us(, READ_ONCE(*sema) == 0, 500, 50 * 1000, false)) {
err = -EIO;
goto err;
}
@@ -2200,7 +2199,7 @@ static int measure_busy_dispatch(struct intel_context *ce)
intel_ring_advance(rq, cs);
- if (i > 1 && wait_for(READ_ONCE(sema[i - 1]), 500)) {
+ if (i > 1 && poll_timeout_us(, READ_ONCE(sema[i - 1]), 1000, 500 * 1000, false)) {
err = -EIO;
goto err;
}
@@ -2214,7 +2213,7 @@ static int measure_busy_dispatch(struct intel_context *ce)
preempt_enable();
}
- wait_for(READ_ONCE(sema[i - 1]), 500);
+ poll_timeout_us(, READ_ONCE(sema[i - 1]), 1000, 500 * 1000, false);
semaphore_set(sema, i - 1);
for (i = 1; i <= TF_COUNT; i++) {
@@ -2497,7 +2496,7 @@ static int measure_preemption(struct intel_context *ce)
intel_ring_advance(rq, cs);
i915_request_add(rq);
- if (wait_for(READ_ONCE(sema[2 * i]) == -1, 500)) {
+ if (poll_timeout_us(, READ_ONCE(sema[2 * i]) == -1, 1000, 500 * 1000, false)) {
err = -EIO;
goto err;
}
@@ -2525,7 +2524,7 @@ static int measure_preemption(struct intel_context *ce)
i915_request_add(rq);
}
- if (wait_for(READ_ONCE(sema[2 * i - 2]) != -1, 500)) {
+ if (poll_timeout_us(, READ_ONCE(sema[2 * i - 2]) != -1, 1000, 500 * 1000, false)) {
err = -EIO;
goto err;
}
@@ -2612,7 +2611,7 @@ static int measure_completion(struct intel_context *ce)
i915_request_add(rq);
intel_engine_flush_submission(ce->engine);
- if (wait_for(READ_ONCE(sema[i]) == -1, 50)) {
+ if (poll_timeout_us(, READ_ONCE(sema[i]) == -1, 500, 50 * 1000, false)) {
err = -EIO;
goto err;
}
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 23/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_selftest.c
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (21 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 22/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_request.c selftests Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 24/25] drm/i915/selftests: Convert wait_for_us()/wait_for() to poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 25/25] drm/i915: Remove now-unused i915_wait_util.h Sebastian Brzezinka
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for() calls in __wait_gsc_proxy_completed() and
__wait_gsc_huc_load_completed() to poll_timeout_us(). poll_timeout_us()
only takes a fixed interval, so poll every 1000us. The waits are 8s
and 15s.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_selftest.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c
index 3adcfdab75ae..9681ab6b94fc 100644
--- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
+++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
*/
+#include <linux/iopoll.h>
#include <linux/random.h>
#include "gt/intel_gt.h"
@@ -32,7 +33,6 @@
#include "i915_drv.h"
#include "i915_jiffies.h"
#include "i915_selftest.h"
-#include "i915_wait_util.h"
#include "igt_flush_test.h"
struct i915_selftest i915_selftest __read_mostly = {
@@ -152,8 +152,9 @@ __wait_gsc_proxy_completed(struct drm_i915_private *i915)
*/
unsigned long timeout_ms = 8000;
- if (need_to_wait && wait_for(!__gsc_proxy_init_progressing(&i915->media_gt->uc.gsc),
- timeout_ms))
+ if (need_to_wait &&
+ poll_timeout_us(, !__gsc_proxy_init_progressing(&i915->media_gt->uc.gsc),
+ 1000, timeout_ms * 1000, false))
pr_warn(DRIVER_NAME "Timed out waiting for gsc_proxy_completion!\n");
}
@@ -177,7 +178,8 @@ __wait_gsc_huc_load_completed(struct drm_i915_private *i915)
unsigned long timeout_ms = 15000;
if (need_to_wait &&
- wait_for(i915_sw_fence_done(&huc->delayed_load.fence), timeout_ms))
+ poll_timeout_us(, i915_sw_fence_done(&huc->delayed_load.fence),
+ 1000, timeout_ms * 1000, false))
pr_warn(DRIVER_NAME "Timed out waiting for huc load via GSC!\n");
}
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 24/25] drm/i915/selftests: Convert wait_for_us()/wait_for() to poll_timeout_us()
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (22 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 23/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_selftest.c Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 25/25] drm/i915: Remove now-unused i915_wait_util.h Sebastian Brzezinka
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
Convert the wait_for_us()/wait_for() pair in igt_wait_for_spinner() to
two poll_timeout_us() calls. wait_for_us() only busy waits for timeouts
of 10us or less, so both waits slept between polls.
poll_timeout_us() only takes a fixed interval, so the 100us wait polls
every 10us, and its sleep window narrows from 10..20us to 3..10us. The
50 ms wait polls every 100us instead of backing off from 10us, as this
helper is called from many selftest loops.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/selftests/igt_spinner.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/igt_spinner.c b/drivers/gpu/drm/i915/selftests/igt_spinner.c
index 820364171ebe..a7f62d40bb9a 100644
--- a/drivers/gpu/drm/i915/selftests/igt_spinner.c
+++ b/drivers/gpu/drm/i915/selftests/igt_spinner.c
@@ -4,12 +4,13 @@
* Copyright © 2018 Intel Corporation
*/
+#include <linux/iopoll.h>
+
#include "gem/i915_gem_internal.h"
#include "gem/selftests/igt_gem_utils.h"
#include "gt/intel_gpu_commands.h"
#include "gt/intel_gt.h"
-#include "i915_wait_util.h"
#include "igt_spinner.h"
int igt_spinner_init(struct igt_spinner *spin, struct intel_gt *gt)
@@ -256,10 +257,10 @@ bool igt_wait_for_spinner(struct igt_spinner *spin, struct i915_request *rq)
if (i915_request_is_ready(rq))
intel_engine_flush_submission(rq->engine);
- return !(wait_for_us(i915_seqno_passed(hws_seqno(spin, rq),
- rq->fence.seqno),
- 100) &&
- wait_for(i915_seqno_passed(hws_seqno(spin, rq),
- rq->fence.seqno),
- 50));
+ return !(poll_timeout_us(, i915_seqno_passed(hws_seqno(spin, rq),
+ rq->fence.seqno),
+ 10, 100, false) &&
+ poll_timeout_us(, i915_seqno_passed(hws_seqno(spin, rq),
+ rq->fence.seqno),
+ 100, 50 * 1000, false));
}
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [RFC PATCH 25/25] drm/i915: Remove now-unused i915_wait_util.h
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
` (23 preceding siblings ...)
2026-12-02 15:41 ` [RFC PATCH 24/25] drm/i915/selftests: Convert wait_for_us()/wait_for() to poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 15:41 ` Sebastian Brzezinka
24 siblings, 0 replies; 28+ messages in thread
From: Sebastian Brzezinka @ 2026-12-02 15:41 UTC (permalink / raw)
To: intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, jani.nikula, janusz.krzysztofik
All wait_for()/wait_for_us()/wait_for_atomic()/wait_for_atomic_us()
call sites across the driver have been converted to the core
poll_timeout_us()/poll_timeout_us_atomic() macros from <linux/iopoll.h>.
There are no remaining includers of i915_wait_util.h, so remove it.
The checks from the old macros are not carried over:
_WAIT_FOR_ATOMIC_CHECK(), the CONFIG_DRM_I915_DEBUG warning
that a wait_for_atomic() caller really is in atomic context,
and the BUILD_BUG_ON()s requiring a constant timeout in
wait_for_us()/wait_for_atomic_us() and at most 50 ms in the latter.
poll_timeout_us() still has might_sleep_if(), which covers the sleeping
side.
This completes the refactor suggested in commit 65805c2ed74e ("drm/i915:
split out i915_wait_util.h").
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
drivers/gpu/drm/i915/i915_wait_util.h | 119 --------------------------
1 file changed, 119 deletions(-)
delete mode 100644 drivers/gpu/drm/i915/i915_wait_util.h
diff --git a/drivers/gpu/drm/i915/i915_wait_util.h b/drivers/gpu/drm/i915/i915_wait_util.h
deleted file mode 100644
index e1ed7921ec70..000000000000
--- a/drivers/gpu/drm/i915/i915_wait_util.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/* Copyright © 2025 Intel Corporation */
-
-#ifndef __I915_WAIT_UTIL_H__
-#define __I915_WAIT_UTIL_H__
-
-#include <linux/compiler.h>
-#include <linux/delay.h>
-#include <linux/ktime.h>
-#include <linux/sched/clock.h>
-#include <linux/smp.h>
-
-/*
- * __wait_for - magic wait macro
- *
- * Macro to help avoid open coding check/wait/timeout patterns. Note that it's
- * important that we check the condition again after having timed out, since the
- * timeout could be due to preemption or similar and we've never had a chance to
- * check the condition before the timeout.
- */
-#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \
- const ktime_t end__ = ktime_add_ns(ktime_get_raw(), 1000ll * (US)); \
- long wait__ = (Wmin); /* recommended min for usleep is 10 us */ \
- int ret__; \
- might_sleep(); \
- for (;;) { \
- const bool expired__ = ktime_after(ktime_get_raw(), end__); \
- /* Guarantee COND check prior to timeout */ \
- barrier(); \
- OP; \
- if (COND) { \
- ret__ = 0; \
- break; \
- } \
- if (expired__) { \
- ret__ = -ETIMEDOUT; \
- break; \
- } \
- usleep_range(wait__, wait__ * 2); \
- if (wait__ < (Wmax)) \
- wait__ <<= 1; \
- } \
- ret__; \
-})
-
-#define _wait_for(COND, US, Wmin, Wmax) __wait_for(, (COND), (US), (Wmin), \
- (Wmax))
-#define wait_for(COND, MS) _wait_for((COND), (MS) * 1000, 10, 1000)
-
-/*
- * If CONFIG_PREEMPT_COUNT is disabled, in_atomic() always reports false.
- * On PREEMPT_RT the context isn't becoming atomic because it is used in an
- * interrupt handler or because a spinlock_t is acquired. This leads to
- * warnings which don't occur otherwise and therefore the check is disabled.
- */
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG) && IS_ENABLED(CONFIG_PREEMPT_COUNT) && !defined(CONFIG_PREEMPT_RT)
-# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic())
-#else
-# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0)
-#endif
-
-#define _wait_for_atomic(COND, US, ATOMIC) \
-({ \
- int cpu, ret, timeout = (US) * 1000; \
- u64 base; \
- _WAIT_FOR_ATOMIC_CHECK(ATOMIC); \
- if (!(ATOMIC)) { \
- preempt_disable(); \
- cpu = smp_processor_id(); \
- } \
- base = local_clock(); \
- for (;;) { \
- u64 now = local_clock(); \
- if (!(ATOMIC)) \
- preempt_enable(); \
- /* Guarantee COND check prior to timeout */ \
- barrier(); \
- if (COND) { \
- ret = 0; \
- break; \
- } \
- if (now - base >= timeout) { \
- ret = -ETIMEDOUT; \
- break; \
- } \
- cpu_relax(); \
- if (!(ATOMIC)) { \
- preempt_disable(); \
- if (unlikely(cpu != smp_processor_id())) { \
- timeout -= now - base; \
- cpu = smp_processor_id(); \
- base = local_clock(); \
- } \
- } \
- } \
- ret; \
-})
-
-#define wait_for_us(COND, US) \
-({ \
- int ret__; \
- BUILD_BUG_ON(!__builtin_constant_p(US)); \
- if ((US) > 10) \
- ret__ = _wait_for((COND), (US), 10, 10); \
- else \
- ret__ = _wait_for_atomic((COND), (US), 0); \
- ret__; \
-})
-
-#define wait_for_atomic_us(COND, US) \
-({ \
- BUILD_BUG_ON(!__builtin_constant_p(US)); \
- BUILD_BUG_ON((US) > 50000); \
- _wait_for_atomic((COND), (US), 1); \
-})
-
-#define wait_for_atomic(COND, MS) wait_for_atomic_us((COND), (MS) * 1000)
-
-#endif /* __I915_WAIT_UTIL_H__ */
--
2.56.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 02/25] drm/i915: Convert remaining intel_uncore.c wait_for() users to poll_timeout_us()
2026-12-02 15:40 ` [RFC PATCH 02/25] drm/i915: Convert remaining intel_uncore.c wait_for() users " Sebastian Brzezinka
@ 2026-12-02 18:34 ` Jani Nikula
0 siblings, 0 replies; 28+ messages in thread
From: Jani Nikula @ 2026-12-02 18:34 UTC (permalink / raw)
To: Sebastian Brzezinka, intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, janusz.krzysztofik
On Wed, 02 Dec 2026, Sebastian Brzezinka <sebastian.brzezinka@intel.com> wrote:
> Convert the remaining wait_for()/wait_for_atomic*() users in
> intel_uncore.c and its selftest to poll_timeout_us*().
>
> The atomic waits used to busy loop and measure time with local_clock().
> poll_timeout_us_atomic() has no clock and only charges its udelay()
> against the timeout, so use a 1us delay. Register read time is not
> counted, so a wait that times out can last longer than before.
>
> The sleeping waits backed off up to usleep_range(1000, 2000), but
> poll_timeout_us() takes a fixed interval, so poll every 1000us.
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 18 ++++++++++--------
> drivers/gpu/drm/i915/selftests/intel_uncore.c | 4 +++-
> 2 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 77dd1bc435ba..23837b7277a8 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -36,7 +36,6 @@
> #include "i915_iosf_mbi.h"
> #include "i915_reg.h"
> #include "i915_vgpu.h"
> -#include "i915_wait_util.h"
> #include "i915_mmio_range.h"
> #include "intel_uncore_trace.h"
>
> @@ -168,8 +167,8 @@ __wait_for_ack(const struct intel_uncore_forcewake_domain *d,
> const u32 ack,
> const u32 value)
> {
> - return wait_for_atomic((fw_ack(d) & ack) == value,
> - FORCEWAKE_ACK_TIMEOUT_MS);
> + return poll_timeout_us_atomic(, (fw_ack(d) & ack) == value,
> + 1, FORCEWAKE_ACK_TIMEOUT_MS * 1000, false);
I think poll_timeout_us(, ...) i.e. omitting the op is an anti-pattern
that should be avoided. Ditto throughout the series.
I would go for expressing the op and cond in a way that flow
naturally. Sometimes it means adding a local temp variable for it, but I
trust the compiler to optimize it away anyway.
A good example is intel_dsb_wait() with:
bool is_busy;
int ret;
ret = poll_timeout_us(is_busy = is_dsb_busy(display, pipe, dsb->id),
!is_busy,
100, 1000, false);
You could also write it:
ret = poll_timeout_us(, !is_dsb_busy(display, pipe, dsb->id),
100, 1000, false);
but the former is *much* better for clarity.
> }
>
> static inline int
> @@ -387,7 +386,8 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)
> * thread to wake up.
> */
> drm_WARN_ONCE(&uncore->i915->drm,
> - wait_for_atomic_us(gt_thread_status(uncore) == 0, 5000),
> + poll_timeout_us_atomic(, gt_thread_status(uncore) == 0,
> + 1, 5000, false),
> "GT thread status wait timed out\n");
> }
>
> @@ -439,6 +439,7 @@ static inline u32 fifo_free_entries(struct intel_uncore *uncore)
> static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)
> {
> u32 n;
> + int ret;
>
> /* On VLV, FIFO will be shared by both SW and HW.
> * So, we need to read the FREE_ENTRIES everytime */
> @@ -448,9 +449,10 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)
> n = uncore->fifo_count;
>
> if (n <= GT_FIFO_NUM_RESERVED_ENTRIES) {
> - if (wait_for_atomic((n = fifo_free_entries(uncore)) >
> - GT_FIFO_NUM_RESERVED_ENTRIES,
> - GT_FIFO_TIMEOUT_MS)) {
> + ret = poll_timeout_us_atomic(n = fifo_free_entries(uncore),
> + n > GT_FIFO_NUM_RESERVED_ENTRIES,
> + 1, GT_FIFO_TIMEOUT_MS * 1000, false);
> + if (ret) {
> drm_dbg(&uncore->i915->drm,
> "GT_FIFO timeout, entries: %u\n", n);
> return;
> @@ -2521,7 +2523,7 @@ static int sanity_check_mmio_access(struct intel_uncore *uncore)
> * recovers, then give up.
> */
> #define COND (__raw_uncore_read32(uncore, FORCEWAKE_MT) != ~0)
> - if (wait_for(COND, 2000) == -ETIMEDOUT) {
> + if (poll_timeout_us(, COND, 1000, 2000 * 1000, false) == -ETIMEDOUT) {
> drm_err(&i915->drm, "Device is non-operational; MMIO access returns 0xFFFFFFFF!\n");
> return -EIO;
> }
> diff --git a/drivers/gpu/drm/i915/selftests/intel_uncore.c b/drivers/gpu/drm/i915/selftests/intel_uncore.c
> index 514d2200751b..c80e923b2745 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_uncore.c
> @@ -22,6 +22,8 @@
> *
> */
>
> +#include <linux/iopoll.h>
> +
> #include "../i915_selftest.h"
>
> #include "gt/intel_gt.h"
> @@ -259,7 +261,7 @@ static int live_forcewake_ops(void *arg)
> }
>
> /* We then expect the read to return 0 outside of the fw */
> - if (wait_for(readl(reg) == 0, 100)) {
> + if (poll_timeout_us(, readl(reg) == 0, 1000, 100 * 1000, false)) {
See readl_poll_timeout().
> pr_err("%s:%s=%0x, fw_domains 0x%x still up after 100ms!\n",
> engine->name, r->name, readl(reg), fw_domains);
> err = -ETIMEDOUT;
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us()
2026-12-02 15:40 ` [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us() Sebastian Brzezinka
@ 2026-12-02 18:38 ` Jani Nikula
0 siblings, 0 replies; 28+ messages in thread
From: Jani Nikula @ 2026-12-02 18:38 UTC (permalink / raw)
To: Sebastian Brzezinka, intel-gfx
Cc: Sebastian Brzezinka, andi.shyti, krzysztof.karas,
krzysztof.niemiec, janusz.krzysztofik
On Wed, 02 Dec 2026, Sebastian Brzezinka <sebastian.brzezinka@intel.com> wrote:
> Convert __intel_wait_for_register_fw() and __intel_wait_for_register()
> to poll_timeout_us() and poll_timeout_us_atomic().
>
> The atomic fast path used to busy-loop and measure time with
> local_clock(). poll_timeout_us_atomic() has no clock and only charges
> its udelay() against the timeout, so use a 1us delay. The register
> read time is not counted, so a wait that times out can last longer than
> fast_timeout_us, and a wait that succeeds can be noticed up to 1us later.
>
> The sleeping paths backed off from 10us to 1000us, but poll_timeout_us()
> only takes a fixed interval. Poll every 1% of the timeout, capped at
> 1000us. A register that settles shortly after the fast phase is now
> noticed up to that interval later, instead of after about 10us.
>
> intel_de_wait_for_register() keeps its backoff: it runs with atomic
> timeouts from a few us to several ms, and a fixed interval short enough
> for the small waits would busy loop on the long ones.
intel_de_wait* no longer uses uncore waits, and the patch at hand has no
bearing on them.
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 170e83a8c9fc..77dd1bc435ba 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -21,6 +21,7 @@
> * IN THE SOFTWARE.
> */
>
> +#include <linux/iopoll.h>
> #include <linux/pm_runtime.h>
>
> #include <drm/drm_managed.h>
> @@ -2761,7 +2762,8 @@ int __intel_wait_for_register_fw(struct intel_uncore *uncore,
> u32 *out_value)
> {
> u32 reg_value = 0;
> -#define done (((reg_value = intel_uncore_read_fw(uncore, reg)) & mask) == value)
> +#define read_reg (reg_value = intel_uncore_read_fw(uncore, reg))
> +#define done ((reg_value & mask) == value)
> int ret;
>
> /* Catch any overuse of this function */
> @@ -2771,15 +2773,18 @@ int __intel_wait_for_register_fw(struct intel_uncore *uncore,
>
> ret = -ETIMEDOUT;
> if (fast_timeout_us && fast_timeout_us <= 20000)
> - ret = _wait_for_atomic(done, fast_timeout_us, 0);
> + ret = poll_timeout_us_atomic(read_reg, done, 1, fast_timeout_us, false);
> if (ret && slow_timeout_ms)
> - ret = wait_for(done, slow_timeout_ms);
> + ret = poll_timeout_us(read_reg, done,
> + min_t(unsigned int, slow_timeout_ms * 10, 1000),
> + slow_timeout_ms * 1000, false);
>
> if (out_value)
> *out_value = reg_value;
>
> return ret;
> #undef done
> +#undef read_reg
> }
>
> /**
> @@ -2827,10 +2832,10 @@ int __intel_wait_for_register(struct intel_uncore *uncore,
> spin_unlock_irq(&uncore->lock);
>
> if (ret && slow_timeout_ms)
> - ret = __wait_for(reg_value = intel_uncore_read_notrace(uncore,
> - reg),
> - (reg_value & mask) == value,
> - slow_timeout_ms * 1000, 10, 1000);
> + ret = poll_timeout_us(reg_value = intel_uncore_read_notrace(uncore, reg),
> + (reg_value & mask) == value,
> + min_t(unsigned int, slow_timeout_ms * 10, 1000),
> + slow_timeout_ms * 1000, false);
>
> /* just trace the final value */
> trace_i915_reg_rw(false, reg, reg_value, sizeof(reg_value), true);
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2026-12-02 18:40 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 15:40 [RFC PATCH 00/25] drm/i915: Replace wait_for() helpers with poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 01/25] drm/i915: Convert wait_for() wrappers to poll_timeout_us() Sebastian Brzezinka
2026-12-02 18:38 ` Jani Nikula
2026-12-02 15:40 ` [RFC PATCH 02/25] drm/i915: Convert remaining intel_uncore.c wait_for() users " Sebastian Brzezinka
2026-12-02 18:34 ` Jani Nikula
2026-12-02 15:40 ` [RFC PATCH 03/25] drm/i915/guc: Convert intel_guc_send_mmio() " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 04/25] drm/i915/guc: Convert CTB response wait_for()/wait_for_us() " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 05/25] drm/i915/gsc: Convert proxy waits " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 06/25] drm/i915/guc: Convert request alloc " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 07/25] drm/i915/guc: Convert guc_wait_ucode() " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 08/25] drm/i915/guc: Convert slpc_reset() " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 09/25] drm/i915/gsc: Convert HECI packet submit waits " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 10/25] drm/i915/huc: Update stale wait_for() comment reference Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 11/25] drm/i915/rps: Convert wait_for()/wait_for_atomic() to poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 12/25] drm/i915/gt: " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 13/25] drm/i915/gt: Convert wait_for_atomic() to poll_timeout_us_atomic() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 14/25] drm/i915/gt: Convert wait_for_atomic_us()/wait_for() to poll_timeout_us*() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 15/25] drm/i915/gt: Convert _wait_for_atomic()/wait_for*() " Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 16/25] drm/i915/gt: Convert pte_tlbinv() selftest wait to poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:40 ` [RFC PATCH 17/25] drm/i915/gvt: Convert wait_for_atomic() to poll_timeout_us_atomic() Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 18/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_debugfs.c Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 19/25] drm/i915: Convert _wait_for()/wait_for_atomic() to poll_timeout_us*() Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 20/25] drm/i915/pxp: Convert wait_for() to poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 21/25] drm/i915: Convert wait_for() to poll_timeout_us() in vlv_suspend.c Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 22/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_request.c selftests Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 23/25] drm/i915: Convert wait_for() to poll_timeout_us() in i915_selftest.c Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 24/25] drm/i915/selftests: Convert wait_for_us()/wait_for() to poll_timeout_us() Sebastian Brzezinka
2026-12-02 15:41 ` [RFC PATCH 25/25] drm/i915: Remove now-unused i915_wait_util.h Sebastian Brzezinka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.