* [PATCH] drm/amd/pp: Clean register first to avoid read original value
@ 2018-03-30 7:33 Rex Zhu
[not found] ` <1522395206-5860-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Rex Zhu @ 2018-03-30 7:33 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index aaa9f5b..38cf3a1 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr,
"Failed to start pm status log!",
return -1);
+ cgs_write_ind_register(hwmgr->device,
+ CGS_IND_REG__SMC,
+ ixSMU_PM_STATUS_40, 0);
+ cgs_write_ind_register(hwmgr->device,
+ CGS_IND_REG__SMC,
+ ixSMU_PM_STATUS_49, 0);
+ cgs_write_ind_register(hwmgr->device,
+ CGS_IND_REG__SMC,
+ ixSMU_PM_STATUS_94, 0);
+ cgs_write_ind_register(hwmgr->device,
+ CGS_IND_REG__SMC,
+ ixSMU_PM_STATUS_95, 0);
+
/* Sampling period from 50ms to 4sec */
msleep_interruptible(200);
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1522395206-5860-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value [not found] ` <1522395206-5860-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org> @ 2018-03-30 12:53 ` Deucher, Alexander 2018-03-30 14:36 ` Eric Huang 1 sibling, 0 replies; 6+ messages in thread From: Deucher, Alexander @ 2018-03-30 12:53 UTC (permalink / raw) To: Zhu, Rex, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org [-- Attachment #1.1: Type: text/plain, Size: 1912 bytes --] Reviewed-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org> ________________________________ From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org> Sent: Friday, March 30, 2018 3:33:26 AM To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Cc: Zhu, Rex Subject: [PATCH] drm/amd/pp: Clean register first to avoid read original value Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org> --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index aaa9f5b..38cf3a1 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c @@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, "Failed to start pm status log!", return -1); + cgs_write_ind_register(hwmgr->device, + CGS_IND_REG__SMC, + ixSMU_PM_STATUS_40, 0); + cgs_write_ind_register(hwmgr->device, + CGS_IND_REG__SMC, + ixSMU_PM_STATUS_49, 0); + cgs_write_ind_register(hwmgr->device, + CGS_IND_REG__SMC, + ixSMU_PM_STATUS_94, 0); + cgs_write_ind_register(hwmgr->device, + CGS_IND_REG__SMC, + ixSMU_PM_STATUS_95, 0); + /* Sampling period from 50ms to 4sec */ msleep_interruptible(200); -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx [-- Attachment #1.2: Type: text/html, Size: 4386 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] 6+ messages in thread
* Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value [not found] ` <1522395206-5860-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org> 2018-03-30 12:53 ` Deucher, Alexander @ 2018-03-30 14:36 ` Eric Huang [not found] ` <c42b3004-8b75-60d2-0f2b-45e1e9a2f1f6-5C7GfCeVMHo@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Eric Huang @ 2018-03-30 14:36 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW It is not necessary to do that. The register will reset to 0 after reading. Eric On 03/30/2018 03:33 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > index aaa9f5b..38cf3a1 100644 > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > @@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, > "Failed to start pm status log!", > return -1); > > + cgs_write_ind_register(hwmgr->device, > + CGS_IND_REG__SMC, > + ixSMU_PM_STATUS_40, 0); > + cgs_write_ind_register(hwmgr->device, > + CGS_IND_REG__SMC, > + ixSMU_PM_STATUS_49, 0); > + cgs_write_ind_register(hwmgr->device, > + CGS_IND_REG__SMC, > + ixSMU_PM_STATUS_94, 0); > + cgs_write_ind_register(hwmgr->device, > + CGS_IND_REG__SMC, > + ixSMU_PM_STATUS_95, 0); > + > /* Sampling period from 50ms to 4sec */ > msleep_interruptible(200); > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <c42b3004-8b75-60d2-0f2b-45e1e9a2f1f6-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value [not found] ` <c42b3004-8b75-60d2-0f2b-45e1e9a2f1f6-5C7GfCeVMHo@public.gmane.org> @ 2018-03-30 15:22 ` Eric Huang [not found] ` <9bac98b9-4add-6214-f461-bfd91d5636ad-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Eric Huang @ 2018-03-30 15:22 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On 03/30/2018 10:36 AM, Eric Huang wrote: > It is not necessary to do that. The register will reset to 0 after > reading. The register is not reset after reading. Actually after PPSMC_MSG_PmStatusLogSample sent, the register will be updated. So it is still not necessary to do that. Eric > > Eric > > > On 03/30/2018 03:33 AM, Rex Zhu wrote: >> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> >> --- >> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> index aaa9f5b..38cf3a1 100644 >> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> @@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr >> *hwmgr, >> "Failed to start pm status log!", >> return -1); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_40, 0); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_49, 0); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_94, 0); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_95, 0); >> + >> /* Sampling period from 50ms to 4sec */ >> msleep_interruptible(200); > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <9bac98b9-4add-6214-f461-bfd91d5636ad-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value [not found] ` <9bac98b9-4add-6214-f461-bfd91d5636ad-5C7GfCeVMHo@public.gmane.org> @ 2018-03-31 0:28 ` Zhu, Rex [not found] ` <CY4PR12MB16872AF3D8207BF4ACBC023FFBA00-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Zhu, Rex @ 2018-03-31 0:28 UTC (permalink / raw) To: Huang, JinHuiEric, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org [-- Attachment #1.1: Type: text/plain, Size: 2685 bytes --] when PPSMC_MSG_PmStatusLogSample sent, firmware will clean the temp sampling date, and add the sample task to dpm loop. but firmware not clean the registers. if firmware not update the registers, we will read out the original value. Best Regards Rex ________________________________ From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Eric Huang <jinhuieric.huang-5C7GfCeVMHo@public.gmane.org> Sent: Friday, March 30, 2018 11:22 PM To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Subject: Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value On 03/30/2018 10:36 AM, Eric Huang wrote: > It is not necessary to do that. The register will reset to 0 after > reading. The register is not reset after reading. Actually after PPSMC_MSG_PmStatusLogSample sent, the register will be updated. So it is still not necessary to do that. Eric > > Eric > > > On 03/30/2018 03:33 AM, Rex Zhu wrote: >> Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org> >> --- >> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> index aaa9f5b..38cf3a1 100644 >> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> @@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr >> *hwmgr, >> "Failed to start pm status log!", >> return -1); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_40, 0); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_49, 0); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_94, 0); >> + cgs_write_ind_register(hwmgr->device, >> + CGS_IND_REG__SMC, >> + ixSMU_PM_STATUS_95, 0); >> + >> /* Sampling period from 50ms to 4sec */ >> msleep_interruptible(200); > _______________________________________________ amd-gfx mailing list amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx> lists.freedesktop.org Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct. [-- Attachment #1.2: Type: text/html, Size: 7308 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 [flat|nested] 6+ messages in thread
[parent not found: <CY4PR12MB16872AF3D8207BF4ACBC023FFBA00-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
* Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value [not found] ` <CY4PR12MB16872AF3D8207BF4ACBC023FFBA00-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> @ 2018-03-31 1:45 ` Eric Huang 0 siblings, 0 replies; 6+ messages in thread From: Eric Huang @ 2018-03-31 1:45 UTC (permalink / raw) To: Zhu, Rex, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org [-- Attachment #1.1: Type: text/plain, Size: 3064 bytes --] Please confirm this with SMU team about your assumption. Regards, Eric On 03/30/2018 08:28 PM, Zhu, Rex wrote: > > when PPSMC_MSG_PmStatusLogSample sent, firmware will clean the temp > sampling date, and add the sample task to dpm loop. > > but firmware not clean the registers. if firmware not update the > registers, we will read out the original value. > > > Best Regards > > Rex > > > > > ------------------------------------------------------------------------ > *From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of > Eric Huang <jinhuieric.huang-5C7GfCeVMHo@public.gmane.org> > *Sent:* Friday, March 30, 2018 11:22 PM > *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > *Subject:* Re: [PATCH] drm/amd/pp: Clean register first to avoid read > original value > > On 03/30/2018 10:36 AM, Eric Huang wrote: > > It is not necessary to do that. The register will reset to 0 after > > reading. > The register is not reset after reading. Actually after > PPSMC_MSG_PmStatusLogSample sent, the register will be updated. So it is > still not necessary to do that. > > Eric > > > > Eric > > > > > > On 03/30/2018 03:33 AM, Rex Zhu wrote: > >> Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org> > >> --- > >> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++ > >> 1 file changed, 13 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > >> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > >> index aaa9f5b..38cf3a1 100644 > >> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > >> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > >> @@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr > >> *hwmgr, > >> "Failed to start pm status log!", > >> return -1); > >> + cgs_write_ind_register(hwmgr->device, > >> + CGS_IND_REG__SMC, > >> + ixSMU_PM_STATUS_40, 0); > >> + cgs_write_ind_register(hwmgr->device, > >> + CGS_IND_REG__SMC, > >> + ixSMU_PM_STATUS_49, 0); > >> + cgs_write_ind_register(hwmgr->device, > >> + CGS_IND_REG__SMC, > >> + ixSMU_PM_STATUS_94, 0); > >> + cgs_write_ind_register(hwmgr->device, > >> + CGS_IND_REG__SMC, > >> + ixSMU_PM_STATUS_95, 0); > >> + > >> /* Sampling period from 50ms to 4sec */ > >> msleep_interruptible(200); > > > > _______________________________________________ > amd-gfx mailing list > amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > amd-gfx Info Page - freedesktop.org > <https://lists.freedesktop.org/mailman/listinfo/amd-gfx> > lists.freedesktop.org > Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the > following form. Use of all freedesktop.org lists is subject to our > Code of Conduct. > > > [-- Attachment #1.2: Type: text/html, Size: 10827 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 [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-03-31 1:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-30 7:33 [PATCH] drm/amd/pp: Clean register first to avoid read original value Rex Zhu
[not found] ` <1522395206-5860-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-30 12:53 ` Deucher, Alexander
2018-03-30 14:36 ` Eric Huang
[not found] ` <c42b3004-8b75-60d2-0f2b-45e1e9a2f1f6-5C7GfCeVMHo@public.gmane.org>
2018-03-30 15:22 ` Eric Huang
[not found] ` <9bac98b9-4add-6214-f461-bfd91d5636ad-5C7GfCeVMHo@public.gmane.org>
2018-03-31 0:28 ` Zhu, Rex
[not found] ` <CY4PR12MB16872AF3D8207BF4ACBC023FFBA00-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-03-31 1:45 ` Eric Huang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox