From: Alex Deucher <alexdeucher@gmail.com>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
airlied@gmail.com, alsa-devel@alsa-project.org,
broonie@kernel.org, Vijendar.Mukunda@amd.com,
rajeevkumar.linux@gmail.com, perex@perex.cz
Cc: Alex Deucher <alexander.deucher@amd.com>, lgirdwood@gmail.com
Subject: [PATCH 1/6 v3] drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data
Date: Fri, 18 Aug 2017 14:10:25 -0400 [thread overview]
Message-ID: <1503079830-16072-2-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1503079830-16072-1-git-send-email-alexander.deucher@amd.com>
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
asic_type information is passed to ACP DMA Driver as platform data.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
v2: Removed asic_type local variable and directly passing asic_type
instance to ACP DMA driver as platform data.
v3: Add R-b, resend.
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 a52795d..ebca223 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -371,6 +371,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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-08-18 18:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 18:10 [PATCH 0/6 v3] Add ASoC support for AMD Stoney APUs Alex Deucher
2017-08-18 18:10 ` Alex Deucher [this message]
2017-08-18 18:10 ` [PATCH 2/6 v2] drm/amdgpu Moving amdgpu asic types to a separate file Alex Deucher
[not found] ` <1503079830-16072-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-08-18 18:10 ` [PATCH 3/6 v3] ASoC: AMD: disabling memory gating in stoney platform Alex Deucher
2017-08-31 11:39 ` Mark Brown
2017-08-18 18:10 ` [PATCH 4/6 v2] ASoC: AMD: DMA driver changes for Stoney Platform Alex Deucher
2017-08-31 11:39 ` Mark Brown
2017-08-18 18:10 ` [PATCH 5/6 v3] ASoC: AMD: Audio buffer related changes for Stoney Alex Deucher
2017-08-31 11:27 ` Mark Brown
2017-08-18 18:10 ` [PATCH 6/6 v3] ASoC: AMD: Add machine driver for cz rt5650 Alex Deucher
2017-08-31 11:38 ` Mark Brown
2017-09-01 11:08 ` Agrawal, Akshu
2017-08-30 13:33 ` [PATCH 0/6 v3] Add ASoC support for AMD Stoney APUs Alex Deucher
2017-08-30 15:19 ` Mark Brown
[not found] ` <20170830151913.6vknazyhh4se5524-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-08-30 15:46 ` Deucher, Alexander
2017-08-30 18:49 ` Eric Anholt
2017-08-30 21:10 ` Mark Brown
2017-08-30 21:40 ` Deucher, Alexander
2017-08-31 10:28 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2017-09-13 17:57 [PATCH 0/6 v4] " Alex Deucher
[not found] ` <1505325475-22602-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-09-13 17:57 ` [PATCH 1/6 v3] drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503079830-16072-2-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lgirdwood@gmail.com \
--cc=perex@perex.cz \
--cc=rajeevkumar.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).