diff options
author | Roger He <Hongbo.He@amd.com> | 2017-12-08 10:09:50 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-27 19:38:54 +0300 |
commit | 279c01f6ef626d59b93383d183fb69173d3f7ac7 (patch) | |
tree | 5874a26a7c74a50a483fbf18df1d9a2aadbc3026 /drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c | |
parent | a6c26af8a4348a0ba2eb146b08f4d4d908cd9222 (diff) | |
download | linux-279c01f6ef626d59b93383d183fb69173d3f7ac7.tar.xz |
drm/ttm: use an operation ctx for ttm_mem_global_alloc
forward the operation context to ttm_mem_global_alloc as well, and the
ultimate goal is swapout enablement for reserved BOs
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c index 051d3b39b0ea..a0cb310665cc 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c @@ -149,6 +149,10 @@ vmw_simple_resource_create_ioctl(struct drm_device *dev, void *data, struct vmw_resource *res; struct vmw_resource *tmp; struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; + struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = false + }; size_t alloc_size; size_t account_size; int ret; @@ -162,7 +166,7 @@ vmw_simple_resource_create_ioctl(struct drm_device *dev, void *data, return ret; ret = ttm_mem_global_alloc(vmw_mem_glob(dev_priv), account_size, - false, true); + &ctx); ttm_read_unlock(&dev_priv->reservation_sem); if (ret) { if (ret != -ERESTARTSYS) |