]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/i915/power: use intel_de_wait_for_clear() instead of wait_for()
authorJani Nikula <jani.nikula@intel.com>
Thu, 26 Jun 2025 19:26:32 +0000 (22:26 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 2 Jul 2025 09:32:22 +0000 (12:32 +0300)
commita975fea5b9ff96d96c74758cbe17da0451f2de07
treec5cb6a187ef65328c9ae11096f639ad769969645
parent95f2dec053cdad2673a960e9481d191a3a84a1af
drm/i915/power: use intel_de_wait_for_clear() instead of wait_for()

Prefer the register read specific wait function over i915 wait_for_us().

The existing condition is quite complicated. Simplify by checking for
requesters first, and determine timeout based on that. Refresh
requesters in case of timeouts, should one have popped up during the
wait. The downside is that this does not cut the wait short if
requesters show up *during* the wait, but we're talking about 1 ms so
shouldn't be an issue.

v2: Refresh requesters only if there were none before (Imre)

Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20250626192632.2330349-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display_power_well.c