Commit b38c6968 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: rework runtime pm enablement for BACO

Add a switch statement to simplify asic checks.  Note
that BACO is not supported on APUs, so there is no
need to check them.
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 75e1658e
...@@ -167,19 +167,29 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags) ...@@ -167,19 +167,29 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
} }
if (amdgpu_device_supports_boco(dev) && if (amdgpu_device_supports_boco(dev) &&
(amdgpu_runtime_pm != 0)) /* enable runpm by default for boco */ (amdgpu_runtime_pm != 0)) { /* enable runpm by default for boco */
adev->runpm = true; adev->runpm = true;
else if (amdgpu_device_supports_baco(dev) && } else if (amdgpu_device_supports_baco(dev) &&
(amdgpu_runtime_pm != 0) && (amdgpu_runtime_pm != 0)) {
(adev->asic_type >= CHIP_TOPAZ) && switch (adev->asic_type) {
(adev->asic_type != CHIP_VEGA10) && #ifdef CONFIG_DRM_AMDGPU_CIK
(adev->asic_type != CHIP_VEGA20) && case CHIP_BONAIRE:
(adev->asic_type != CHIP_SIENNA_CICHLID) && case CHIP_HAWAII:
(adev->asic_type != CHIP_ARCTURUS)) /* enable runpm on VI+ */ #endif
case CHIP_VEGA10:
case CHIP_VEGA20:
case CHIP_ARCTURUS:
case CHIP_SIENNA_CICHLID:
/* enable runpm if runpm=1 */
if (amdgpu_runtime_pm > 0)
adev->runpm = true; adev->runpm = true;
else if (amdgpu_device_supports_baco(dev) && break;
(amdgpu_runtime_pm > 0)) /* enable runpm if runpm=1 on CI */ default:
/* enable runpm on VI+ */
adev->runpm = true; adev->runpm = true;
break;
}
}
/* 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