* [PATCH] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table
@ 2019-11-08 16:17 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2019-11-08 16:17 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
When a custom powerplay table is provided, we need to update
the OD VDDC flag to avoid AVFS being enabled when it shouldn't be.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index c805c6fcdba2..390e7524bef4 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3969,6 +3969,13 @@ static int smu7_set_power_state_tasks(struct pp_hwmgr *hwmgr, const void *input)
"Failed to populate and upload SCLK MCLK DPM levels!",
result = tmp_result);
+ /*
+ * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC flag.
+ * That effectively disables AVFS feature.
+ */
+ if (hwmgr->hardcode_pp_table != NULL)
+ data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC;
+
tmp_result = smu7_update_avfs(hwmgr);
PP_ASSERT_WITH_CODE((0 == tmp_result),
"Failed to update avfs voltages!",
--
2.23.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] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table
@ 2019-11-08 16:17 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2019-11-08 16:17 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
When a custom powerplay table is provided, we need to update
the OD VDDC flag to avoid AVFS being enabled when it shouldn't be.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index c805c6fcdba2..390e7524bef4 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3969,6 +3969,13 @@ static int smu7_set_power_state_tasks(struct pp_hwmgr *hwmgr, const void *input)
"Failed to populate and upload SCLK MCLK DPM levels!",
result = tmp_result);
+ /*
+ * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC flag.
+ * That effectively disables AVFS feature.
+ */
+ if (hwmgr->hardcode_pp_table != NULL)
+ data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC;
+
tmp_result = smu7_update_avfs(hwmgr);
PP_ASSERT_WITH_CODE((0 == tmp_result),
"Failed to update avfs voltages!",
--
2.23.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] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table
@ 2019-11-11 3:06 ` Quan, Evan
0 siblings, 0 replies; 4+ messages in thread
From: Quan, Evan @ 2019-11-11 3:06 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Deucher, Alexander
Reviewed-by: Evan Quan <evan.quan@amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Saturday, November 9, 2019 12:18 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom
> powerplay table
>
> When a custom powerplay table is provided, we need to update the OD VDDC
> flag to avoid AVFS being enabled when it shouldn't be.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> index c805c6fcdba2..390e7524bef4 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> @@ -3969,6 +3969,13 @@ static int smu7_set_power_state_tasks(struct
> pp_hwmgr *hwmgr, const void *input)
> "Failed to populate and upload SCLK MCLK DPM
> levels!",
> result = tmp_result);
>
> + /*
> + * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC
> flag.
> + * That effectively disables AVFS feature.
> + */
> + if (hwmgr->hardcode_pp_table != NULL)
> + data->need_update_smu7_dpm_table |=
> DPMTABLE_OD_UPDATE_VDDC;
> +
> tmp_result = smu7_update_avfs(hwmgr);
> PP_ASSERT_WITH_CODE((0 == tmp_result),
> "Failed to update avfs voltages!",
> --
> 2.23.0
>
> _______________________________________________
> 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] 4+ messages in thread
* RE: [PATCH] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table
@ 2019-11-11 3:06 ` Quan, Evan
0 siblings, 0 replies; 4+ messages in thread
From: Quan, Evan @ 2019-11-11 3:06 UTC (permalink / raw)
To: Alex Deucher, amd-gfx; +Cc: Deucher, Alexander
Reviewed-by: Evan Quan <evan.quan@amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Saturday, November 9, 2019 12:18 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom
> powerplay table
>
> When a custom powerplay table is provided, we need to update the OD VDDC
> flag to avoid AVFS being enabled when it shouldn't be.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> index c805c6fcdba2..390e7524bef4 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> @@ -3969,6 +3969,13 @@ static int smu7_set_power_state_tasks(struct
> pp_hwmgr *hwmgr, const void *input)
> "Failed to populate and upload SCLK MCLK DPM
> levels!",
> result = tmp_result);
>
> + /*
> + * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC
> flag.
> + * That effectively disables AVFS feature.
> + */
> + if (hwmgr->hardcode_pp_table != NULL)
> + data->need_update_smu7_dpm_table |=
> DPMTABLE_OD_UPDATE_VDDC;
> +
> tmp_result = smu7_update_avfs(hwmgr);
> PP_ASSERT_WITH_CODE((0 == tmp_result),
> "Failed to update avfs voltages!",
> --
> 2.23.0
>
> _______________________________________________
> 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] 4+ messages in thread
end of thread, other threads:[~2019-11-11 3:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 16:17 [PATCH] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table Alex Deucher
2019-11-08 16:17 ` Alex Deucher
[not found] ` <20191108161759.2130602-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-11-11 3:06 ` Quan, Evan
2019-11-11 3:06 ` Quan, Evan
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.