mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-06 10:50:19 +01:00
ttm: Don't take a buffer object off lru lists if reservation fails.
This commit is contained in:
parent
f785d1a15e
commit
6c083adee8
1 changed files with 3 additions and 2 deletions
|
|
@ -182,13 +182,14 @@ int ttm_bo_reserve(struct ttm_buffer_object *bo,
|
|||
bool no_wait, bool use_sequence, uint32_t sequence)
|
||||
{
|
||||
struct ttm_bo_device *bdev = bo->bdev;
|
||||
int put_count;
|
||||
int put_count = 0;
|
||||
int ret;
|
||||
|
||||
spin_lock(&bdev->lru_lock);
|
||||
ret = ttm_bo_reserve_locked(bo, interruptible, no_wait, use_sequence,
|
||||
sequence);
|
||||
put_count = ttm_bo_del_from_lru(bo);
|
||||
if (likely(ret == 0))
|
||||
put_count = ttm_bo_del_from_lru(bo);
|
||||
spin_unlock(&bdev->lru_lock);
|
||||
|
||||
while (put_count--)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue