Skip to contentSkip to conversation

drm/amdgpu: fix dma mask check in gmc_v6_0.c

PATCH In review Christian König 3 participants 5 messages Feb 20, 2019 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix dma mask check in gmc_v6_0.c

This got messed up by "drm: change func to better detect wether swiotlb is needed".

---
 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 9fc3296592fe..98fd9208877f 100644
@@ -886,7 +886,7 @@ static int gmc_v6_0_sw_init(void *handle)
 		pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
 		dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");
 	}
-	adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
+	adev->need_swiotlb = drm_need_swiotlb(dma_bits);
 
 	r = gmc_v6_0_init_microcode(adev);
 	if (r) {
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190220124754.14270-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Christian König <[email protected]>
Sent: Wednesday, February 20, 2019 7:47 AM
To: [email protected]; [email protected]
Subject: [PATCH] drm/amdgpu: fix dma mask check in gmc_v6_0.c

This got messed up by "drm: change func to better detect wether swiotlb is needed".

---
 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 9fc3296592fe..98fd9208877f 100644
@@ -886,7 +886,7 @@ static int gmc_v6_0_sw_init(void *handle)
                 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
                 dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");
         }
-       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
+       adev->need_swiotlb = drm_need_swiotlb(dma_bits);
 
         r = gmc_v6_0_init_microcode(adev);
         if (r) {

--
2.17.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB180915FF1EBCEEA1E30664C1F77D0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw
Quoted 10 lines · Alexander

________________________________
From: amd-gfx <[email protected]> on behalf of Christian König <[email protected]>
Sent: Wednesday, February 20, 2019 7:47 AM
To: [email protected]; [email protected]
Subject: [PATCH] drm/amdgpu: fix dma mask check in gmc_v6_0.c

This got messed up by "drm: change func to better detect wether swiotlb is needed".

Shoot, I thought I hunted all those down! Sorry about that.

-Mike

Quoted 26 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 9fc3296592fe..98fd9208877f 100644
@@ -886,7 +886,7 @@ static int gmc_v6_0_sw_init(void *handle)
                 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
                 dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");
         }
-       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
+       adev->need_swiotlb = drm_need_swiotlb(dma_bits);
 
         r = gmc_v6_0_init_microcode(adev);
         if (r) {
--

2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Signature · 10 lines
Michael D Labriola
21 Rip Van Winkle Cir
Warwick, RI 02886
401-316-9844 (cell)
401-848-8871 (work)
401-234-1306 (home)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CAOQxz3zr+Ky68gnbY672C2JR2P-biVyqMak4QU9XFfcxQ6LC7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Am 20.02.19 um 16:16 schrieb Michael Labriola:

Quoted 9 lines
Quoted 7 lines · Alexander

________________________________
From: amd-gfx <[email protected]> on behalf of Christian König <[email protected]>
Sent: Wednesday, February 20, 2019 7:47 AM
To: [email protected]; [email protected]
Subject: [PATCH] drm/amdgpu: fix dma mask check in gmc_v6_0.c

Quoted 3 lines
Quoted 2 lines

This got messed up by "drm: change func to better detect wether swiotlb is needed".

Shoot, I thought I hunted all those down! Sorry about that.

Can I get an rb or ab so that I can push it directly after your change?

BTW: I pushed your change to drm-misc-next and its on it way to upstream.

Christian.

Quoted 24 lines

-Mike

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 9fc3296592fe..98fd9208877f 100644
@@ -886,7 +886,7 @@ static int gmc_v6_0_sw_init(void *handle)
                  pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
                  dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");
          }
-       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
+       adev->need_swiotlb = drm_need_swiotlb(dma_bits);
 
          r = gmc_v6_0_init_microcode(adev);
          if (r) {
--

2.17.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): fa68551e-3a51-dd64-cd9f-c753e5b21340-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by Michael D Labriola
#8 lore raw
Quoted 11 lines · Christian König

Am 20.02.19 um 16:16 schrieb Michael Labriola:

Quoted 9 lines
Quoted 7 lines · Alexander

________________________________
From: amd-gfx <[email protected]> on behalf of Christian König <[email protected]>
Sent: Wednesday, February 20, 2019 7:47 AM
To: [email protected]; [email protected]
Subject: [PATCH] drm/amdgpu: fix dma mask check in gmc_v6_0.c

Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

This got messed up by "drm: change func to better detect wether swiotlb is needed".

Shoot, I thought I hunted all those down! Sorry about that.

Can I get an rb or ab so that I can push it directly after your change?

Quoted 2 lines

BTW: I pushed your change to drm-misc-next and its on it way to upstream.

Great, thanks!

Is this something that should get fed into the stable branches?

-Mike

Quoted 31 lines

Christian.

Quoted 28 lines

-Mike

Quoted 25 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 9fc3296592fe..98fd9208877f 100644
@@ -886,7 +886,7 @@ static int gmc_v6_0_sw_init(void *handle)
                  pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
                  dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");
          }
-       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
+       adev->need_swiotlb = drm_need_swiotlb(dma_bits);
 
          r = gmc_v6_0_init_microcode(adev);
          if (r) {
--

2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Signature · 10 lines
Michael D Labriola
21 Rip Van Winkle Cir
Warwick, RI 02886
401-316-9844 (cell)
401-848-8871 (work)
401-234-1306 (home)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx