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>
此提交包含在:
@@ -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"
|
||||
|
新增問題並參考
封鎖使用者