drm/xe/pm: Refactor xe_pm_runtime_init
authorAnshuman Gupta <anshuman.gupta@intel.com>
Tue, 18 Jul 2023 08:07:00 +0000 (13:37 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:37:35 +0000 (11:37 -0500)
Wrap xe_pm_runtime_init inside xe_pm_init.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-3-anshuman.gupta@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_pci.c
drivers/gpu/drm/xe/xe_pm.c
drivers/gpu/drm/xe/xe_pm.h

index 4ff7be058e4e480743083e4d9f6d9d48a788637d..bc894b3546bf6c9d06357862d27bbf8e4ca37e62 100644 (file)
@@ -664,7 +664,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (err)
                goto err_pci_disable;
 
-       xe_pm_runtime_init(xe);
        xe_pm_init(xe);
 
        return 0;
index 2f553dcd6139d534240f36626a3d0f5eb258d6c0..03d71dcf23935c124095ed87181cf7e804a541c2 100644 (file)
@@ -121,7 +121,7 @@ static bool xe_pm_pci_d3cold_capable(struct pci_dev *pdev)
        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;
 
@@ -137,6 +137,7 @@ void xe_pm_init(struct xe_device *xe)
 {
        struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
 
+       xe_pm_runtime_init(xe);
        xe->d3cold_capable = xe_pm_pci_d3cold_capable(pdev);
 }
 
index 864cd0be014a4551d70027ff9e33fe31ccd6bc0a..193e5d687353742d7de41763d5f45b35e7191f5a 100644 (file)
@@ -13,7 +13,6 @@ struct xe_device;
 int xe_pm_suspend(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_runtime_fini(struct xe_device *xe);
 int xe_pm_runtime_suspend(struct xe_device *xe);