Skip to content

Commit 55df7c0

Browse files
committed
drm/ttm/xe: drop unused force_alloc flag
This flag used to be used in the old memory tracking code, that code got migrated into the vmwgfx driver[1], and then got removed from the tree[2], but this piece got left behind. [1] f07069d ("drm/ttm: move memory accounting into vmwgfx v4") [2] 8aadeb8 ("drm/vmwgfx: Remove the dedicated memory accounting") Cleanup the dead code. Reviewed-by: Matthew Brost <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent b603017 commit 55df7c0

File tree

6 files changed

+3
-9
lines changed

6 files changed

+3
-9
lines changed

drivers/gpu/drm/ttm/ttm_bo_vm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
220220
struct ttm_operation_ctx ctx = {
221221
.interruptible = true,
222222
.no_wait_gpu = false,
223-
.force_alloc = true
224223
};
225224

226225
ttm = bo->ttm;

drivers/gpu/drm/ttm/ttm_resource.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,6 @@ int ttm_resource_manager_evict_all(struct ttm_device *bdev,
548548
struct ttm_operation_ctx ctx = {
549549
.interruptible = false,
550550
.no_wait_gpu = false,
551-
.force_alloc = true
552551
};
553552
struct dma_fence *fence;
554553
int ret;

drivers/gpu/drm/xe/xe_bo.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,19 +2759,17 @@ int xe_bo_migrate(struct xe_bo *bo, u32 mem_type)
27592759
/**
27602760
* xe_bo_evict - Evict an object to evict placement
27612761
* @bo: The buffer object to migrate.
2762-
* @force_alloc: Set force_alloc in ttm_operation_ctx
27632762
*
27642763
* On successful completion, the object memory will be moved to evict
27652764
* placement. This function blocks until the object has been fully moved.
27662765
*
27672766
* Return: 0 on success. Negative error code on failure.
27682767
*/
2769-
int xe_bo_evict(struct xe_bo *bo, bool force_alloc)
2768+
int xe_bo_evict(struct xe_bo *bo)
27702769
{
27712770
struct ttm_operation_ctx ctx = {
27722771
.interruptible = false,
27732772
.no_wait_gpu = false,
2774-
.force_alloc = force_alloc,
27752773
.gfp_retry_mayfail = true,
27762774
};
27772775
struct ttm_placement placement;

drivers/gpu/drm/xe/xe_bo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ uint64_t vram_region_gpu_offset(struct ttm_resource *res);
271271
bool xe_bo_can_migrate(struct xe_bo *bo, u32 mem_type);
272272

273273
int xe_bo_migrate(struct xe_bo *bo, u32 mem_type);
274-
int xe_bo_evict(struct xe_bo *bo, bool force_alloc);
274+
int xe_bo_evict(struct xe_bo *bo);
275275

276276
int xe_bo_evict_pinned(struct xe_bo *bo);
277277
int xe_bo_restore_pinned(struct xe_bo *bo);

drivers/gpu/drm/xe/xe_dma_buf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void xe_dma_buf_move_notify(struct dma_buf_attachment *attach)
236236
struct drm_gem_object *obj = attach->importer_priv;
237237
struct xe_bo *bo = gem_to_xe_bo(obj);
238238

239-
XE_WARN_ON(xe_bo_evict(bo, false));
239+
XE_WARN_ON(xe_bo_evict(bo));
240240
}
241241

242242
static const struct dma_buf_attach_ops xe_dma_buf_attach_ops = {

include/drm/ttm/ttm_bo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ struct ttm_bo_kmap_obj {
172172
* @gfp_retry_mayfail: Set the __GFP_RETRY_MAYFAIL when allocation pages.
173173
* @allow_res_evict: Allow eviction of reserved BOs. Can be used when multiple
174174
* BOs share the same reservation object.
175-
* @force_alloc: Don't check the memory account during suspend or CPU page
176175
* faults. Should only be used by TTM internally.
177176
* @resv: Reservation object to allow reserved evictions with.
178177
* @bytes_moved: Statistics on how many bytes have been moved.
@@ -185,7 +184,6 @@ struct ttm_operation_ctx {
185184
bool no_wait_gpu;
186185
bool gfp_retry_mayfail;
187186
bool allow_res_evict;
188-
bool force_alloc;
189187
struct dma_resv *resv;
190188
uint64_t bytes_moved;
191189
};

0 commit comments

Comments
 (0)