From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Subject: [PATCH] drm/amdgpu: Set correct DMA mask for aldebaran
Date: Mon, 28 Feb 2022 13:25:08 -0500 [thread overview]
Message-ID: <20220228182508.464871-1-Harish.Kasiviswanathan@amd.com> (raw)
Aldebaran has 48-bit physical address support
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 412e44af1608..0765c163b355 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1675,12 +1675,17 @@ static int gmc_v9_0_sw_init(void *handle)
*/
adev->gmc.mc_mask = 0xffffffffffffULL; /* 48 bit MC */
- r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(44));
+ if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2)) {
+ r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(48));
+ adev->need_swiotlb = drm_need_swiotlb(48);
+ } else {
+ r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(44));
+ adev->need_swiotlb = drm_need_swiotlb(44);
+ }
if (r) {
printk(KERN_WARNING "amdgpu: No suitable DMA available.\n");
return r;
}
- adev->need_swiotlb = drm_need_swiotlb(44);
r = gmc_v9_0_mc_init(adev);
if (r)
--
2.25.1
next reply other threads:[~2022-02-28 18:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 18:25 Harish Kasiviswanathan [this message]
2022-03-02 22:41 ` [PATCH] drm/amdgpu: Set correct DMA mask for aldebaran Felix Kuehling
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=20220228182508.464871-1-Harish.Kasiviswanathan@amd.com \
--to=harish.kasiviswanathan@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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.