All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: correct SMU11 SYSPLL0 clock id values
@ 2018-05-28  1:11 Evan Quan
       [not found] ` <1527469864-27333-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Evan Quan @ 2018-05-28  1:11 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: alexander.deucher-5C7GfCeVMHo, Evan Quan, rex.zhu-5C7GfCeVMHo

Change-Id: I8dfafcce9e4ed6dabb7025a5a822d1135de6cb8a
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
 drivers/gpu/drm/amd/include/atomfirmware.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
index 95e187e..f25a16b 100644
--- a/drivers/gpu/drm/amd/include/atomfirmware.h
+++ b/drivers/gpu/drm/amd/include/atomfirmware.h
@@ -2112,17 +2112,16 @@ enum atom_smu11_syspll_id {
   SMU11_SYSPLL3_1_ID          = 6,
 };
 
-
-enum atom_smu11_syspll0_clock_id {
-  SMU11_SYSPLL0_SOCCLK_ID   = 0,       //	SOCCLK
-  SMU11_SYSPLL0_MP0CLK_ID   = 1,       //	MP0CLK
-  SMU11_SYSPLL0_DCLK_ID     = 2,       //	DCLK
-  SMU11_SYSPLL0_VCLK_ID     = 3,       //	VCLK
-  SMU11_SYSPLL0_ECLK_ID     = 4,       //	ECLK
+enum atom_smu11_syspll0_clock_id
+{
+  SMU11_SYSPLL0_ECLK_ID     = 0,       //	ECLK
+  SMU11_SYSPLL0_SOCCLK_ID   = 1,       //	SOCCLK
+  SMU11_SYSPLL0_MP0CLK_ID   = 2,       //	MP0CLK
+  SMU11_SYSPLL0_DCLK_ID     = 3,       //	DCLK
+  SMU11_SYSPLL0_VCLK_ID     = 4,       //	VCLK
   SMU11_SYSPLL0_DCEFCLK_ID  = 5,       //	DCEFCLK
 };
 
-
 enum atom_smu11_syspll1_0_clock_id {
   SMU11_SYSPLL1_0_UCLKA_ID   = 0,       // UCLK_a
 };
-- 
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] 4+ messages in thread

* [PATCH 2/2] drm/amd/powerplay: bug fixs for getsmuclockinfo
       [not found] ` <1527469864-27333-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-28  1:11   ` Evan Quan
       [not found]     ` <1527469864-27333-2-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
  2018-05-29  9:55   ` [PATCH 1/2] drm/amdgpu: correct SMU11 SYSPLL0 clock id values Huang Rui
  1 sibling, 1 reply; 4+ messages in thread
From: Evan Quan @ 2018-05-28  1:11 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: alexander.deucher-5C7GfCeVMHo, Evan Quan, rex.zhu-5C7GfCeVMHo

The .syspll_id and .dfsdid are not initialzed correctly. And
le32_to_cpu transfer is needed on the output.

Signed-off-by: Evan Quan <evan.quan@amd.com>

Change-Id: I491e70b276554f38e1a296970892347474814e75
---
 drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
index 60d591e..f9b5815c 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
@@ -496,7 +496,9 @@ int pp_atomfwctrl__get_clk_information_by_clkid(struct pp_hwmgr *hwmgr, BIOS_CLK
 	uint32_t ix;
 
 	parameters.clk_id = id;
+	parameters.syspll_id = 0;
 	parameters.command = GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ;
+	parameters.dfsdid = 0;
 
 	ix = GetIndexIntoMasterCmdTable(getsmuclockinfo);
 
@@ -505,7 +507,7 @@ int pp_atomfwctrl__get_clk_information_by_clkid(struct pp_hwmgr *hwmgr, BIOS_CLK
 		return -EINVAL;
 
 	output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&parameters;
-	*frequency = output->atom_smu_outputclkfreq.smu_clock_freq_hz / 10000;
+	*frequency = le32_to_cpu(output->atom_smu_outputclkfreq.smu_clock_freq_hz) / 10000;
 
 	return 0;
 }
-- 
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] 4+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: correct SMU11 SYSPLL0 clock id values
       [not found] ` <1527469864-27333-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
  2018-05-28  1:11   ` [PATCH 2/2] drm/amd/powerplay: bug fixs for getsmuclockinfo Evan Quan
@ 2018-05-29  9:55   ` Huang Rui
  1 sibling, 0 replies; 4+ messages in thread
From: Huang Rui @ 2018-05-29  9:55 UTC (permalink / raw)
  To: Evan Quan
  Cc: alexander.deucher-5C7GfCeVMHo, rex.zhu-5C7GfCeVMHo,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Looks good except a few comments.

On Mon, May 28, 2018 at 09:11:03AM +0800, Evan Quan wrote:
> Change-Id: I8dfafcce9e4ed6dabb7025a5a822d1135de6cb8a

Evan, Rex, we'd better add a description for the commit, because community
don't like the empty commit log for the patches. Actually, we got pinged by
Linus...

> Signed-off-by: Evan Quan <evan.quan@amd.com>
> ---
>  drivers/gpu/drm/amd/include/atomfirmware.h | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
> index 95e187e..f25a16b 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -2112,17 +2112,16 @@ enum atom_smu11_syspll_id {
>    SMU11_SYSPLL3_1_ID          = 6,
>  };
>  
> -
> -enum atom_smu11_syspll0_clock_id {
> -  SMU11_SYSPLL0_SOCCLK_ID   = 0,       //	SOCCLK
> -  SMU11_SYSPLL0_MP0CLK_ID   = 1,       //	MP0CLK
> -  SMU11_SYSPLL0_DCLK_ID     = 2,       //	DCLK
> -  SMU11_SYSPLL0_VCLK_ID     = 3,       //	VCLK
> -  SMU11_SYSPLL0_ECLK_ID     = 4,       //	ECLK
> +enum atom_smu11_syspll0_clock_id
> +{

Open brace '{' following enum go on the same line.

With that fixed, please add
Reviewed-by: Huang Rui <ray.huang@amd.com>

> +  SMU11_SYSPLL0_ECLK_ID     = 0,       //	ECLK
> +  SMU11_SYSPLL0_SOCCLK_ID   = 1,       //	SOCCLK
> +  SMU11_SYSPLL0_MP0CLK_ID   = 2,       //	MP0CLK
> +  SMU11_SYSPLL0_DCLK_ID     = 3,       //	DCLK
> +  SMU11_SYSPLL0_VCLK_ID     = 4,       //	VCLK
>    SMU11_SYSPLL0_DCEFCLK_ID  = 5,       //	DCEFCLK
>  };
>  
> -
>  enum atom_smu11_syspll1_0_clock_id {
>    SMU11_SYSPLL1_0_UCLKA_ID   = 0,       // UCLK_a
>  };
> -- 
> 2.7.4
> 
> _______________________________________________
> 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 2/2] drm/amd/powerplay: bug fixs for getsmuclockinfo
       [not found]     ` <1527469864-27333-2-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-29 10:04       ` Huang Rui
  0 siblings, 0 replies; 4+ messages in thread
From: Huang Rui @ 2018-05-29 10:04 UTC (permalink / raw)
  To: Evan Quan
  Cc: alexander.deucher-5C7GfCeVMHo, rex.zhu-5C7GfCeVMHo,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Mon, May 28, 2018 at 09:11:04AM +0800, Evan Quan wrote:
> The .syspll_id and .dfsdid are not initialzed correctly. And
> le32_to_cpu transfer is needed on the output.
> 
> Signed-off-by: Evan Quan <evan.quan@amd.com>
> 

Reviewed-by: Huang Rui <ray.huang@amd.com>

> Change-Id: I491e70b276554f38e1a296970892347474814e75
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
> index 60d591e..f9b5815c 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
> @@ -496,7 +496,9 @@ int pp_atomfwctrl__get_clk_information_by_clkid(struct pp_hwmgr *hwmgr, BIOS_CLK
>  	uint32_t ix;
>  
>  	parameters.clk_id = id;
> +	parameters.syspll_id = 0;
>  	parameters.command = GET_SMU_CLOCK_INFO_V3_1_GET_CLOCK_FREQ;
> +	parameters.dfsdid = 0;
>  
>  	ix = GetIndexIntoMasterCmdTable(getsmuclockinfo);
>  
> @@ -505,7 +507,7 @@ int pp_atomfwctrl__get_clk_information_by_clkid(struct pp_hwmgr *hwmgr, BIOS_CLK
>  		return -EINVAL;
>  
>  	output = (struct atom_get_smu_clock_info_output_parameters_v3_1 *)&parameters;
> -	*frequency = output->atom_smu_outputclkfreq.smu_clock_freq_hz / 10000;
> +	*frequency = le32_to_cpu(output->atom_smu_outputclkfreq.smu_clock_freq_hz) / 10000;
>  
>  	return 0;
>  }
> -- 
> 2.7.4
> 
> _______________________________________________
> 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:[~2018-05-29 10:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28  1:11 [PATCH 1/2] drm/amdgpu: correct SMU11 SYSPLL0 clock id values Evan Quan
     [not found] ` <1527469864-27333-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-05-28  1:11   ` [PATCH 2/2] drm/amd/powerplay: bug fixs for getsmuclockinfo Evan Quan
     [not found]     ` <1527469864-27333-2-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-05-29 10:04       ` Huang Rui
2018-05-29  9:55   ` [PATCH 1/2] drm/amdgpu: correct SMU11 SYSPLL0 clock id values 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.