From: Christian König Date: Wed, 20 Feb 2019 12:46:24 +0000 (+0100) Subject: drm/amdgpu: fix dma mask check in gmc_v6_0.c X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1fdafbd023793e754aa6ca73c877a375e83b8239;p=openwrt%2Fstaging%2Fblogic.git 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". Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Michael D Labriola Link: https://patchwork.freedesktop.org/patch/287070/ --- diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c index 9fc3296592fe..98fd9208877f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c @@ -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) {