drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex
authorChris Wilson <chris.p.wilson@intel.com>
Tue, 26 Sep 2023 08:37:36 +0000 (10:37 +0200)
committerNirmoy Das <nirmoy.das@intel.com>
Sat, 30 Sep 2023 11:49:14 +0000 (13:49 +0200)
commit4cd64e9d2c7206db05e7162d0258b455726b7ec5
treef13e3d4ef84e6127a274a486320ddab2dc2cbea8
parent0951dce656e2b3c4c9a5096cd2cedb39a5d6e637
drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex

When runtime pm is first woken, it will synchronously call the
registered callbacks for the device. These callbacks
may pull in their own forest of locks, which we do not want to
conflate with the intel_wakeref.mutex. A second minor benefit to
reducing the coverage of the mutex, is that it will reduce
contention for frequent sleeps and wakes (such as when being used
for soft-rc6).

v2: remove usage of fetch_and_zero() and other improvements(Jani)

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926083742.14740-2-nirmoy.das@intel.com
drivers/gpu/drm/i915/intel_wakeref.c