drm/amd: Move AMD_IS_APU check for ASPM into top level function

There is no need for every ASIC driver to perform the same check.
Move the duplicated code into amdgpu_device_should_use_aspm().

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Mario Limonciello
2023-10-23 15:47:43 -05:00
committed by Alex Deucher
parent fbf1035b03
commit 1a6513de49
7 changed files with 6 additions and 14 deletions

View File

@@ -1496,6 +1496,8 @@ bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev)
default:
return false;
}
if (adev->flags & AMD_IS_APU)
return false;
return pcie_aspm_enabled(adev->pdev);
}