drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

for saving memory and more bit flag can be used in future

Signed-off-by: Roger He <Hongbo.He@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Esse commit está contido em:
Roger He
2018-02-06 11:22:57 +08:00
commit de Alex Deucher
commit d330fca115
4 arquivos alterados com 11 adições e 7 exclusões

Ver arquivo

@@ -730,7 +730,8 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
*locked = false;
if (bo->resv == ctx->resv) {
reservation_object_assert_held(bo->resv);
if (ctx->allow_reserved_eviction || !list_empty(&bo->ddestroy))
if (ctx->flags & TTM_OPT_FLAG_ALLOW_RES_EVICT
|| !list_empty(&bo->ddestroy))
ret = true;
} else {
*locked = reservation_object_trylock(bo->resv);