Skip to contentSkip to conversation

drm/amdgpu/gmc6: fix DMA mask

PATCH In review Alex Deucher 4 participants 7 messages Oct 27, 2021 – Oct 28, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/gmc6: fix DMA mask

The DMA mask on SI parts is 40 bits not 44. Looks like a copy paste typo.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
index 0e81e03e9b49..a9354cb2d639 100644
@@ -841,7 +841,7 @@ static int gmc_v6_0_sw_init(void *handle)
 
 	adev->gmc.mc_mask = 0xffffffffffULL;
 
-	r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(44));
+	r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(40));
 	if (r) {
 		dev_warn(adev->dev, "No suitable DMA available.\n");
 		return r;
Signature · 1 line
2.31.1
#1 lore raw
Quoted 4 lines · Alex Deucher

The DMA mask on SI parts is 40 bits not 44. Looks like a copy paste typo.

Fixed locally.

Alex

Quoted 21 lines
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -2
index 0e81e03e9b49..a9354cb2d639 100644
@@ -841,7 +841,7 @@ static int gmc_v6_0_sw_init(void *handle)
 
        adev->gmc.mc_mask = 0xffffffffffULL;
 
-       r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(44));
+       r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(40));
        if (r) {
                dev_warn(adev->dev, "No suitable DMA available.\n");
                return r;
--

2.31.1

#2 lore raw

Dear Alex,

Quoted 9 lines · Alex Deucher
Quoted 4 lines · Alex Deucher

The DMA mask on SI parts is 40 bits not 44. Looks like a copy paste typo.

Fixed locally.

As I have no way to reproduce this, as the ring gfx timeout error is logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?

Hopefully I am going to be able to test this on Friday. Does AMD’s QA team have the cards to test the iommu.forcedac=1 case? Is that test case going to be added to the “test protocol”?

Lastly, should a Fixes tag be added, so it’s picked up for the stable series?

Kind regards,

Paul

#3 lore raw

Dear Alex,

Quoted 8 lines · Paul Menzel
Quoted 7 lines · Alex Deucher
Quoted 3 lines · Alex Deucher

The DMA mask on SI parts is 40 bits not 44.  Looks like a copy paste typo.

Quoted 7 lines
Quoted 1 line

Fixed locally.

As I have no way to reproduce this, as the ring gfx timeout error is logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?

Hopefully I am going to be able to test this on Friday. Does AMD’s QA team have the cards to test the iommu.forcedac=1 case? Is that test case going to be added to the “test protocol”?

Lastly, should a Fixes tag be added, so it’s picked up for the stable series?

Does the value of 44 need to be changed to 40 also five lines below?

- adev->need_swiotlb = drm_need_swiotlb(44);
+ adev->need_swiotlb = drm_need_swiotlb(40);

Kind regards,

Paul

Tested-by
#4 lore raw

Dear Alex,

Quoted 14 lines · Paul Menzel
Quoted 12 lines · Paul Menzel
Quoted 8 lines · Alex Deucher
Quoted 3 lines · Alex Deucher

The DMA mask on SI parts is 40 bits not 44.  Looks like a copy paste typo.

Fixed locally.

As I have no way to reproduce this, as the ring gfx timeout error is logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?

Quoted 8 lines
Quoted 3 lines

Hopefully I am going to be able to test this on Friday. Does AMD’s QA team have the cards to test the iommu.forcedac=1 case? Is that test case going to be added to the “test protocol”?

Lastly, should a Fixes tag be added, so it’s picked up for the stable series?

Does the value of 44 need to be changed to 40 also five lines below?

-       adev->need_swiotlb = drm_need_swiotlb(44); +       adev->need_swiotlb = drm_need_swiotlb(40);

I booted the Dell OptiPlex 5055 with this patch (both hunks) on top of commit 1fc596a56b (Merge tag 'trace-v5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace) with iommu.forcedac=1, and did not get any errors.

Maybe in the commit message summary extend: Fix DMA mask from 44 to 40.

Kind regards,

Paul

#5 lore raw
In reply to Paul Menzel
Quoted 30 lines · Paul Menzel

Dear Alex,

Quoted 14 lines · Paul Menzel
Quoted 9 lines · Alex Deucher
Quoted 3 lines · Alex Deucher

The DMA mask on SI parts is 40 bits not 44. Looks like a copy paste typo.

Fixed locally.

As I have no way to reproduce this, as the ring gfx timeout error is logged ten seconds after the IO_PAGE_FAULT, is very likely to be related?

Quoted 6 lines

Hopefully I am going to be able to test this on Friday. Does AMD’s QA team have the cards to test the iommu.forcedac=1 case? Is that test case going to be added to the “test protocol”?

Lastly, should a Fixes tag be added, so it’s picked up for the stable series?

Does the value of 44 need to be changed to 40 also five lines below?

Review

Quoted 2 lines
(quoted diff) +1 -1
-       adev->need_swiotlb = drm_need_swiotlb(44);
+       adev->need_swiotlb = drm_need_swiotlb(40);

Good catch. I'll fix that too for consistency, but the driver is not functional with the swiotlb due to the amount of memory the driver maps.

Thanks!

Alex

Quoted 4 lines

Kind regards,

Paul

Acked-by on v1 1/1
#6 lore raw
In reply to Alex Deucher

Am 27.10.21 um 20:22 schrieb Alex Deucher:

Quoted 4 lines

The DMA mask on SI parts is 40 bits not 44. Looks like a copy paste typo.

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
index 0e81e03e9b49..a9354cb2d639 100644
@@ -841,7 +841,7 @@ static int gmc_v6_0_sw_init(void *handle)
 
  	adev->gmc.mc_mask = 0xffffffffffULL;
 
-	r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(44));
+	r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(40));
  	if (r) {
  		dev_warn(adev->dev, "No suitable DMA available.\n");
  		return r;