@@ -726,6 +726,13 @@ static void xe_pm_runtime_lockdep_prime(void)
726726/**
727727 * xe_pm_runtime_get - Get a runtime_pm reference and resume synchronously
728728 * @xe: xe device instance
729+ *
730+ * When possible, scope-based runtime PM (through guard(xe_pm_runtime)) is
731+ * be preferred over direct usage of this function. Manual get/put handling
732+ * should only be used when the function contains goto-based logic which
733+ * can break scope-based handling, or when the lifetime of the runtime PM
734+ * reference does not match a specific scope (e.g., runtime PM obtained in one
735+ * function and released in a different one).
729736 */
730737void xe_pm_runtime_get (struct xe_device * xe )
731738{
@@ -758,6 +765,13 @@ void xe_pm_runtime_put(struct xe_device *xe)
758765 * xe_pm_runtime_get_ioctl - Get a runtime_pm reference before ioctl
759766 * @xe: xe device instance
760767 *
768+ * When possible, scope-based runtime PM (through
769+ * ACQUIRE(xe_pm_runtime_ioctl, ...)) is be preferred over direct usage of this
770+ * function. Manual get/put handling should only be used when the function
771+ * contains goto-based logic which can break scope-based handling, or when the
772+ * lifetime of the runtime PM reference does not match a specific scope (e.g.,
773+ * runtime PM obtained in one function and released in a different one).
774+ *
761775 * Returns: Any number greater than or equal to 0 for success, negative error
762776 * code otherwise.
763777 */
@@ -827,6 +841,13 @@ static bool xe_pm_suspending_or_resuming(struct xe_device *xe)
827841 * It will warn if not protected.
828842 * The reference should be put back after this function regardless, since it
829843 * will always bump the usage counter, regardless.
844+ *
845+ * When possible, scope-based runtime PM (through guard(xe_pm_runtime_noresume))
846+ * is be preferred over direct usage of this function. Manual get/put handling
847+ * should only be used when the function contains goto-based logic which can
848+ * break scope-based handling, or when the lifetime of the runtime PM reference
849+ * does not match a specific scope (e.g., runtime PM obtained in one function
850+ * and released in a different one).
830851 */
831852void xe_pm_runtime_get_noresume (struct xe_device * xe )
832853{
0 commit comments