All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/amdgpu: passing i2s instance value as platform data
@ 2018-03-19  6:47 Vijendar Mukunda
       [not found] ` <1521442023-19042-1-git-send-email-Vijendar.Mukunda-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Vijendar Mukunda @ 2018-03-19  6:47 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alexander.Deucher-5C7GfCeVMHo, Vijendar Mukunda,
	Akshu.Agrawal-5C7GfCeVMHo

i2s instance value is passed as platform data to dwc driver.
this parameter will be useful to distinguish current i2s
instance value when multiple i2s controller instances are created.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index 6cca4d1..61d6cb9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -83,6 +83,8 @@
 #define ACP_TIMEOUT_LOOP			0x000000FF
 #define ACP_DEVS				4
 #define ACP_SRC_ID				162
+#define I2S_SP_INSTANCE				1
+#define I2S_BT_INSTANCE				2
 
 enum {
 	ACP_TILE_P1 = 0,
@@ -347,6 +349,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[0].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[0].i2s_reg_comp1 = ACP_I2S_COMP1_PLAY_REG_OFFSET;
 	i2s_pdata[0].i2s_reg_comp2 = ACP_I2S_COMP2_PLAY_REG_OFFSET;
+	i2s_pdata[0].i2s_instance = I2S_SP_INSTANCE;
 	switch (adev->asic_type) {
 	case CHIP_STONEY:
 		i2s_pdata[1].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET |
@@ -362,6 +365,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[1].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;
 	i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;
+	i2s_pdata[1].i2s_instance = I2S_SP_INSTANCE;
 
 	i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;
 	switch (adev->asic_type) {
@@ -376,6 +380,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;
 	i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;
+	i2s_pdata[2].i2s_instance = I2S_BT_INSTANCE;
 
 	adev->acp.acp_res[0].name = "acp2x_dma";
 	adev->acp.acp_res[0].flags = IORESOURCE_MEM;
-- 
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] 3+ messages in thread

* RE: [PATCH] drm/amd/amdgpu: passing i2s instance value as platform data
       [not found] ` <1521442023-19042-1-git-send-email-Vijendar.Mukunda-5C7GfCeVMHo@public.gmane.org>
@ 2018-03-19 14:41   ` Deucher, Alexander
  0 siblings, 0 replies; 3+ messages in thread
From: Deucher, Alexander @ 2018-03-19 14:41 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Agrawal, Akshu, Mukunda, Vijendar

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Vijendar Mukunda
> Sent: Monday, March 19, 2018 2:47 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Mukunda,
> Vijendar <Vijendar.Mukunda@amd.com>; Agrawal, Akshu
> <Akshu.Agrawal@amd.com>
> Subject: [PATCH] drm/amd/amdgpu: passing i2s instance value as platform
> data
> 
> i2s instance value is passed as platform data to dwc driver.
> this parameter will be useful to distinguish current i2s instance value when
> multiple i2s controller instances are created.
> 
> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> index 6cca4d1..61d6cb9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> @@ -83,6 +83,8 @@
>  #define ACP_TIMEOUT_LOOP			0x000000FF
>  #define ACP_DEVS				4
>  #define ACP_SRC_ID				162
> +#define I2S_SP_INSTANCE				1
> +#define I2S_BT_INSTANCE				2
> 

Please add the defines for I2S_SP_INSTANCE and I2S_BT_INSTANCE to the dws platform data header so you don't have to define them locally here.
With that fixed, the patch is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>  enum {
>  	ACP_TILE_P1 = 0,
> @@ -347,6 +349,7 @@ static int acp_hw_init(void *handle)
>  	i2s_pdata[0].snd_rates = SNDRV_PCM_RATE_8000_96000;
>  	i2s_pdata[0].i2s_reg_comp1 = ACP_I2S_COMP1_PLAY_REG_OFFSET;
>  	i2s_pdata[0].i2s_reg_comp2 = ACP_I2S_COMP2_PLAY_REG_OFFSET;
> +	i2s_pdata[0].i2s_instance = I2S_SP_INSTANCE;
>  	switch (adev->asic_type) {
>  	case CHIP_STONEY:
>  		i2s_pdata[1].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET |
> @@ -362,6 +365,7 @@ static int acp_hw_init(void *handle)
>  	i2s_pdata[1].snd_rates = SNDRV_PCM_RATE_8000_96000;
>  	i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;
>  	i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;
> +	i2s_pdata[1].i2s_instance = I2S_SP_INSTANCE;
> 
>  	i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;
>  	switch (adev->asic_type) {
> @@ -376,6 +380,7 @@ static int acp_hw_init(void *handle)
>  	i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;
>  	i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;
>  	i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;
> +	i2s_pdata[2].i2s_instance = I2S_BT_INSTANCE;
> 
>  	adev->acp.acp_res[0].name = "acp2x_dma";
>  	adev->acp.acp_res[0].flags = IORESOURCE_MEM;
> --
> 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] 3+ messages in thread

* [PATCH] drm/amd/amdgpu: passing i2s instance value as platform data
@ 2018-03-20  7:19 Vijendar Mukunda
  0 siblings, 0 replies; 3+ messages in thread
From: Vijendar Mukunda @ 2018-03-20  7:19 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alexander.Deucher-5C7GfCeVMHo, Vijendar Mukunda,
	Akshu.Agrawal-5C7GfCeVMHo

i2s instance value is passed as platform data to dwc driver.
this parameter will be useful to distinguish current i2s
instance value when multiple i2s controller instances are created.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
v1->v2: moved I2S instance macro definitions to designware header file
 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index 6cca4d1..b80c43f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -347,6 +347,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[0].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[0].i2s_reg_comp1 = ACP_I2S_COMP1_PLAY_REG_OFFSET;
 	i2s_pdata[0].i2s_reg_comp2 = ACP_I2S_COMP2_PLAY_REG_OFFSET;
+	i2s_pdata[0].i2s_instance = I2S_SP_INSTANCE;
 	switch (adev->asic_type) {
 	case CHIP_STONEY:
 		i2s_pdata[1].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET |
@@ -362,6 +363,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[1].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;
 	i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;
+	i2s_pdata[1].i2s_instance = I2S_SP_INSTANCE;
 
 	i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;
 	switch (adev->asic_type) {
@@ -376,6 +378,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;
 	i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;
+	i2s_pdata[2].i2s_instance = I2S_BT_INSTANCE;
 
 	adev->acp.acp_res[0].name = "acp2x_dma";
 	adev->acp.acp_res[0].flags = IORESOURCE_MEM;
-- 
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] 3+ messages in thread

end of thread, other threads:[~2018-03-20  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19  6:47 [PATCH] drm/amd/amdgpu: passing i2s instance value as platform data Vijendar Mukunda
     [not found] ` <1521442023-19042-1-git-send-email-Vijendar.Mukunda-5C7GfCeVMHo@public.gmane.org>
2018-03-19 14:41   ` Deucher, Alexander
2018-03-20  7:19 Vijendar Mukunda

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.