diff options
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_execbuf_util.c')
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_execbuf_util.c | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c index 8ce508e76208..3820ae97a030 100644 --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c @@ -93,7 +93,8 @@ EXPORT_SYMBOL(ttm_eu_backoff_reservation);   */  int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, -			   struct list_head *list, bool intr) +			   struct list_head *list, bool intr, +			   struct list_head *dups)  {  	struct ttm_bo_global *glob;  	struct ttm_validate_buffer *entry; @@ -117,6 +118,13 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,  			__ttm_bo_unreserve(bo);  			ret = -EBUSY; + +		} else if (ret == -EALREADY && dups) { +			struct ttm_validate_buffer *safe = entry; +			entry = list_prev_entry(entry, head); +			list_del(&safe->head); +			list_add(&safe->head, dups); +			continue;  		}  		if (!ret) {  |