Commit e6d2fe31 authored by Raag Jadav's avatar Raag Jadav Committed by Ashutosh Dixit
Browse files

drm/xe/pm: Assert on runtime suspend if VFs are enabled



We hold an additional reference to the runtime PM to keep PF in D0
during VFs lifetime, as our VFs do not implement the PM capability.
This means we should never be runtime suspending as long as VFs are
enabled.

v8: Add !IS_SRIOV_VF() assert (Matthew Brost)

Suggested-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: default avatarRaag Jadav <raag.jadav@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patch.msgid.link/20251030122357.128825-4-raag.jadav@intel.com
parent 726ceb57
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1160,6 +1160,15 @@ static int xe_pci_runtime_suspend(struct device *dev)
	struct xe_device *xe = pdev_to_xe_device(pdev);
	int err;

	/*
	 * We hold an additional reference to the runtime PM to keep PF in D0
	 * during VFs lifetime, as our VFs do not implement the PM capability.
	 * This means we should never be runtime suspending as long as VFs are
	 * enabled.
	 */
	xe_assert(xe, !IS_SRIOV_VF(xe));
	xe_assert(xe, !pci_num_vf(pdev));

	err = xe_pm_runtime_suspend(xe);
	if (err)
		return err;