]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu: Set rpm auto_suspend once during probe
authorPranjal Shrivastava <praan@google.com>
Thu, 23 Jan 2025 19:56:36 +0000 (19:56 +0000)
committerWill Deacon <will@kernel.org>
Tue, 11 Mar 2025 13:23:24 +0000 (13:23 +0000)
commit0a679336dc171db06d84679ae9180e5cda42166c
tree6d7ceeb8414daa5d41d62271a72e46d1359f8f57
parent0ad2507d5d93f39619fc42372c347d6006b64319
iommu/arm-smmu: Set rpm auto_suspend once during probe

The current code calls arm_smmu_rpm_use_autosuspend() during device
attach, which seems unusual as it sets the autosuspend delay and the
'use_autosuspend' flag for the smmu device. These parameters can be
simply set once during the smmu probe and in order to avoid bouncing
rpm states, we can simply mark_last_busy() during a client dev attach
as discussed in [1].

Move the handling of arm_smmu_rpm_use_autosuspend() to the SMMU probe
and modify the arm_smmu_rpm_put() function to mark_last_busy() before
calling __pm_runtime_put_autosuspend(). Additionally,
s/pm_runtime_put_autosuspend/__pm_runtime_put_autosuspend/ to help with
the refactor of the pm_runtime_put_autosuspend() API [2].

Link: https://lore.kernel.org/r/20241023164835.GF29251@willie-the-truck
Link: https://git.kernel.org/linus/b7d46644e554
Signed-off-by: Pranjal Shrivastava <praan@google.com>
Link: https://lore.kernel.org/r/20250123195636.4182099-1-praan@google.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu.c