diff options
author | Jani Nikula <jani.nikula@intel.com> | 2025-08-28 15:20:48 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2025-09-04 14:02:58 +0300 |
commit | 11080a5ea877d7da163a93975559b9607f629d49 (patch) | |
tree | 3860e338e6c56400b7361c646d4f0092d26c3ac8 /rust/helpers/rcu.c | |
parent | 0399a3368503c75043afbb680071dabc723aa9d7 (diff) |
drm/i915/gmbus: use generic poll_timeout*() instead of wait_for*()
Prefer generic poll helpers over i915 custom helpers.
The "two tier" wait_for_us() + wait_for() combination appeared without
much explanation in commit 4e6c2d58ba86 ("drm/i915: Take forcewake once
for the entire GMBUS transaction"). Try to mimic roughly the same with
the generic helpers.
wait_for_us() with 10 us or shorter timeouts ends up in
_wait_for_atomic(). Thus use poll_timeout_us_atomic() for the first try,
with the same 2 us timeout and no sleep.
For the fallback, the functional change is losing the exponentially
growing sleep of wait_for(), which used to be 10, 20, 40, ..., 640, and
1280 us. Use an arbitrary constant 500 us sleep instead. The timeout
remains at 50 ms.
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://lore.kernel.org/r/564b397352c53a1116519fb2d53050c0426bc0dc.1756383233.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'rust/helpers/rcu.c')
0 files changed, 0 insertions, 0 deletions