Re: [PATCH 2/9 v2] drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 28, 2017 at 3:31 PM, Alex Deucher <alexdeucher@xxxxxxxxx> wrote:
> From: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
>
> asic_type information is passed to ACP DMA Driver as platform data.
>
> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>


> ---
>
> v2:Removed asic_type local variable and directly passing asic_type
> instance to ACP DMA driver as platform data.
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 2 ++
>  sound/soc/amd/acp-pcm-dma.c             | 8 ++------
>  sound/soc/amd/acp.h                     | 7 +++++++
>  3 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> index 06879d1..0fa8122 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> @@ -355,6 +355,8 @@ static int acp_hw_init(void *handle)
>         adev->acp.acp_cell[0].name = "acp_audio_dma";
>         adev->acp.acp_cell[0].num_resources = 4;
>         adev->acp.acp_cell[0].resources = &adev->acp.acp_res[0];
> +       adev->acp.acp_cell[0].platform_data = &adev->asic_type;
> +       adev->acp.acp_cell[0].pdata_size = sizeof(adev->asic_type);
>
>         adev->acp.acp_cell[1].name = "designware-i2s";
>         adev->acp.acp_cell[1].num_resources = 1;
> diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
> index 08b1399..dcbf997 100644
> --- a/sound/soc/amd/acp-pcm-dma.c
> +++ b/sound/soc/amd/acp-pcm-dma.c
> @@ -73,12 +73,6 @@ static const struct snd_pcm_hardware acp_pcm_hardware_capture = {
>         .periods_max = CAPTURE_MAX_NUM_PERIODS,
>  };
>
> -struct audio_drv_data {
> -       struct snd_pcm_substream *play_stream;
> -       struct snd_pcm_substream *capture_stream;
> -       void __iomem *acp_mmio;
> -};
> -
>  static u32 acp_reg_read(void __iomem *acp_mmio, u32 reg)
>  {
>         return readl(acp_mmio + (reg * 4));
> @@ -916,6 +910,7 @@ static int acp_audio_probe(struct platform_device *pdev)
>         int status;
>         struct audio_drv_data *audio_drv_data;
>         struct resource *res;
> +       const u32 *pdata = pdev->dev.platform_data;
>
>         audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data),
>                                         GFP_KERNEL);
> @@ -932,6 +927,7 @@ static int acp_audio_probe(struct platform_device *pdev)
>
>         audio_drv_data->play_stream = NULL;
>         audio_drv_data->capture_stream = NULL;
> +       audio_drv_data->asic_type =  *pdata;
>
>         res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>         if (!res) {
> diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h
> index 330832e..28cf914 100644
> --- a/sound/soc/amd/acp.h
> +++ b/sound/soc/amd/acp.h
> @@ -84,6 +84,13 @@ struct audio_substream_data {
>         void __iomem *acp_mmio;
>  };
>
> +struct audio_drv_data {
> +       struct snd_pcm_substream *play_stream;
> +       struct snd_pcm_substream *capture_stream;
> +       void __iomem *acp_mmio;
> +       u32 asic_type;
> +};
> +
>  enum {
>         ACP_TILE_P1 = 0,
>         ACP_TILE_P2,
> --
> 2.5.5
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux