* [PATCH] drm/amd/powerplay: set max fan target temperature as 105C
@ 2019-02-25 7:06 Evan Quan
[not found] ` <20190225070646.5392-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Evan Quan @ 2019-02-25 7:06 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Evan Quan
A workaround to override the fan target temperature in SMC table.
Change-Id: I67845c2fe5f51abde1ac483a979bde43ce2f26d3
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
.../powerplay/hwmgr/vega20_processpptables.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
index 97f8a1a970c3..7a7f15d0c53a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
@@ -32,6 +32,8 @@
#include "cgs_common.h"
#include "vega20_pptable.h"
+#define VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE 105
+
static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
enum phm_platform_caps cap)
{
@@ -798,6 +800,17 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
return 0;
}
+static int override_powerplay_table_fantargettemperature(struct pp_hwmgr *hwmgr)
+{
+ struct phm_ppt_v3_information *pptable_information =
+ (struct phm_ppt_v3_information *)hwmgr->pptable;
+ PPTable_t *ppsmc_pptable = (PPTable_t *)(pptable_information->smc_pptable);
+
+ ppsmc_pptable->FanTargetTemperature = VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE;
+
+ return 0;
+}
+
#define VEGA20_ENGINECLOCK_HARDMAX 198000
static int init_powerplay_table_information(
struct pp_hwmgr *hwmgr,
@@ -887,6 +900,10 @@ static int init_powerplay_table_information(
result = append_vbios_pptable(hwmgr, (pptable_information->smc_pptable));
+ if (result)
+ return result;
+
+ result = override_powerplay_table_fantargettemperature(hwmgr);
return result;
}
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amd/powerplay: set max fan target temperature as 105C
[not found] ` <20190225070646.5392-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-25 8:02 ` Feng, Kenneth
2019-02-25 14:39 ` Deucher, Alexander
1 sibling, 0 replies; 3+ messages in thread
From: Feng, Kenneth @ 2019-02-25 8:02 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Quan, Evan
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Evan Quan
Sent: Monday, February 25, 2019 3:07 PM
To: amd-gfx@lists.freedesktop.org
Cc: Quan, Evan <Evan.Quan@amd.com>
Subject: [PATCH] drm/amd/powerplay: set max fan target temperature as 105C
A workaround to override the fan target temperature in SMC table.
Change-Id: I67845c2fe5f51abde1ac483a979bde43ce2f26d3
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
.../powerplay/hwmgr/vega20_processpptables.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
index 97f8a1a970c3..7a7f15d0c53a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
@@ -32,6 +32,8 @@
#include "cgs_common.h"
#include "vega20_pptable.h"
+#define VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE 105
+
static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
enum phm_platform_caps cap)
{
@@ -798,6 +800,17 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
return 0;
}
+static int override_powerplay_table_fantargettemperature(struct
+pp_hwmgr *hwmgr) {
+ struct phm_ppt_v3_information *pptable_information =
+ (struct phm_ppt_v3_information *)hwmgr->pptable;
+ PPTable_t *ppsmc_pptable = (PPTable_t
+*)(pptable_information->smc_pptable);
+
+ ppsmc_pptable->FanTargetTemperature =
+VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE;
+
+ return 0;
+}
+
#define VEGA20_ENGINECLOCK_HARDMAX 198000 static int init_powerplay_table_information(
struct pp_hwmgr *hwmgr,
@@ -887,6 +900,10 @@ static int init_powerplay_table_information(
result = append_vbios_pptable(hwmgr, (pptable_information->smc_pptable));
+ if (result)
+ return result;
+
+ result = override_powerplay_table_fantargettemperature(hwmgr);
return result;
}
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amd/powerplay: set max fan target temperature as 105C
[not found] ` <20190225070646.5392-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-02-25 8:02 ` Feng, Kenneth
@ 2019-02-25 14:39 ` Deucher, Alexander
1 sibling, 0 replies; 3+ messages in thread
From: Deucher, Alexander @ 2019-02-25 14:39 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Quan, Evan
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Evan
> Quan
> Sent: Monday, February 25, 2019 2:07 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan@amd.com>
> Subject: [PATCH] drm/amd/powerplay: set max fan target temperature as
> 105C
>
> A workaround to override the fan target temperature in SMC table.
>
> Change-Id: I67845c2fe5f51abde1ac483a979bde43ce2f26d3
> Signed-off-by: Evan Quan <evan.quan@amd.com>
> ---
> .../powerplay/hwmgr/vega20_processpptables.c | 17
> +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git
> a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> index 97f8a1a970c3..7a7f15d0c53a 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> @@ -32,6 +32,8 @@
> #include "cgs_common.h"
> #include "vega20_pptable.h"
>
> +#define VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE 105
> +
> static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
> enum phm_platform_caps cap)
> {
> @@ -798,6 +800,17 @@ static int append_vbios_pptable(struct pp_hwmgr
> *hwmgr, PPTable_t *ppsmc_pptable
> return 0;
> }
>
> +static int override_powerplay_table_fantargettemperature(struct
> +pp_hwmgr *hwmgr) {
> + struct phm_ppt_v3_information *pptable_information =
> + (struct phm_ppt_v3_information *)hwmgr->pptable;
> + PPTable_t *ppsmc_pptable = (PPTable_t
> +*)(pptable_information->smc_pptable);
> +
> + ppsmc_pptable->FanTargetTemperature =
> +VEGA20_FAN_TARGET_TEMPERATURE_OVERRIDE;
> +
> + return 0;
> +}
> +
> #define VEGA20_ENGINECLOCK_HARDMAX 198000 static int
> init_powerplay_table_information(
> struct pp_hwmgr *hwmgr,
> @@ -887,6 +900,10 @@ static int init_powerplay_table_information(
>
>
> result = append_vbios_pptable(hwmgr, (pptable_information-
> >smc_pptable));
> + if (result)
> + return result;
> +
> + result = override_powerplay_table_fantargettemperature(hwmgr);
>
> return result;
> }
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-25 14:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 7:06 [PATCH] drm/amd/powerplay: set max fan target temperature as 105C Evan Quan
[not found] ` <20190225070646.5392-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-02-25 8:02 ` Feng, Kenneth
2019-02-25 14:39 ` 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.