Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soundwire: amd: drop bus freq calculation and set 'max_clk_freq'
@ 2023-11-29 13:04 Vinod Koul
  2023-12-01  5:46 ` Mukunda,Vijendar
  0 siblings, 1 reply; 4+ messages in thread
From: Vinod Koul @ 2023-11-29 13:04 UTC (permalink / raw)
  To: Vijendar Mukunda
  Cc: Vinod Koul, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
	alsa-devel

max_dr_freq and curr_dr_freq is calculated and set in
sdw_bus_master_add(). Setting in the driver is reduanant, so drop that.
Set max_clk_freq instead.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/soundwire/amd_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index a3b1f4e6f0f9..f54bb4dd2d10 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -950,13 +950,13 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
 
 	amd_manager->reg_mask = &sdw_manager_reg_mask_array[amd_manager->instance];
 	params = &amd_manager->bus.params;
-	params->max_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
-	params->curr_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
+
 	params->col = AMD_SDW_DEFAULT_COLUMNS;
 	params->row = AMD_SDW_DEFAULT_ROWS;
 	prop = &amd_manager->bus.prop;
 	prop->clk_freq = &amd_sdw_freq_tbl[0];
 	prop->mclk_freq = AMD_SDW_BUS_BASE_FREQ;
+	prop->max_clk_freq = AMD_SDW_DEFAULT_CLK_FREQ;
 
 	ret = sdw_bus_master_add(&amd_manager->bus, dev, dev->fwnode);
 	if (ret) {
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] soundwire: amd: drop bus freq calculation and set 'max_clk_freq'
  2023-11-29 13:04 [PATCH] soundwire: amd: drop bus freq calculation and set 'max_clk_freq' Vinod Koul
@ 2023-12-01  5:46 ` Mukunda,Vijendar
  2023-12-02  6:12   ` Vinod Koul
  0 siblings, 1 reply; 4+ messages in thread
From: Mukunda,Vijendar @ 2023-12-01  5:46 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Bard Liao, Pierre-Louis Bossart, Sanyog Kale, alsa-devel

On 29/11/23 18:34, Vinod Koul wrote:
> max_dr_freq and curr_dr_freq is calculated and set in
> sdw_bus_master_add(). Setting in the driver is reduanant, so drop that.
> Set max_clk_freq instead.
LGTM
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  drivers/soundwire/amd_manager.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
> index a3b1f4e6f0f9..f54bb4dd2d10 100644
> --- a/drivers/soundwire/amd_manager.c
> +++ b/drivers/soundwire/amd_manager.c
> @@ -950,13 +950,13 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
>  
>  	amd_manager->reg_mask = &sdw_manager_reg_mask_array[amd_manager->instance];
>  	params = &amd_manager->bus.params;
> -	params->max_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
> -	params->curr_dr_freq = AMD_SDW_DEFAULT_CLK_FREQ * 2;
> +
>  	params->col = AMD_SDW_DEFAULT_COLUMNS;
>  	params->row = AMD_SDW_DEFAULT_ROWS;
>  	prop = &amd_manager->bus.prop;
>  	prop->clk_freq = &amd_sdw_freq_tbl[0];
>  	prop->mclk_freq = AMD_SDW_BUS_BASE_FREQ;
> +	prop->max_clk_freq = AMD_SDW_DEFAULT_CLK_FREQ;
>  
>  	ret = sdw_bus_master_add(&amd_manager->bus, dev, dev->fwnode);
>  	if (ret) {


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] soundwire: amd: drop bus freq calculation and set 'max_clk_freq'
  2023-12-01  5:46 ` Mukunda,Vijendar
@ 2023-12-02  6:12   ` Vinod Koul
  2023-12-02  6:16     ` Mukunda,Vijendar
  0 siblings, 1 reply; 4+ messages in thread
From: Vinod Koul @ 2023-12-02  6:12 UTC (permalink / raw)
  To: Mukunda,Vijendar; +Cc: Bard Liao, Pierre-Louis Bossart, Sanyog Kale, alsa-devel

On 01-12-23, 11:16, Mukunda,Vijendar wrote:
> On 29/11/23 18:34, Vinod Koul wrote:
> > max_dr_freq and curr_dr_freq is calculated and set in
> > sdw_bus_master_add(). Setting in the driver is reduanant, so drop that.
> > Set max_clk_freq instead.
> LGTM

Right way would be add a proper tag like 
Reviewed-by: Foo bar <foo@bar.com>

or better to test the patch and update with
Tested-by: Foo bar <foo@bar.com> #on xyz target

-- 
~Vinod

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] soundwire: amd: drop bus freq calculation and set 'max_clk_freq'
  2023-12-02  6:12   ` Vinod Koul
@ 2023-12-02  6:16     ` Mukunda,Vijendar
  0 siblings, 0 replies; 4+ messages in thread
From: Mukunda,Vijendar @ 2023-12-02  6:16 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Bard Liao, Pierre-Louis Bossart, Sanyog Kale, alsa-devel

On 02/12/23 11:42, Vinod Koul wrote:
> On 01-12-23, 11:16, Mukunda,Vijendar wrote:
>> On 29/11/23 18:34, Vinod Koul wrote:
>>> max_dr_freq and curr_dr_freq is calculated and set in
>>> sdw_bus_master_add(). Setting in the driver is reduanant, so drop that.
>>> Set max_clk_freq instead.
>> LGTM
Verified on AMD platforms.

Tested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> Right way would be add a proper tag like 
> Reviewed-by: Foo bar <foo@bar.com>
>
> or better to test the patch and update with
> Tested-by: Foo bar <foo@bar.com> #on xyz target
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-02  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-29 13:04 [PATCH] soundwire: amd: drop bus freq calculation and set 'max_clk_freq' Vinod Koul
2023-12-01  5:46 ` Mukunda,Vijendar
2023-12-02  6:12   ` Vinod Koul
2023-12-02  6:16     ` Mukunda,Vijendar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox