aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_gem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 7ce3fde4074..ed52a6f4161 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -426,9 +426,7 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
426 return ret; 426 return ret;
427 } 427 }
428 428
429 nvbo->channel = (b->read_domains & (1 << 31)) ? NULL : chan;
430 ret = nouveau_bo_validate(nvbo, true, false, false); 429 ret = nouveau_bo_validate(nvbo, true, false, false);
431 nvbo->channel = NULL;
432 if (unlikely(ret)) { 430 if (unlikely(ret)) {
433 if (ret != -ERESTARTSYS) 431 if (ret != -ERESTARTSYS)
434 NV_ERROR(dev, "fail ttm_validate\n"); 432 NV_ERROR(dev, "fail ttm_validate\n");
@@ -678,19 +676,13 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
678 return PTR_ERR(bo); 676 return PTR_ERR(bo);
679 } 677 }
680 678
681 /* Mark push buffers as being used on PFIFO, the validation code 679 /* Ensure all push buffers are on validate list */
682 * will then make sure that if the pushbuf bo moves, that they
683 * happen on the kernel channel, which will in turn cause a sync
684 * to happen before we try and submit the push buffer.
685 */
686 for (i = 0; i < req->nr_push; i++) { 680 for (i = 0; i < req->nr_push; i++) {
687 if (push[i].bo_index >= req->nr_buffers) { 681 if (push[i].bo_index >= req->nr_buffers) {
688 NV_ERROR(dev, "push %d buffer not in list\n", i); 682 NV_ERROR(dev, "push %d buffer not in list\n", i);
689 ret = -EINVAL; 683 ret = -EINVAL;
690 goto out_prevalid; 684 goto out_prevalid;
691 } 685 }
692
693 bo[push[i].bo_index].read_domains |= (1 << 31);
694 } 686 }
695 687
696 /* Validate buffer list */ 688 /* Validate buffer list */