drm/amdgpu: fix dma mask check in gmc_v6_0.c
authorChristian König <christian.koenig@amd.com>
Wed, 20 Feb 2019 12:46:24 +0000 (13:46 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 20 Feb 2019 17:58:17 +0000 (18:58 +0100)
This got messed up by "drm: change func to better detect wether swiotlb
is needed".

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michael D Labriola <michael.d.labriola@gmail.com>
Link: https://patchwork.freedesktop.org/patch/287070/
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

index 9fc3296592fee928fda2ba4cbf960f8725a145fd..98fd9208877f705bae42f40cf9e938dcfe4c2bab 100644 (file)
@@ -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) {