From: Christoph Hellwig Date: Thu, 15 Aug 2019 07:27:01 +0000 (+0200) Subject: drm/amdgpu: handle PCIe root ports with addressing limitations X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=90489ce18c3a504c781c8cfcec013258c3459328;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: handle PCIe root ports with addressing limitations amdgpu uses a need_dma32 flag to indicate to the drm core that some allocations need to be done using GFP_DMA32, but it only checks the device addressing capabilities to make that decision. Unfortunately PCIe root ports that have limited addressing exist as well. Use the dma_addressing_limited instead to also take those into account. Reviewed-by: Christian König Signed-off-by: Christoph Hellwig Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 8f8b7a350b8b..bbb4c96ed5f9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1745,7 +1745,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) r = ttm_bo_device_init(&adev->mman.bdev, &amdgpu_bo_driver, adev->ddev->anon_inode->i_mapping, - adev->need_dma32); + dma_addressing_limited(adev->dev)); if (r) { DRM_ERROR("failed initializing buffer object driver(%d).\n", r); return r;