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
@@ -387,6 +387,7 @@ static int vmw_cotable_readback(struct vmw_resource *res)
|
||||
*/
|
||||
static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size)
|
||||
{
|
||||
struct ttm_operation_ctx ctx = { false, false };
|
||||
struct vmw_private *dev_priv = res->dev_priv;
|
||||
struct vmw_cotable *vcotbl = vmw_cotable(res);
|
||||
struct vmw_dma_buffer *buf, *old_buf = res->backup;
|
||||
@@ -455,7 +456,7 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size)
|
||||
}
|
||||
|
||||
/* Unpin new buffer, and switch backup buffers. */
|
||||
ret = ttm_bo_validate(bo, &vmw_mob_placement, false, false);
|
||||
ret = ttm_bo_validate(bo, &vmw_mob_placement, &ctx);
|
||||
if (unlikely(ret != 0)) {
|
||||
DRM_ERROR("Failed validating new COTable backup buffer.\n");
|
||||
goto out_wait;
|
||||
|
Reference in New Issue
Block a user