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_vce.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_vce.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index a91abfb32746..ba6d846b08ff 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |||
@@ -558,6 +558,7 @@ static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx, | |||
558 | int lo, int hi, unsigned size, int32_t index) | 558 | int lo, int hi, unsigned size, int32_t index) |
559 | { | 559 | { |
560 | int64_t offset = ((uint64_t)size) * ((int64_t)index); | 560 | int64_t offset = ((uint64_t)size) * ((int64_t)index); |
561 | struct ttm_operation_ctx ctx = { false, false }; | ||
561 | struct amdgpu_bo_va_mapping *mapping; | 562 | struct amdgpu_bo_va_mapping *mapping; |
562 | unsigned i, fpfn, lpfn; | 563 | unsigned i, fpfn, lpfn; |
563 | struct amdgpu_bo *bo; | 564 | struct amdgpu_bo *bo; |
@@ -587,7 +588,7 @@ static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx, | |||
587 | bo->placements[i].lpfn = bo->placements[i].fpfn ? | 588 | bo->placements[i].lpfn = bo->placements[i].fpfn ? |
588 | min(bo->placements[i].fpfn, lpfn) : lpfn; | 589 | min(bo->placements[i].fpfn, lpfn) : lpfn; |
589 | } | 590 | } |
590 | return ttm_bo_validate(&bo->tbo, &bo->placement, false, false); | 591 | return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); |
591 | } | 592 | } |
592 | 593 | ||
593 | 594 | ||