From: Alex Deucher <alexdeucher@gmail.com>
To: broonie@kernel.org, airlied@gmail.com,
dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org
Cc: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>,
lgirdwood@gmail.com, perex@perex.cz
Subject: [PATCH 07/12] drm/amd: change ACP SRAM banks used for audio
Date: Thu, 6 Aug 2015 10:25:07 -0400 [thread overview]
Message-ID: <1438871112-25946-7-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1438871112-25946-1-git-send-email-alexander.deucher@amd.com>
From: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>
There are 48 SRAM memory banks in ACP 2.1. Use bank index - 0 for
DMA descriptors 1 to 4 for playback, 5 to 8 for capture.
Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Reviewed-by: Murali Krishna Vemuri <murali-krishna.vemuri@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/acp/acp_hw.c | 10 +++++-----
drivers/gpu/drm/amd/acp/acp_hw.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/acp/acp_hw.c b/drivers/gpu/drm/amd/acp/acp_hw.c
index 830a7da..be364ab 100644
--- a/drivers/gpu/drm/amd/acp/acp_hw.c
+++ b/drivers/gpu/drm/amd/acp/acp_hw.c
@@ -150,7 +150,7 @@ static void set_acp_sysmem_dma_descriptors(struct amd_acp_device *acp_dev,
dmadscr[0].size_xfer_dir.val = (u32) 0x0;
if (direction == STREAM_PLAYBACK) {
dma_dscr_idx = PLAYBACK_START_DMA_DESCR_CH12;
- dmadscr[0].dest = ACP_SHARED_RAM_BANK_38_ADDRESS + (size / 2);
+ dmadscr[0].dest = ACP_SHARED_RAM_BANK_1_ADDRESS + (size / 2);
dmadscr[0].src = ACP_INTERNAL_APERTURE_WINDOW_0_ADDRESS +
(pte_offset * PAGE_SIZE_4K);
dmadscr[0].size_xfer_dir.s.trans_direction =
@@ -159,7 +159,7 @@ static void set_acp_sysmem_dma_descriptors(struct amd_acp_device *acp_dev,
dmadscr[0].size_xfer_dir.s.ioc = (u32) 0x0;
} else {
dma_dscr_idx = CAPTURE_START_DMA_DESCR_CH14;
- dmadscr[0].src = ACP_SHARED_RAM_BANK_47_ADDRESS;
+ dmadscr[0].src = ACP_SHARED_RAM_BANK_5_ADDRESS;
dmadscr[0].dest = ACP_INTERNAL_APERTURE_WINDOW_0_ADDRESS +
(pte_offset * PAGE_SIZE_4K);
dmadscr[0].size_xfer_dir.s.trans_direction =
@@ -173,7 +173,7 @@ static void set_acp_sysmem_dma_descriptors(struct amd_acp_device *acp_dev,
dmadscr[1].size_xfer_dir.val = (u32) 0x0;
if (direction == STREAM_PLAYBACK) {
dma_dscr_idx = PLAYBACK_END_DMA_DESCR_CH12;
- dmadscr[1].dest = ACP_SHARED_RAM_BANK_38_ADDRESS;
+ dmadscr[1].dest = ACP_SHARED_RAM_BANK_1_ADDRESS;
dmadscr[1].src = ACP_INTERNAL_APERTURE_WINDOW_0_ADDRESS +
(pte_offset * PAGE_SIZE_4K) + (size / 2);
dmadscr[1].size_xfer_dir.s.trans_direction =
@@ -224,13 +224,13 @@ static void set_acp_to_i2s_dma_descriptors(struct amd_acp_device *acp_dev,
dmadscr[0].size_xfer_dir.val = (u32) 0x0;
if (direction == STREAM_PLAYBACK) {
dma_dscr_idx = PLAYBACK_START_DMA_DESCR_CH13;
- dmadscr[0].src = ACP_SHARED_RAM_BANK_38_ADDRESS;
+ dmadscr[0].src = ACP_SHARED_RAM_BANK_1_ADDRESS;
dmadscr[0].size_xfer_dir.s.trans_direction = TO_ACP_I2S_1;
dmadscr[0].size_xfer_dir.s.size = (size / 2);
dmadscr[0].size_xfer_dir.s.ioc = (u32) 0x1;
} else {
dma_dscr_idx = CAPTURE_START_DMA_DESCR_CH15;
- dmadscr[0].dest = ACP_SHARED_RAM_BANK_47_ADDRESS;
+ dmadscr[0].dest = ACP_SHARED_RAM_BANK_5_ADDRESS;
dmadscr[0].size_xfer_dir.s.trans_direction = FROM_ACP_I2S_1;
dmadscr[0].size_xfer_dir.s.size = (size / 2);
dmadscr[0].size_xfer_dir.s.ioc = (u32) 0x1;
diff --git a/drivers/gpu/drm/amd/acp/acp_hw.h b/drivers/gpu/drm/amd/acp/acp_hw.h
index 4aa6b1c..b58349c 100644
--- a/drivers/gpu/drm/amd/acp/acp_hw.h
+++ b/drivers/gpu/drm/amd/acp/acp_hw.h
@@ -19,10 +19,10 @@
#define ACP_PHYSICAL_BASE 0x14000
/* Playback SRAM address (as a destination in dma descriptor) */
-#define ACP_SHARED_RAM_BANK_38_ADDRESS 0x404A000
+#define ACP_SHARED_RAM_BANK_1_ADDRESS 0x4002000
/* Capture SRAM address (as a source in dma descriptor) */
-#define ACP_SHARED_RAM_BANK_47_ADDRESS 0x4054000
+#define ACP_SHARED_RAM_BANK_5_ADDRESS 0x400A000
#define ACP_DMA_RESET_TIME 10000
#define ACP_CLOCK_EN_TIME_OUT_VALUE 0x000000FF
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-08-06 14:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 14:25 [PATCH 00/12] Add ASoC support for AMD APUs Alex Deucher
2015-08-06 14:25 ` [PATCH 01/12] drm/amdgpu: add amd_gnb_bus support Alex Deucher
2015-08-06 19:36 ` Lars-Peter Clausen
2015-08-07 10:25 ` Mark Brown
2015-08-07 14:17 ` Alex Deucher
2015-08-07 16:16 ` Felix Kuehling
2015-08-07 18:24 ` Mark Brown
2015-08-07 20:03 ` Felix Kuehling
2015-08-10 11:56 ` Mark Brown
2015-08-07 17:20 ` Mark Brown
2015-08-06 14:25 ` [PATCH 02/12] drm/amd: remove amd gnb bus default runtime pm ops Alex Deucher
2015-08-06 14:25 ` [PATCH 04/12] drm/amd: add ACP driver support (v4) Alex Deucher
2015-08-06 14:25 ` [PATCH 05/12] drm/amd: modify ACP DMA buffer position update logic (v2) Alex Deucher
2015-08-06 14:25 ` [PATCH 06/12] drm/amd: add ACP suspend/resume functionality Alex Deucher
2015-08-06 14:25 ` Alex Deucher [this message]
2015-08-06 14:25 ` [PATCH 08/12] drm/amd: shutdown unused ACP SRAM memory banks Alex Deucher
2015-08-06 14:25 ` [PATCH 09/12] drm/amd: remove bitfield usage in ACP IP module Alex Deucher
2015-08-06 14:25 ` [PATCH 10/12] ASoC: AMD: add AMD ASoC ACP-I2S driver (v2) Alex Deucher
2015-08-06 19:22 ` Mark Brown
2015-08-07 9:27 ` Bayyavarapu, Maruthi
2015-08-06 14:25 ` [PATCH 11/12] ASoC: AMD: add suspend/resume for ACP PCM driver Alex Deucher
2015-08-06 19:23 ` Mark Brown
2015-08-06 14:25 ` [PATCH 12/12] ASoC: AMD: add ACP PCM driver runtime PM Alex Deucher
2015-08-06 19:26 ` Mark Brown
2015-08-07 9:41 ` Bayyavarapu, Maruthi
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=1438871112-25946-7-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=Maruthi.Bayyavarapu@amd.com \
--cc=airlied@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lgirdwood@gmail.com \
--cc=perex@perex.cz \
/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 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.