diff options
author | Christoph Hellwig <hch@lst.de> | 2019-08-15 03:27:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-15 11:51:00 -0400 |
commit | 90489ce18c3a504c781c8cfcec013258c3459328 (patch) | |
tree | 5bf1e8a6f580834b23a3c71a126acc67502cd950 | |
parent | 33b3ad3788aba846fc8b9a065fe2685a0b64f713 (diff) |
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 <christian.koenig@amd.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
1745 | r = ttm_bo_device_init(&adev->mman.bdev, | 1745 | r = ttm_bo_device_init(&adev->mman.bdev, |
1746 | &amdgpu_bo_driver, | 1746 | &amdgpu_bo_driver, |
1747 | adev->ddev->anon_inode->i_mapping, | 1747 | adev->ddev->anon_inode->i_mapping, |
1748 | adev->need_dma32); | 1748 | dma_addressing_limited(adev->dev)); |
1749 | if (r) { | 1749 | if (r) { |
1750 | DRM_ERROR("failed initializing buffer object driver(%d).\n", r); | 1750 | DRM_ERROR("failed initializing buffer object driver(%d).\n", r); |
1751 | return r; | 1751 | return r; |