diff options
| author | Mario Limonciello <[email protected]> | 2023-10-23 20:47:43 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-10-26 22:41:23 +0000 |
| commit | 1a6513de493d13f8d7501611fcc5bbaea4c799b3 (patch) | |
| tree | 7e424d0f0049c19289d311a628112212fcb55119 /drivers/gpu/drm/amd/amdgpu/vi.c | |
| parent | drm/amd: Disable PP_PCIE_DPM_MASK when dynamic speed switching not supported (diff) | |
| download | kernel-1a6513de493d13f8d7501611fcc5bbaea4c799b3.tar.gz kernel-1a6513de493d13f8d7501611fcc5bbaea4c799b3.zip | |
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 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vi.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index fe8ba9e9837b..1a08052bade3 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -1127,8 +1127,7 @@ static void vi_program_aspm(struct amdgpu_device *adev) if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_pcie_dynamic_switching_supported()) return; - if (adev->flags & AMD_IS_APU || - adev->asic_type < CHIP_POLARIS10) + if (adev->asic_type < CHIP_POLARIS10) return; orig = data = RREG32_PCIE(ixPCIE_LC_CNTL); |
