aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3223-drm-amd-pp-Disable-OD-feature-if-VBIOS-limits.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3223-drm-amd-pp-Disable-OD-feature-if-VBIOS-limits.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3223-drm-amd-pp-Disable-OD-feature-if-VBIOS-limits.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3223-drm-amd-pp-Disable-OD-feature-if-VBIOS-limits.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3223-drm-amd-pp-Disable-OD-feature-if-VBIOS-limits.patch
new file mode 100644
index 00000000..5ed94f0a
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3223-drm-amd-pp-Disable-OD-feature-if-VBIOS-limits.patch
@@ -0,0 +1,79 @@
+From 05d6bc7ff33b161af5120626254fd17196292b0c Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Fri, 19 Jan 2018 13:21:52 +0800
+Subject: [PATCH 3223/4131] drm/amd/pp: Disable OD feature if VBIOS limits
+
+Check vbios to determine whether we can enable OD
+
+Change-Id: I482ce1f9ada82255d02d6e3f27b1a3cd68578d14
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 8 ++++----
+ drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 11 +++++------
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 8 ++++----
+ 3 files changed, 13 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
+index b49d65c..c9eecce 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
+@@ -836,10 +836,10 @@ static int init_over_drive_limits(
+ hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
+ hwmgr->platform_descriptor.overdriveVDDCStep = 0;
+
+- if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 \
+- && hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0) {
+- phm_cap_set(hwmgr->platform_descriptor.platformCaps,
+- PHM_PlatformCaps_ACOverdriveSupport);
++ if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 \
++ || hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
++ hwmgr->od_enabled = false;
++ pr_debug("OverDrive feature not support by VBIOS\n");
+ }
+
+ return 0;
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
+index c3e7e34..815c9bc 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
+@@ -1074,12 +1074,11 @@ static int init_overdrive_limits(struct pp_hwmgr *hwmgr,
+ powerplay_table,
+ (const ATOM_FIRMWARE_INFO_V2_1 *)fw_info);
+
+- if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0
+- && hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0
+- && !phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+- PHM_PlatformCaps_OverdriveDisabledByPowerBudget))
+- phm_cap_set(hwmgr->platform_descriptor.platformCaps,
+- PHM_PlatformCaps_ACOverdriveSupport);
++ if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0
++ && hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
++ hwmgr->od_enabled = false;
++ pr_debug("OverDrive feature not support by VBIOS\n");
++ }
+
+ return result;
+ }
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
+index f14c761..6d44cf0 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
+@@ -267,10 +267,10 @@ static int init_over_drive_limits(
+ hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
+ hwmgr->platform_descriptor.overdriveVDDCStep = 0;
+
+- if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 &&
+- hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0) {
+- phm_cap_set(hwmgr->platform_descriptor.platformCaps,
+- PHM_PlatformCaps_ACOverdriveSupport);
++ if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 ||
++ hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) {
++ hwmgr->od_enabled = false;
++ pr_debug("OverDrive feature not support by VBIOS\n");
+ }
+
+ return 0;
+--
+2.7.4
+