diff options
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_object.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_object.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c index 26a7ad0f4789..1aa2baa83959 100644 --- a/drivers/gpu/drm/ttm/ttm_object.c +++ b/drivers/gpu/drm/ttm/ttm_object.c @@ -325,6 +325,10 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, struct ttm_ref_object *ref; struct drm_hash_item *hash; struct ttm_mem_global *mem_glob = tfile->tdev->mem_glob; + struct ttm_operation_ctx ctx = { + .interruptible = false, + .no_wait_gpu = false + }; int ret = -EINVAL; if (base->tfile != tfile && !base->shareable) @@ -350,7 +354,7 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, return -EPERM; ret = ttm_mem_global_alloc(mem_glob, sizeof(*ref), - false, false); + &ctx); if (unlikely(ret != 0)) return ret; ref = kmalloc(sizeof(*ref), GFP_KERNEL); @@ -686,7 +690,10 @@ int ttm_prime_handle_to_fd(struct ttm_object_file *tfile, dma_buf = prime->dma_buf; if (!dma_buf || !get_dma_buf_unless_doomed(dma_buf)) { DEFINE_DMA_BUF_EXPORT_INFO(exp_info); - + struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = false + }; exp_info.ops = &tdev->ops; exp_info.size = prime->size; exp_info.flags = flags; @@ -696,7 +703,7 @@ int ttm_prime_handle_to_fd(struct ttm_object_file *tfile, * Need to create a new dma_buf, with memory accounting. */ ret = ttm_mem_global_alloc(tdev->mem_glob, tdev->dma_buf_size, - false, true); + &ctx); if (unlikely(ret != 0)) { mutex_unlock(&prime->mutex); goto out_unref; |