* [PATCH 2/2] drm/amd/powerplay: add registry key to disable ACG
@ 2018-04-19 7:11 Kenneth Feng
[not found] ` <1524121896-24753-1-git-send-email-kenneth.feng-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Kenneth Feng @ 2018-04-19 7:11 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Kenneth Feng
For the dummy ACG fuses,need to disable ACG, otherwise
corruption will be caused.
Change-Id: I03db372bb6e934e9230f0745aa19c683adfdeccb
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c | 5 +++++
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
index 7fa1ba8..888ddca 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
@@ -224,6 +224,11 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
ppsmc_pptable->AcgGfxclkSpreadPercent = smc_dpm_table.acggfxclkspreadpercent;
ppsmc_pptable->AcgGfxclkSpreadFreq = smc_dpm_table.acggfxclkspreadfreq;
+ /* 0xFFFF will disable the ACG feature */
+ if (!(hwmgr->feature_mask & PP_ACG_MASK)) {
+ ppsmc_pptable->AcgThresholdFreqHigh = 0xFFFF;
+ ppsmc_pptable->AcgThresholdFreqLow = 0xFFFF;
+ }
return 0;
}
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
index 9b3dd7d..9afa5fe 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
@@ -82,6 +82,7 @@ enum PP_FEATURE_MASK {
PP_SOCCLK_DPM_MASK = 0x1000,
PP_DCEFCLK_DPM_MASK = 0x2000,
PP_OVERDRIVE_MASK = 0x4000,
+ PP_ACG_MASK = 0x10000000,
};
enum PHM_BackEnd_Magic {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] drm/amd/powerplay: add registry key to disable ACG
[not found] ` <1524121896-24753-1-git-send-email-kenneth.feng-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-19 7:47 ` Huang Rui
0 siblings, 0 replies; 2+ messages in thread
From: Huang Rui @ 2018-04-19 7:47 UTC (permalink / raw)
To: Kenneth Feng; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, Apr 19, 2018 at 03:11:36PM +0800, Kenneth Feng wrote:
> For the dummy ACG fuses,need to disable ACG, otherwise
> corruption will be caused.
>
> Change-Id: I03db372bb6e934e9230f0745aa19c683adfdeccb
> Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c | 5 +++++
> drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
> index 7fa1ba8..888ddca 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
> @@ -224,6 +224,11 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
> ppsmc_pptable->AcgGfxclkSpreadPercent = smc_dpm_table.acggfxclkspreadpercent;
> ppsmc_pptable->AcgGfxclkSpreadFreq = smc_dpm_table.acggfxclkspreadfreq;
>
> + /* 0xFFFF will disable the ACG feature */
> + if (!(hwmgr->feature_mask & PP_ACG_MASK)) {
> + ppsmc_pptable->AcgThresholdFreqHigh = 0xFFFF;
> + ppsmc_pptable->AcgThresholdFreqLow = 0xFFFF;
> + }
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> index 9b3dd7d..9afa5fe 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> @@ -82,6 +82,7 @@ enum PP_FEATURE_MASK {
> PP_SOCCLK_DPM_MASK = 0x1000,
> PP_DCEFCLK_DPM_MASK = 0x2000,
> PP_OVERDRIVE_MASK = 0x4000,
> + PP_ACG_MASK = 0x10000000,
Actually, we use bit map to indicate different power features, and use bit
one by one on that feature_mask.
PP_DCEFCLK_DPM_MASK = 1 << 13
PP_OVERDRIVE_MASK = 1 << 14
And in another patch, I add gfxoff feature mask below:
PP_GFXOFF_MASK = 0x8000 = 1 << 15
So I suggest you can set
PP_ACG_MASK = 0x10000 = 1 << 16 here.
Thanks,
Ray
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-19 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 7:11 [PATCH 2/2] drm/amd/powerplay: add registry key to disable ACG Kenneth Feng
[not found] ` <1524121896-24753-1-git-send-email-kenneth.feng-5C7GfCeVMHo@public.gmane.org>
2018-04-19 7:47 ` Huang Rui
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.