diff options
| author | 2021-09-10 07:54:46 +0800 | |
|---|---|---|
| committer | 2021-09-14 15:59:58 -0400 | |
| commit | 68331d7cf3a9cd0ddfb7463798a209b1e28ac4bf (patch) | |
| tree | 6286c61d0043380f548f6739cda585a1ce8ec4b1 /drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | |
| parent | drm/amdgpu: Unify PSP TA context (diff) | |
| download | wireguard-linux-68331d7cf3a9cd0ddfb7463798a209b1e28ac4bf.tar.xz wireguard-linux-68331d7cf3a9cd0ddfb7463798a209b1e28ac4bf.zip | |
drm/amdgpu: UVD avoid memory allocation during IB test
move BO allocation in sw_init.
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c index b6e82d75561f..c115b2da22ef 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c @@ -338,15 +338,9 @@ err: static int uvd_v7_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_v7_0_enc_get_create_msg(ring, 1, bo, NULL); if (r) goto error; @@ -363,9 +357,6 @@ static int uvd_v7_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; } |
