Skip to content

Commit ce74773

Browse files
drm/ttm: remove io_reserve_fastpath flag
Just use the use_io_reserve_lru flag. It doesn't make much sense to have two flags. Signed-off-by: Christian König <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/378238/
1 parent 4b8edc3 commit ce74773

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

drivers/gpu/drm/nouveau/nouveau_bo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,6 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
675675
}
676676

677677
man->func = &nouveau_vram_manager;
678-
man->io_reserve_fastpath = false;
679678
man->use_io_reserve_lru = true;
680679
} else {
681680
man->func = &ttm_bo_manager_func;

drivers/gpu/drm/ttm/ttm_bo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,6 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
15211521
BUG_ON(type >= TTM_NUM_MEM_TYPES);
15221522
man = &bdev->man[type];
15231523
BUG_ON(man->has_type);
1524-
man->io_reserve_fastpath = true;
15251524
man->use_io_reserve_lru = false;
15261525
mutex_init(&man->io_reserve_mutex);
15271526
spin_lock_init(&man->move_lock);

drivers/gpu/drm/ttm/ttm_bo_util.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ EXPORT_SYMBOL(ttm_bo_move_ttm);
9393

9494
int ttm_mem_io_lock(struct ttm_mem_type_manager *man, bool interruptible)
9595
{
96-
if (likely(man->io_reserve_fastpath))
96+
if (likely(!man->use_io_reserve_lru))
9797
return 0;
9898

9999
if (interruptible)
@@ -105,7 +105,7 @@ int ttm_mem_io_lock(struct ttm_mem_type_manager *man, bool interruptible)
105105

106106
void ttm_mem_io_unlock(struct ttm_mem_type_manager *man)
107107
{
108-
if (likely(man->io_reserve_fastpath))
108+
if (likely(!man->use_io_reserve_lru))
109109
return;
110110

111111
mutex_unlock(&man->io_reserve_mutex);
@@ -136,7 +136,7 @@ int ttm_mem_io_reserve(struct ttm_bo_device *bdev,
136136

137137
if (!bdev->driver->io_mem_reserve)
138138
return 0;
139-
if (likely(man->io_reserve_fastpath))
139+
if (likely(!man->use_io_reserve_lru))
140140
return bdev->driver->io_mem_reserve(bdev, mem);
141141

142142
if (bdev->driver->io_mem_reserve &&
@@ -157,7 +157,7 @@ void ttm_mem_io_free(struct ttm_bo_device *bdev,
157157
{
158158
struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
159159

160-
if (likely(man->io_reserve_fastpath))
160+
if (likely(!man->use_io_reserve_lru))
161161
return;
162162

163163
if (bdev->driver->io_mem_reserve &&

include/drm/ttm/ttm_bo_driver.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ struct ttm_mem_type_manager_func {
155155
* @use_io_reserve_lru: Use an lru list to try to unreserve io_mem_regions
156156
* reserved by the TTM vm system.
157157
* @io_reserve_lru: Optional lru list for unreserving io mem regions.
158-
* @io_reserve_fastpath: Only use bdev::driver::io_mem_reserve to obtain
159158
* @move_lock: lock for move fence
160159
* static information. bdev::driver::io_mem_free is never used.
161160
* @lru: The lru list for this memory type.
@@ -184,7 +183,6 @@ struct ttm_mem_type_manager {
184183
void *priv;
185184
struct mutex io_reserve_mutex;
186185
bool use_io_reserve_lru;
187-
bool io_reserve_fastpath;
188186
spinlock_t move_lock;
189187

190188
/*

0 commit comments

Comments
 (0)