Skip to contentSkip to conversation

drm/amdgpu: Remove duplicate setting of ->need_swiotlb

PATCH Applied Thierry Reding 2 participants 2 messages Feb 20, 2018 – Feb 22, 2018

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

PATCH 1/1 drm/amdgpu: Remove duplicate setting of ->need_swiotlb

From: Thierry Reding <[email protected]>

There's no need to set this before the number of DMA bits has been properly determined.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +0 -1
index 9a170e37fbe7..9cc849f829d0 100644
@@ -1086,7 +1086,6 @@ static int gmc_v8_0_sw_init(void *handle)
 	 */
 	adev->need_dma32 = false;
 	dma_bits = adev->need_dma32 ? 32 : 40;
-	adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
 	r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
 	if (r) {
 		adev->need_dma32 = true;
Signature · 6 lines
2.15.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#1 lore raw
Quoted 6 lines · Thierry Reding

From: Thierry Reding <[email protected]>

There's no need to set this before the number of DMA bits has been properly determined.

Applied. thanks!

Alex

Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +0 -2
index 9a170e37fbe7..9cc849f829d0 100644
@@ -1086,7 +1086,6 @@ static int gmc_v8_0_sw_init(void *handle)
         */
        adev->need_dma32 = false;
        dma_bits = adev->need_dma32 ? 32 : 40;
-       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
        r = pci_set_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
        if (r) {
                adev->need_dma32 = true;
--

2.15.1

Quoted 4 lines

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

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