str_yes_no(xe_device_has_sriov(xe)),
xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));
- err = xe_pm_init_early(xe);
+ err = xe_pm_probe(xe);
if (err)
return err;
if (err)
goto err_driver_cleanup;
- drm_dbg(&xe->drm, "d3cold: capable=%s\n",
- str_yes_no(xe->d3cold.capable));
-
return 0;
err_driver_cleanup:
#include "xe_irq.h"
#include "xe_late_bind_fw.h"
#include "xe_pcode.h"
+#include "xe_printk.h"
#include "xe_pxp.h"
#include "xe_sriov_vf_ccs.h"
#include "xe_sysctrl.h"
pm_runtime_put(dev);
}
+/**
+ * xe_pm_init_early() - Initialize Xe Power Management
+ * @xe: the &xe_device instance
+ *
+ * Initialize everything that is a "software-only" state that does not
+ * require access to any of the device's hardware data.
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
int xe_pm_init_early(struct xe_device *xe)
{
int err;
if (err)
return err;
- xe->d3cold.capable = xe_pm_pci_d3cold_capable(xe);
return 0;
}
ALLOW_ERROR_INJECTION(xe_pm_init_early, ERRNO); /* See xe_pci_probe() */
+/**
+ * xe_pm_probe() - Initialize Xe Power Management
+ * @xe: the &xe_device instance
+ *
+ * Check d3cold capability.
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
+int xe_pm_probe(struct xe_device *xe)
+{
+ xe->d3cold.capable = xe_pm_pci_d3cold_capable(xe);
+ xe_dbg(xe, "d3cold: capable=%s\n", str_yes_no(xe->d3cold.capable));
+
+ return 0;
+}
+
static u32 vram_threshold_value(struct xe_device *xe)
{
if (xe->info.platform == XE_BATTLEMAGE) {
int xe_pm_resume(struct xe_device *xe);
int xe_pm_init_early(struct xe_device *xe);
+int xe_pm_probe(struct xe_device *xe);
int xe_pm_init(struct xe_device *xe);
void xe_pm_fini(struct xe_device *xe);
bool xe_pm_runtime_suspended(struct xe_device *xe);