mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/i915: Encapsulate lmem rpm stuff in intel_runtime_pm
Runtime pm is not really per GT, therefore it make sense to move lmem_userfault_list, lmem_userfault_lock and userfault_wakeref from intel_gt to intel_runtime_pm structure, which is embedded to i915. No functional change. v2: - Fixes the code comment nit. [Matt Auld] Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221027092242.1476080-2-anshuman.gupta@intel.com
This commit is contained in:
@@ -626,6 +626,8 @@ void intel_runtime_pm_driver_release(struct intel_runtime_pm *rpm)
|
||||
runtime_pm);
|
||||
int count = atomic_read(&rpm->wakeref_count);
|
||||
|
||||
intel_wakeref_auto_fini(&rpm->userfault_wakeref);
|
||||
|
||||
drm_WARN(&i915->drm, count,
|
||||
"i915 raw-wakerefs=%d wakelocks=%d on cleanup\n",
|
||||
intel_rpm_raw_wakeref_count(count),
|
||||
@@ -645,4 +647,7 @@ void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm)
|
||||
rpm->available = HAS_RUNTIME_PM(i915);
|
||||
|
||||
init_intel_runtime_pm_wakeref(rpm);
|
||||
INIT_LIST_HEAD(&rpm->lmem_userfault_list);
|
||||
mutex_init(&rpm->lmem_userfault_lock);
|
||||
intel_wakeref_auto_init(&rpm->userfault_wakeref, rpm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user