diff options
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_execbuf_util.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c index 201a71d111ec..7dcc6470e2f5 100644 --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c | |||
@@ -101,15 +101,16 @@ static int ttm_eu_wait_unreserved_locked(struct list_head *list, | |||
101 | void ttm_eu_backoff_reservation(struct list_head *list) | 101 | void ttm_eu_backoff_reservation(struct list_head *list) |
102 | { | 102 | { |
103 | struct ttm_validate_buffer *entry; | 103 | struct ttm_validate_buffer *entry; |
104 | struct ttm_bo_global *glob; | ||
104 | 105 | ||
105 | list_for_each_entry(entry, list, head) { | 106 | if (list_empty(list)) |
106 | struct ttm_buffer_object *bo = entry->bo; | 107 | return; |
107 | if (!entry->reserved) | ||
108 | continue; | ||
109 | 108 | ||
110 | entry->reserved = false; | 109 | entry = list_first_entry(list, struct ttm_validate_buffer, head); |
111 | ttm_bo_unreserve(bo); | 110 | glob = entry->bo->glob; |
112 | } | 111 | spin_lock(&glob->lru_lock); |
112 | ttm_eu_backoff_reservation_locked(list); | ||
113 | spin_unlock(&glob->lru_lock); | ||
113 | } | 114 | } |
114 | EXPORT_SYMBOL(ttm_eu_backoff_reservation); | 115 | EXPORT_SYMBOL(ttm_eu_backoff_reservation); |
115 | 116 | ||