summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-06-22 10:09:14 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-06-22 10:09:14 +0000
commite1e535e0229b21b1e1e89e7e2099b15ba001d4b0 (patch)
tree0d524c1c73b0dd396b93d31a84791e8e351e22a6 /sys
parent83270d0b915a1921d3983a2fb84da8257be96c28 (diff)
drm/amd/powerpay: Disable gfxoff when setting manual mode on picasso and raven
From chen gong 4e88ff94dd359871f609da9f430712fcf7025164 in linux 5.7.y/5.7.5 cbd2d08c7463e78d625a69e9db27ad3004cbbd99 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c
index 7201e6dfae7..0e5b36110a2 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c
@@ -385,6 +385,15 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
return count;
}
+ if (adev->asic_type == CHIP_RAVEN) {
+ if (adev->rev_id < 8) {
+ if (current_level != AMD_DPM_FORCED_LEVEL_MANUAL && level == AMD_DPM_FORCED_LEVEL_MANUAL)
+ amdgpu_gfx_off_ctrl(adev, false);
+ else if (current_level == AMD_DPM_FORCED_LEVEL_MANUAL && level != AMD_DPM_FORCED_LEVEL_MANUAL)
+ amdgpu_gfx_off_ctrl(adev, true);
+ }
+ }
+
/* profile_exit setting is valid only when current mode is in profile mode */
if (!(current_level & (AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD |
AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK |