From: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH v2 3/7] drm/amd/pp: Disable OD feature if VBIOS limits
Date: Fri, 19 Jan 2018 16:10:07 +0800 [thread overview]
Message-ID: <1516349411-18102-4-git-send-email-Rex.Zhu@amd.com> (raw)
In-Reply-To: <1516349411-18102-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Change-Id: Iea7d6ffe3d0139fa4780256e3975f966e2dc4d72
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..624c220 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_info("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..b1d4a10 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_info("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..8dc1aed 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_info("OverDrive feature not support by VBIOS\n");
}
return 0;
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-01-19 8:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 8:10 [PATCH v2 0/7] Add sysfs to support OverDrive feature Rex Zhu
[not found] ` <1516349411-18102-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-01-19 8:10 ` [PATCH v2 1/7] drm/amd/pp: Add hwmgr interface for edit dpm table Rex Zhu
2018-01-19 8:10 ` [PATCH v2 2/7] drm/amd/pp: Add edit/commit/show OD clock/voltage support in sysfs Rex Zhu
2018-01-19 8:10 ` Rex Zhu [this message]
[not found] ` <1516349411-18102-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-01-19 17:21 ` [PATCH v2 3/7] drm/amd/pp: Disable OD feature if VBIOS limits Alex Deucher
2018-01-19 8:10 ` [PATCH v2 4/7] drm/amd/pp: Disable OD feature on CI/Iceland Rex Zhu
[not found] ` <1516349411-18102-5-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-01-19 17:23 ` Alex Deucher
2018-01-19 8:10 ` [PATCH v2 5/7] drm/amd/pp: Implement edit_dpm_table on smu7 Rex Zhu
[not found] ` <1516349411-18102-6-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-01-19 17:24 ` Alex Deucher
2018-01-22 4:17 ` 答复: " Quan, Evan
2018-01-19 8:10 ` [PATCH v2 6/7] drm/amd/pp: Update smu7 dpm table with OD clock/voltage Rex Zhu
[not found] ` <1516349411-18102-7-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-01-22 4:31 ` 答复: " Quan, Evan
2018-01-19 8:10 ` [PATCH v2 7/7] drm/amd/pp: Add update_avfs call when set_power_state Rex Zhu
[not found] ` <1516349411-18102-8-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-01-22 4:57 ` 答复: " Quan, Evan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516349411-18102-4-git-send-email-Rex.Zhu@amd.com \
--to=rex.zhu-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox