diff options
| author | xinhui pan <[email protected]> | 2021-09-09 23:54:46 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-09-14 19:59:58 +0000 |
| commit | 68331d7cf3a9cd0ddfb7463798a209b1e28ac4bf (patch) | |
| tree | 6286c61d0043380f548f6739cda585a1ce8ec4b1 /drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | |
| parent | drm/amdgpu: Unify PSP TA context (diff) | |
| download | kernel-68331d7cf3a9cd0ddfb7463798a209b1e28ac4bf.tar.gz kernel-68331d7cf3a9cd0ddfb7463798a209b1e28ac4bf.zip | |
drm/amdgpu: UVD avoid memory allocation during IB test
move BO allocation in sw_init.
Signed-off-by: xinhui pan <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index bc571833632e..d5d023a24269 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c @@ -332,15 +332,9 @@ err: static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout) { struct dma_fence *fence = NULL; - struct amdgpu_bo *bo = NULL; + struct amdgpu_bo *bo = ring->adev->uvd.ib_bo; long r; - r = amdgpu_bo_create_reserved(ring->adev, 128 * 1024, PAGE_SIZE, - AMDGPU_GEM_DOMAIN_VRAM, - &bo, NULL, NULL); - if (r) - return r; - r = uvd_v6_0_enc_get_create_msg(ring, 1, bo, NULL); if (r) goto error; @@ -357,9 +351,6 @@ static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout) error: dma_fence_put(fence); - amdgpu_bo_unpin(bo); - amdgpu_bo_unreserve(bo); - amdgpu_bo_unref(&bo); return r; } |
