summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2020-06-22 10:09:13 +0000
committerjsg <jsg@openbsd.org>2020-06-22 10:09:13 +0000
commit37c268c3a0ec66f4877b9310a77a8cbd61727e5b (patch)
tree23847361b7105474705bfc7675633abc921e0ab0
parentdrm/amd/display: Do not disable pipe split if mode is not supported (diff)
downloadwireguard-openbsd-37c268c3a0ec66f4877b9310a77a8cbd61727e5b.tar.xz
wireguard-openbsd-37c268c3a0ec66f4877b9310a77a8cbd61727e5b.zip
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
-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 |