]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915: Fix assert on pending async-put power domain work when it requeues itself
authorImre Deak <imre.deak@intel.com>
Thu, 30 May 2024 10:53:12 +0000 (13:53 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 4 Jun 2024 16:30:09 +0000 (19:30 +0300)
commit30ca6365bb4200f55e59bf1ab2a24e65406e9eac
tree792175c8bcd2654ca9c77db7a5a46f4b69fde2ff
parentb330568f0c51b0b80e463841b0062206011a4746
drm/i915: Fix assert on pending async-put power domain work when it requeues itself

Commit dd839aa857eb ("drm/i915: Fix incorrect assert about pending power domain async-put work")

fixed the assert about a pending work dropping a display power reference
asynchronously, leading to the

drm_WARN_ON(!queue_delayed_work(&power_domains->async_put_work));

warn next time around a power reference was put asynchronously, due to a
stale instance of the work still being pending. However the fix didn't
consider the case where multiple power reference was acquired and put,
requiring the work to requeue itself. Extend the fix for this case as
well canceling the pending instance of the work before it requeues
itself.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10915
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240530105312.1016485-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display_power.c