diff options
author | Christian König <christian.koenig@amd.com> | 2020-10-01 17:17:55 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-10-07 14:53:38 +0300 |
commit | 4561b366c70e312698361154bdfe1e04f596056b (patch) | |
tree | 4cf3423c94e274c53b996b79614b03c1611b810f /drivers/gpu/drm | |
parent | 4ce032d64c2a30cf5b23c57b3328d5d2dab99a1f (diff) | |
download | linux-4561b366c70e312698361154bdfe1e04f596056b.tar.xz |
drm/ttm: drop glob parameter from ttm_bo_swapout
We can always access the global state.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/393499/
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_memory.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 6eb151dd840d..96adee10857b 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1432,8 +1432,9 @@ EXPORT_SYMBOL(ttm_bo_wait); * A buffer object shrink method that tries to swap out the first * buffer object on the bo_global::swap_lru list. */ -int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx) +int ttm_bo_swapout(struct ttm_operation_ctx *ctx) { + struct ttm_bo_global *glob = &ttm_bo_glob; struct ttm_buffer_object *bo; int ret = -EBUSY; bool locked; @@ -1531,7 +1532,7 @@ void ttm_bo_swapout_all(void) .no_wait_gpu = false }; - while (ttm_bo_swapout(&ttm_bo_glob, &ctx) == 0); + while (ttm_bo_swapout(&ctx) == 0); } EXPORT_SYMBOL(ttm_bo_swapout_all); diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 89d50f38c0f2..69cf622e79e5 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -275,7 +275,7 @@ static void ttm_shrink(struct ttm_mem_global *glob, bool from_wq, while (ttm_zones_above_swap_target(glob, from_wq, extra)) { spin_unlock(&glob->lock); - ret = ttm_bo_swapout(&ttm_bo_glob, ctx); + ret = ttm_bo_swapout(ctx); spin_lock(&glob->lock); if (unlikely(ret != 0)) break; |