Commit 72f058b7 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: enable runtime pm on BACO capable boards if runpm=1

BACO - Bus Active, Chip Off

Everything is in place now.  Not enabled by default yet.  You
still have to specify runpm=1.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3840c5bc
...@@ -157,10 +157,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags) ...@@ -157,10 +157,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
!pci_is_thunderbolt_attached(dev->pdev)) !pci_is_thunderbolt_attached(dev->pdev))
flags |= AMD_IS_PX; flags |= AMD_IS_PX;
if ((amdgpu_runtime_pm != 0) &&
(flags & AMD_IS_PX))
adev->runpm = true;
/* amdgpu_device_init should report only fatal error /* amdgpu_device_init should report only fatal error
* like memory allocation failure or iomapping failure, * like memory allocation failure or iomapping failure,
* or memory manager initialization failure, it must * or memory manager initialization failure, it must
...@@ -173,6 +169,13 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags) ...@@ -173,6 +169,13 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
goto out; goto out;
} }
if (amdgpu_device_supports_boco(dev) &&
(amdgpu_runtime_pm != 0)) /* enable runpm by default */
adev->runpm = true;
else if (amdgpu_device_supports_baco(dev) &&
(amdgpu_runtime_pm > 0)) /* enable runpm if runpm=1 */
adev->runpm = true;
/* Call ACPI methods: require modeset init /* Call ACPI methods: require modeset init
* but failure is not fatal * but failure is not fatal
*/ */
......
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