aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnshuman Gupta <[email protected]>2023-07-18 13:37:00 +0530
committerRodrigo Vivi <[email protected]>2023-12-21 11:37:35 -0500
commitfddebcbf7a47d661f3eb475de0b75be11c7c3bb8 (patch)
tree35657bcee280f6a0738a84b3ab0b83a4f97504be
parentac0be3b5b28ecf4890b3fc3ebaec18e7ce5fcc86 (diff)
drm/xe/pm: Refactor xe_pm_runtime_init
Wrap xe_pm_runtime_init inside xe_pm_init. Cc: Rodrigo Vivi <[email protected]> Signed-off-by: Anshuman Gupta <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_pci.c1
-rw-r--r--drivers/gpu/drm/xe/xe_pm.c3
-rw-r--r--drivers/gpu/drm/xe/xe_pm.h1
3 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 4ff7be058e4e..bc894b3546bf 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -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;
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 2f553dcd6139..03d71dcf2393 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -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);
}
diff --git a/drivers/gpu/drm/xe/xe_pm.h b/drivers/gpu/drm/xe/xe_pm.h
index 864cd0be014a..193e5d687353 100644
--- a/drivers/gpu/drm/xe/xe_pm.h
+++ b/drivers/gpu/drm/xe/xe_pm.h
@@ -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);