drm/amd: Explicitly disable ASPM when dynamic switching disabled
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 23 Oct 2023 20:50:05 +0000 (15:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Oct 2023 22:41:23 +0000 (18:41 -0400)
commit2757a848cb0f184850d3e0a33b4a69e8014fdc5d
treec236ccc21e39ebe0a4f76add0b4f7f736cefbd20
parent1a6513de493d13f8d7501611fcc5bbaea4c799b3
drm/amd: Explicitly disable ASPM when dynamic switching disabled

Currently there are separate but related checks:
* amdgpu_device_should_use_aspm()
* amdgpu_device_aspm_support_quirk()
* amdgpu_device_pcie_dynamic_switching_supported()

Simplify into checking whether DPM was enabled or not in the auto
case.  This works because amdgpu_device_pcie_dynamic_switching_supported()
populates that value.

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>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/nv.c
drivers/gpu/drm/amd/amdgpu/vi.c