aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/soc15.c
diff options
context:
space:
mode:
authorKenneth Feng <kenneth.feng@amd.com>2021-04-14 18:34:55 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-04-15 16:32:44 -0400
commit9d015c0dae05e7650000f2d51f3c80c6c77fdde5 (patch)
treece98a341aacf1860534a0081904eb2acc95839e3 /drivers/gpu/drm/amd/amdgpu/soc15.c
parentdrm/amd/amdgpu: enable ASPM on navi1x (diff)
downloadlinux-dev-9d015c0dae05e7650000f2d51f3c80c6c77fdde5.tar.xz
linux-dev-9d015c0dae05e7650000f2d51f3c80c6c77fdde5.zip
drm/amd/amdgpu: enable ASPM on vega
enable ASPM on vega to save the power without the performance hurt. Signed-off-by: Kenneth Feng <kenneth.feng@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/soc15.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc15.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 5c5eb3aed1b3..d80e12b80c7e 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -816,11 +816,12 @@ static void soc15_pcie_gen3_enable(struct amdgpu_device *adev)
static void soc15_program_aspm(struct amdgpu_device *adev)
{
-
- if (amdgpu_aspm == 0)
+ if (amdgpu_aspm != 1)
return;
- /* todo */
+ if (!(adev->flags & AMD_IS_APU) &&
+ (adev->nbio.funcs->program_aspm))
+ adev->nbio.funcs->program_aspm(adev);
}
static void soc15_enable_doorbell_aperture(struct amdgpu_device *adev,