drm/ttm: add operation ctx to ttm_bo_validate v2
Give moving a BO into place an operation context to work with. v2: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
750a25037c
commit
19be557010
@@ -970,6 +970,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,
|
||||
size_t size,
|
||||
struct list_head *list)
|
||||
{
|
||||
struct ttm_operation_ctx ctx = { false, true };
|
||||
struct vmw_dma_buffer *buf;
|
||||
struct ttm_bo_kmap_obj map;
|
||||
bool is_iomem;
|
||||
@@ -1005,7 +1006,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,
|
||||
WARN_ON(is_iomem);
|
||||
|
||||
ttm_bo_kunmap(&map);
|
||||
ret = ttm_bo_validate(&buf->base, &vmw_sys_placement, false, true);
|
||||
ret = ttm_bo_validate(&buf->base, &vmw_sys_placement, &ctx);
|
||||
WARN_ON(ret != 0);
|
||||
ttm_bo_unreserve(&buf->base);
|
||||
|
||||
|
Reference in New Issue
Block a user