diff options
author | Kenneth Feng <kenneth.feng@amd.com> | 2021-04-14 13:34:55 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-04-15 23:32:44 +0300 |
commit | 9d015c0dae05e7650000f2d51f3c80c6c77fdde5 (patch) | |
tree | ce98a341aacf1860534a0081904eb2acc95839e3 /drivers/gpu/drm/amd/amdgpu/soc15.c | |
parent | 3273f8b9e652f2c363c262c0fc90764f159b4cc6 (diff) | |
download | linux-9d015c0dae05e7650000f2d51f3c80c6c77fdde5.tar.xz |
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.c | 7 |
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, |