[PATCH 2/2] drm/ttm: remove no_retry flag
Christian König
ckoenig.leichtzumerken at gmail.com
Fri Oct 2 11:31:21 UTC 2020
Amdgpu was the only user of this.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++---
drivers/gpu/drm/ttm/ttm_tt.c | 3 ---
include/drm/ttm/ttm_device.h | 2 --
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index c5f2b4971ef7..0a4233985870 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1298,6 +1298,9 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo,
}
gtt->gobj = &bo->base;
+ /* We opt to avoid OOM on system pages allocations */
+ page_flags |= TTM_PAGE_FLAG_NO_RETRY;
+
if (dma_addressing_limited(adev->dev))
page_flags |= TTM_PAGE_FLAG_DMA32;
@@ -1895,9 +1898,6 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
}
adev->mman.initialized = true;
- /* We opt to avoid OOM on system pages allocations */
- adev->mman.bdev.no_retry = true;
-
/* Initialize VRAM pool with all of VRAM divided into pages */
r = amdgpu_vram_mgr_init(adev);
if (r) {
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index e2b1e6c53a04..98514abaa939 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -52,9 +52,6 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc)
if (bo->ttm)
return 0;
- if (bdev->no_retry)
- page_flags |= TTM_PAGE_FLAG_NO_RETRY;
-
switch (bo->type) {
case ttm_bo_type_device:
if (zero_alloc)
diff --git a/include/drm/ttm/ttm_device.h b/include/drm/ttm/ttm_device.h
index bfc6dd87f2d3..e0eba36c1309 100644
--- a/include/drm/ttm/ttm_device.h
+++ b/include/drm/ttm/ttm_device.h
@@ -326,8 +326,6 @@ struct ttm_device {
*/
struct delayed_work wq;
-
- bool no_retry;
};
static inline struct ttm_resource_manager *
--
2.17.1
More information about the dri-devel
mailing list