diff options
| author | Christian König <[email protected]> | 2017-04-12 12:41:43 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-12-06 17:48:02 +0000 |
| commit | 6fead44a4c5897c1524005ed3228b86120ff3ada (patch) | |
| tree | e49962694f6e0d4ae3101965e93fdaa913dd3879 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/ttm: add operation ctx to ttm_bo_validate v2 (diff) | |
| download | kernel-6fead44a4c5897c1524005ed3228b86120ff3ada.tar.gz kernel-6fead44a4c5897c1524005ed3228b86120ff3ada.zip | |
drm/ttm: use an operation ctx for ttm_bo_init_reserved
Instead of specifying if sleeping should be interruptible.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Tested-by: Michel Dänzer <[email protected]>
Acked-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index c2419bc6b3df..15027f751e07 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -327,6 +327,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, uint64_t init_value, struct amdgpu_bo **bo_ptr) { + struct ttm_operation_ctx ctx = { !kernel, false }; struct amdgpu_bo *bo; enum ttm_bo_type type; unsigned long page_align; @@ -408,7 +409,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, initial_bytes_moved = atomic64_read(&adev->num_bytes_moved); /* Kernel allocation are uninterruptible */ r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, type, - &bo->placement, page_align, !kernel, NULL, + &bo->placement, page_align, &ctx, NULL, acc_size, sg, resv, &amdgpu_ttm_bo_destroy); if (unlikely(r != 0)) return r; |
