diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-01-19 00:21:52 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:18:18 -0500 |
commit | 3abb20264db563fc45f78ab323d9c6c4c533efe9 (patch) | |
tree | 6627832c00a8bbc0abd3fad1241051a5851090c2 /drivers/gpu | |
parent | e3933f26b657c341055443103bad331f4537b113 (diff) |
drm/amd/pp: Disable OD feature if VBIOS limits
Check vbios to determine whether we can enable OD
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
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 b49d65c3e984..c9eecce5683f 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( | |||
836 | hwmgr->platform_descriptor.maxOverdriveVDDC = 0; | 836 | hwmgr->platform_descriptor.maxOverdriveVDDC = 0; |
837 | hwmgr->platform_descriptor.overdriveVDDCStep = 0; | 837 | hwmgr->platform_descriptor.overdriveVDDCStep = 0; |
838 | 838 | ||
839 | if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 \ | 839 | if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 \ |
840 | && hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0) { | 840 | || hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) { |
841 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | 841 | hwmgr->od_enabled = false; |
842 | PHM_PlatformCaps_ACOverdriveSupport); | 842 | pr_debug("OverDrive feature not support by VBIOS\n"); |
843 | } | 843 | } |
844 | 844 | ||
845 | return 0; | 845 | return 0; |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c index c3e7e34535e8..815c9bcc63fd 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, | |||
1074 | powerplay_table, | 1074 | powerplay_table, |
1075 | (const ATOM_FIRMWARE_INFO_V2_1 *)fw_info); | 1075 | (const ATOM_FIRMWARE_INFO_V2_1 *)fw_info); |
1076 | 1076 | ||
1077 | if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 | 1077 | if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 |
1078 | && hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0 | 1078 | && hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) { |
1079 | && !phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, | 1079 | hwmgr->od_enabled = false; |
1080 | PHM_PlatformCaps_OverdriveDisabledByPowerBudget)) | 1080 | pr_debug("OverDrive feature not support by VBIOS\n"); |
1081 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | 1081 | } |
1082 | PHM_PlatformCaps_ACOverdriveSupport); | ||
1083 | 1082 | ||
1084 | return result; | 1083 | return result; |
1085 | } | 1084 | } |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c index f14c7611fad3..6d44cf043618 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( | |||
267 | hwmgr->platform_descriptor.maxOverdriveVDDC = 0; | 267 | hwmgr->platform_descriptor.maxOverdriveVDDC = 0; |
268 | hwmgr->platform_descriptor.overdriveVDDCStep = 0; | 268 | hwmgr->platform_descriptor.overdriveVDDCStep = 0; |
269 | 269 | ||
270 | if (hwmgr->platform_descriptor.overdriveLimit.engineClock > 0 && | 270 | if (hwmgr->platform_descriptor.overdriveLimit.engineClock == 0 || |
271 | hwmgr->platform_descriptor.overdriveLimit.memoryClock > 0) { | 271 | hwmgr->platform_descriptor.overdriveLimit.memoryClock == 0) { |
272 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | 272 | hwmgr->od_enabled = false; |
273 | PHM_PlatformCaps_ACOverdriveSupport); | 273 | pr_debug("OverDrive feature not support by VBIOS\n"); |
274 | } | 274 | } |
275 | 275 | ||
276 | return 0; | 276 | return 0; |