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_so.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_so.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_so.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_so.c b/drivers/gpu/drm/vmwgfx/vmwgfx_so.c index 5a73eebd0f35..d3573c37c436 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_so.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_so.c @@ -329,6 +329,10 @@ int vmw_view_add(struct vmw_cmdbuf_res_manager *man, struct vmw_private *dev_priv = ctx->dev_priv; struct vmw_resource *res; struct vmw_view *view; + struct ttm_operation_ctx ttm_opt_ctx = { + .interruptible = true, + .no_wait_gpu = false + }; size_t size; int ret; @@ -345,7 +349,7 @@ int vmw_view_add(struct vmw_cmdbuf_res_manager *man, size = offsetof(struct vmw_view, cmd) + cmd_size; - ret = ttm_mem_global_alloc(vmw_mem_glob(dev_priv), size, false, true); + ret = ttm_mem_global_alloc(vmw_mem_glob(dev_priv), size, &ttm_opt_ctx); if (ret) { if (ret != -ERESTARTSYS) DRM_ERROR("Out of graphics memory for view" |