diff options
author | Christian König <christian.koenig@amd.com> | 2017-04-12 08:24:39 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-06 12:48:01 -0500 |
commit | 19be5570107108fba772bc2e3a1eb22ec32fb021 (patch) | |
tree | 86b971706ea8fce92b58cac4ea73e8799564a6ef /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 750a25037cac56afeb48ab807ce80fa2cd518b8d (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 3ad4cf0f22f8..c16579287aee 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -282,6 +282,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data, | |||
282 | int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, | 282 | int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, |
283 | struct drm_file *filp) | 283 | struct drm_file *filp) |
284 | { | 284 | { |
285 | struct ttm_operation_ctx ctx = { true, false }; | ||
285 | struct amdgpu_device *adev = dev->dev_private; | 286 | struct amdgpu_device *adev = dev->dev_private; |
286 | struct drm_amdgpu_gem_userptr *args = data; | 287 | struct drm_amdgpu_gem_userptr *args = data; |
287 | struct drm_gem_object *gobj; | 288 | struct drm_gem_object *gobj; |
@@ -335,7 +336,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, | |||
335 | goto free_pages; | 336 | goto free_pages; |
336 | 337 | ||
337 | amdgpu_ttm_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_GTT); | 338 | amdgpu_ttm_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_GTT); |
338 | r = ttm_bo_validate(&bo->tbo, &bo->placement, true, false); | 339 | r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); |
339 | amdgpu_bo_unreserve(bo); | 340 | amdgpu_bo_unreserve(bo); |
340 | if (r) | 341 | if (r) |
341 | goto free_pages; | 342 | goto free_pages; |