drm/amdgpu: drop pm_runtime_set_active
Subsystems (2)
PATCH 1/4 drm/amdgpu: drop pm_runtime_set_active
The pci core handles this for us in pci_pm_init.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -1
@@ -191,7 +191,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP );pm_runtime_use_autosuspend (dev->dev);pm_runtime_set_autosuspend_delay (dev->dev,5000 ); -pm_runtime_set_active (dev->dev);pm_runtime_allow (dev->dev);pm_runtime_mark_last_busy (dev->dev);pm_runtime_put_autosuspend (dev->dev);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/4 drm/amdgpu: fix runpm logic in amdgpu_pmops_resume
We should be checking whether the driver enabled runtime pm rather than whether the asic supports BOCO or BACO. That said in general they are equivalent unless the user has disabled runpm or it has been disabled for a specific asic.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
@@ -1174,10 +1174,10 @@ static int amdgpu_pmops_suspend(struct device *dev)static int amdgpu_pmops_resume (struct device *dev) {struct drm_device *drm_dev =dev_get_drvdata (dev); +struct amdgpu_device *adev = drm_dev->dev_private;/* GPU comes up enabled by the bios on resume */ -if (amdgpu_device_supports_boco (drm_dev) || -amdgpu_device_supports_baco (drm_dev)) { +if (adev->runpm) {pm_runtime_disable (dev);pm_runtime_set_active (dev);pm_runtime_enable (dev);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amdgpu: drop extra runtime pm handling in resume pmop
In reply to Alex DeucherThe core handles this for us.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -8
@@ -1174,14 +1174,6 @@ static int amdgpu_pmops_suspend(struct device *dev)static int amdgpu_pmops_resume (struct device *dev) {struct drm_device *drm_dev =dev_get_drvdata (dev); -struct amdgpu_device *adev = drm_dev->dev_private; - -/* GPU comes up enabled by the bios on resume */ -if (adev->runpm) { -pm_runtime_disable (dev); -pm_runtime_set_active (dev); -pm_runtime_enable (dev); - }return amdgpu_device_resume (drm_dev, true); }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amdgpu: only set DPM_FLAG_NEVER_SKIP for legacy ATPX BOCO
In reply to Alex DeucherWe only need to set DPM_FLAG_NEVER_SKIP for the legacy ATPX BOCO case. D3cold and BACO work as expected.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +4 -1
@@ -188,7 +188,10 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)dev_dbg (&dev->pdev->dev,"Error during ACPI methods call\n" );if (adev->runpm) { -dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP ); +/* only need to skip on ATPX */ +if (amdgpu_device_supports_boco (dev) && + !amdgpu_is_atpx_hybrid ()) +dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP );pm_runtime_use_autosuspend (dev->dev);pm_runtime_set_autosuspend_delay (dev->dev,5000 );pm_runtime_allow (dev->dev);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 4/4] drm/amdgpu: only set DPM_FLAG_NEVER_SKIP for legacy ATPX BOCO
[AMD Official Use Only - Internal Distribution Only]
Patch2 is reviewed-by: Evan Quan <[email protected]> Others from the series are acked-by: Evan Quan <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, May 8, 2020 12:08 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 4/4] drm/amdgpu: only set DPM_FLAG_NEVER_SKIP for legacy ATPX BOCO
We only need to set DPM_FLAG_NEVER_SKIP for the legacy ATPX BOCO case. D3cold and BACO work as expected.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +4 -1
@@ -188,7 +188,10 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)dev_dbg (&dev->pdev->dev,"Error during ACPI methods call\n" );if (adev->runpm) { -dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP ); +/* only need to skip on ATPX */ +if (amdgpu_device_supports_boco (dev) && + !amdgpu_is_atpx_hybrid ()) +dev_pm_set_driver_flags (dev->dev,DPM_FLAG_NEVER_SKIP );pm_runtime_use_autosuspend (dev->dev);pm_runtime_set_autosuspend_delay (dev->dev,5000 );pm_runtime_allow (dev->dev);
--
2.25.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cevan.quan%40amd.com%7C62fe0eef98e74285482908d7f2a0dd85%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637244645084791405&sdata=n4w17BAf2MR8AClxM6RQ8MZHoTnMiC3aeGj3RYUPdtk%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx