Message ID | 20230720210353.214385-4-rodrigo.vivi@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] drm/xe: Only set PCI d3cold_allowed when we are really allowing. | expand |
> -----Original Message----- > From: Vivi, Rodrigo <rodrigo.vivi@intel.com> > Sent: Friday, July 21, 2023 2:34 AM > To: intel-gfx@lists.freedesktop.org > Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com>; Gupta, Anshuman > <anshuman.gupta@intel.com> > Subject: [PATCH 4/4] drm/xe: Only init runtime PM after all d3cold config is in > place. > > We cannot allow runtime pm suspend after we configured the d3cold > capable and threshold. > > Cc: Anshuman Gupta <anshuman.gupta@intel.com> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > --- > drivers/gpu/drm/xe/xe_pm.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c > index 73bcb76c2d42..366ee446af38 100644 > --- a/drivers/gpu/drm/xe/xe_pm.c > +++ b/drivers/gpu/drm/xe/xe_pm.c > @@ -152,10 +152,12 @@ void xe_pm_init(struct xe_device *xe) > struct pci_dev *pdev = to_pci_dev(xe->drm.dev); > > drmm_mutex_init(&xe->drm, &xe->d3cold.lock); > - xe_pm_runtime_init(xe); > + > xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev); > xe_device_sysfs_init(xe); > xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD); > + > + xe_pm_runtime_init(xe); LGTM. Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> > } > > void xe_pm_runtime_fini(struct xe_device *xe) > -- > 2.41.0
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index 73bcb76c2d42..366ee446af38 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -152,10 +152,12 @@ void xe_pm_init(struct xe_device *xe) struct pci_dev *pdev = to_pci_dev(xe->drm.dev); drmm_mutex_init(&xe->drm, &xe->d3cold.lock); - xe_pm_runtime_init(xe); + xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev); xe_device_sysfs_init(xe); xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD); + + xe_pm_runtime_init(xe); } void xe_pm_runtime_fini(struct xe_device *xe)
We cannot allow runtime pm suspend after we configured the d3cold capable and threshold. Cc: Anshuman Gupta <anshuman.gupta@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> --- drivers/gpu/drm/xe/xe_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)