Commit fddebcbf authored by Anshuman Gupta's avatar Anshuman Gupta Committed by Rodrigo Vivi

drm/xe/pm: Refactor xe_pm_runtime_init

Wrap xe_pm_runtime_init inside xe_pm_init.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-3-anshuman.gupta@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent ac0be3b5
...@@ -664,7 +664,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -664,7 +664,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err) if (err)
goto err_pci_disable; goto err_pci_disable;
xe_pm_runtime_init(xe);
xe_pm_init(xe); xe_pm_init(xe);
return 0; return 0;
......
...@@ -121,7 +121,7 @@ static bool xe_pm_pci_d3cold_capable(struct pci_dev *pdev) ...@@ -121,7 +121,7 @@ static bool xe_pm_pci_d3cold_capable(struct pci_dev *pdev)
return true; return true;
} }
void xe_pm_runtime_init(struct xe_device *xe) static void xe_pm_runtime_init(struct xe_device *xe)
{ {
struct device *dev = xe->drm.dev; struct device *dev = xe->drm.dev;
...@@ -137,6 +137,7 @@ void xe_pm_init(struct xe_device *xe) ...@@ -137,6 +137,7 @@ void xe_pm_init(struct xe_device *xe)
{ {
struct pci_dev *pdev = to_pci_dev(xe->drm.dev); struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
xe_pm_runtime_init(xe);
xe->d3cold_capable = xe_pm_pci_d3cold_capable(pdev); xe->d3cold_capable = xe_pm_pci_d3cold_capable(pdev);
} }
......
...@@ -13,7 +13,6 @@ struct xe_device; ...@@ -13,7 +13,6 @@ struct xe_device;
int xe_pm_suspend(struct xe_device *xe); int xe_pm_suspend(struct xe_device *xe);
int xe_pm_resume(struct xe_device *xe); int xe_pm_resume(struct xe_device *xe);
void xe_pm_runtime_init(struct xe_device *xe);
void xe_pm_init(struct xe_device *xe); void xe_pm_init(struct xe_device *xe);
void xe_pm_runtime_fini(struct xe_device *xe); void xe_pm_runtime_fini(struct xe_device *xe);
int xe_pm_runtime_suspend(struct xe_device *xe); int xe_pm_runtime_suspend(struct xe_device *xe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment