-
- Downloads
"README.md" did not exist on "4cd33d972e0ff596df99db9afcc37e50d1772b48"
PM: runtime: Simplify pm_runtime_get_if_active() usage
There are two ways to opportunistically increment a device's runtime PM usage count, calling either pm_runtime_get_if_active() or pm_runtime_get_if_in_use(). The former has an argument to tell whether to ignore the usage count or not, and the latter simply calls the former with ign_usage_count set to false. The other users that want to ignore the usage_count will have to explicitly set that argument to true which is a bit cumbersome. To make this function more practical to use, remove the ign_usage_count argument from the function. The main implementation is in a static function called pm_runtime_get_conditional() and implementations of pm_runtime_get_if_active() and pm_runtime_get_if_in_use() are moved to runtime.c. Signed-off-by:Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Alex Elder <elder@linaro.org> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Takashi Iwai <tiwai@suse.de> # sound/ Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> # drivers/accel/ivpu/ Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> # drivers/gpu/drm/i915/ Reviewed-by:
Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # drivers/pci/ Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
- Documentation/power/runtime_pm.rst 2 additions, 3 deletionsDocumentation/power/runtime_pm.rst
- drivers/accel/ivpu/ivpu_pm.c 1 addition, 1 deletiondrivers/accel/ivpu/ivpu_pm.c
- drivers/base/power/runtime.c 33 additions, 2 deletionsdrivers/base/power/runtime.c
- drivers/gpu/drm/i915/intel_runtime_pm.c 4 additions, 1 deletiondrivers/gpu/drm/i915/intel_runtime_pm.c
- drivers/gpu/drm/xe/xe_pm.c 1 addition, 1 deletiondrivers/gpu/drm/xe/xe_pm.c
- drivers/media/i2c/ccs/ccs-core.c 1 addition, 1 deletiondrivers/media/i2c/ccs/ccs-core.c
- drivers/media/i2c/ov64a40.c 1 addition, 1 deletiondrivers/media/i2c/ov64a40.c
- drivers/media/i2c/thp7312.c 1 addition, 1 deletiondrivers/media/i2c/thp7312.c
- drivers/net/ipa/ipa_smp2p.c 1 addition, 1 deletiondrivers/net/ipa/ipa_smp2p.c
- drivers/pci/pci.c 1 addition, 1 deletiondrivers/pci/pci.c
- include/linux/pm_runtime.h 3 additions, 15 deletionsinclude/linux/pm_runtime.h
- sound/hda/hdac_device.c 1 addition, 1 deletionsound/hda/hdac_device.c
Loading
Please register or sign in to comment