* [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting
@ 2020-08-21 4:42 Evan Quan
2020-08-21 4:42 ` [PATCH 2/3] drm/amd/pm: correct Vega12 " Evan Quan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Evan Quan @ 2020-08-21 4:42 UTC (permalink / raw)
To: amd-gfx; +Cc: alexander.deucher, Evan Quan
Correct the Vega10 thermal swctf limit.
Change-Id: I220c18bcb0772bfb8cb674337bac6dccafbd7698
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
index 468bdd6f6697..ce9514c881ec 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
@@ -363,6 +363,9 @@ int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
struct PP_TemperatureRange *range)
{
+ struct phm_ppt_v2_information *pp_table_info =
+ (struct phm_ppt_v2_information *)(hwmgr->pptable);
+ struct phm_tdp_table *tdp_table = pp_table_info->tdp_table;
struct amdgpu_device *adev = hwmgr->adev;
int low = VEGA10_THERMAL_MINIMUM_ALERT_TEMP *
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
@@ -372,8 +375,8 @@ static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
if (low < range->min)
low = range->min;
- if (high > range->max)
- high = range->max;
+ if (high > tdp_table->usSoftwareShutdownTemp)
+ high = tdp_table->usSoftwareShutdownTemp;
if (low > high)
return -EINVAL;
--
2.28.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] drm/amd/pm: correct Vega12 swctf limit setting
2020-08-21 4:42 [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting Evan Quan
@ 2020-08-21 4:42 ` Evan Quan
2020-08-21 4:42 ` [PATCH 3/3] drm/amd/pm: correct Vega20 " Evan Quan
2020-08-21 13:10 ` [PATCH 1/3] drm/amd/pm: correct Vega10 " Deucher, Alexander
2 siblings, 0 replies; 4+ messages in thread
From: Evan Quan @ 2020-08-21 4:42 UTC (permalink / raw)
To: amd-gfx; +Cc: alexander.deucher, Evan Quan
Correct the Vega12 thermal swctf limit.
Change-Id: I369e1adf9f177a8d9558282db9aa908b5a25bbb3
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
index c15b9756025d..e755fc0c9886 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
@@ -170,6 +170,8 @@ int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
struct PP_TemperatureRange *range)
{
+ struct phm_ppt_v3_information *pptable_information =
+ (struct phm_ppt_v3_information *)hwmgr->pptable;
struct amdgpu_device *adev = hwmgr->adev;
int low = VEGA12_THERMAL_MINIMUM_ALERT_TEMP *
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
@@ -179,8 +181,8 @@ static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
if (low < range->min)
low = range->min;
- if (high > range->max)
- high = range->max;
+ if (high > pptable_information->us_software_shutdown_temp)
+ high = pptable_information->us_software_shutdown_temp;
if (low > high)
return -EINVAL;
--
2.28.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] drm/amd/pm: correct Vega20 swctf limit setting
2020-08-21 4:42 [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting Evan Quan
2020-08-21 4:42 ` [PATCH 2/3] drm/amd/pm: correct Vega12 " Evan Quan
@ 2020-08-21 4:42 ` Evan Quan
2020-08-21 13:10 ` [PATCH 1/3] drm/amd/pm: correct Vega10 " Deucher, Alexander
2 siblings, 0 replies; 4+ messages in thread
From: Evan Quan @ 2020-08-21 4:42 UTC (permalink / raw)
To: amd-gfx; +Cc: alexander.deucher, Evan Quan
Correct the Vega20 thermal swctf limit.
Change-Id: I6cec41152b5ac377177b1a9fda92d7b6cd982e9e
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
index 7add2f60f49c..a9bc9d16641a 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
@@ -240,6 +240,8 @@ int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr)
static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
struct PP_TemperatureRange *range)
{
+ struct phm_ppt_v3_information *pptable_information =
+ (struct phm_ppt_v3_information *)hwmgr->pptable;
struct amdgpu_device *adev = hwmgr->adev;
int low = VEGA20_THERMAL_MINIMUM_ALERT_TEMP *
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
@@ -249,8 +251,8 @@ static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
if (low < range->min)
low = range->min;
- if (high > range->max)
- high = range->max;
+ if (high > pptable_information->us_software_shutdown_temp)
+ high = pptable_information->us_software_shutdown_temp;
if (low > high)
return -EINVAL;
--
2.28.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting
2020-08-21 4:42 [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting Evan Quan
2020-08-21 4:42 ` [PATCH 2/3] drm/amd/pm: correct Vega12 " Evan Quan
2020-08-21 4:42 ` [PATCH 3/3] drm/amd/pm: correct Vega20 " Evan Quan
@ 2020-08-21 13:10 ` Deucher, Alexander
2 siblings, 0 replies; 4+ messages in thread
From: Deucher, Alexander @ 2020-08-21 13:10 UTC (permalink / raw)
To: Quan, Evan, amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2113 bytes --]
[AMD Official Use Only - Internal Distribution Only]
Might want to add:
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1267
with that, the series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: Quan, Evan <Evan.Quan@amd.com>
Sent: Friday, August 21, 2020 12:42 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Quan, Evan <Evan.Quan@amd.com>
Subject: [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting
Correct the Vega10 thermal swctf limit.
Change-Id: I220c18bcb0772bfb8cb674337bac6dccafbd7698
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
index 468bdd6f6697..ce9514c881ec 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
@@ -363,6 +363,9 @@ int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
struct PP_TemperatureRange *range)
{
+ struct phm_ppt_v2_information *pp_table_info =
+ (struct phm_ppt_v2_information *)(hwmgr->pptable);
+ struct phm_tdp_table *tdp_table = pp_table_info->tdp_table;
struct amdgpu_device *adev = hwmgr->adev;
int low = VEGA10_THERMAL_MINIMUM_ALERT_TEMP *
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
@@ -372,8 +375,8 @@ static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
if (low < range->min)
low = range->min;
- if (high > range->max)
- high = range->max;
+ if (high > tdp_table->usSoftwareShutdownTemp)
+ high = tdp_table->usSoftwareShutdownTemp;
if (low > high)
return -EINVAL;
--
2.28.0
[-- Attachment #1.2: Type: text/html, Size: 4466 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-21 13:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21 4:42 [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting Evan Quan
2020-08-21 4:42 ` [PATCH 2/3] drm/amd/pm: correct Vega12 " Evan Quan
2020-08-21 4:42 ` [PATCH 3/3] drm/amd/pm: correct Vega20 " Evan Quan
2020-08-21 13:10 ` [PATCH 1/3] drm/amd/pm: correct Vega10 " Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.