diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2023-10-23 15:47:43 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-10-26 18:41:23 -0400 |
commit | 1a6513de493d13f8d7501611fcc5bbaea4c799b3 (patch) | |
tree | 7e424d0f0049c19289d311a628112212fcb55119 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | fbf1035b033a51eee48d5f42e781b02fff272ca0 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 286f3f60c25b..9c51a31864a7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -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); } |