drm/amd/pm: bug fix for pcie dpm
authorKenneth Feng <kenneth.feng@amd.com>
Tue, 9 Mar 2021 13:10:16 +0000 (21:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:18 +0000 (17:06 +0100)
commit96b097e84101c180bbb09156d9ae6b432d2796d1
treee8d81c10d53653eade72bcd84e90d2273698721b
parent6b9900263a31c8ee40d4457aed045c34c3b676de
drm/amd/pm: bug fix for pcie dpm

commit 50ceb1fe7acd50831180f4b5597bf7b39e8059c8 upstream.

Currently the pcie dpm has two problems.
1. Only the high dpm level speed/width can be overrided
if the requested values are out of the pcie capability.
2. The high dpm level is always overrided though sometimes
it's not necesarry.

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>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c