aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index e3281cacc586..1b54cc218b47 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -876,6 +876,9 @@ int amdgpu_uvd_ring_parse_cs(struct amdgpu_cs_parser *parser, uint32_t ib_idx)
876 struct amdgpu_ib *ib = &parser->job->ibs[ib_idx]; 876 struct amdgpu_ib *ib = &parser->job->ibs[ib_idx];
877 int r; 877 int r;
878 878
879 parser->job->vm = NULL;
880 ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);
881
879 if (ib->length_dw % 16) { 882 if (ib->length_dw % 16) {
880 DRM_ERROR("UVD IB length (%d) not 16 dwords aligned!\n", 883 DRM_ERROR("UVD IB length (%d) not 16 dwords aligned!\n",
881 ib->length_dw); 884 ib->length_dw);
@@ -931,7 +934,7 @@ static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo,
931 if (r) 934 if (r)
932 return r; 935 return r;
933 936
934 if (!bo->adev->uvd.address_64_bit) { 937 if (!ring->adev->uvd.address_64_bit) {
935 amdgpu_ttm_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_VRAM); 938 amdgpu_ttm_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_VRAM);
936 amdgpu_uvd_force_into_uvd_segment(bo); 939 amdgpu_uvd_force_into_uvd_segment(bo);
937 } 940 }
@@ -1002,7 +1005,8 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
1002 1005
1003 r = amdgpu_bo_create(adev, 1024, PAGE_SIZE, true, 1006 r = amdgpu_bo_create(adev, 1024, PAGE_SIZE, true,
1004 AMDGPU_GEM_DOMAIN_VRAM, 1007 AMDGPU_GEM_DOMAIN_VRAM,
1005 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, 1008 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
1009 AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
1006 NULL, NULL, &bo); 1010 NULL, NULL, &bo);
1007 if (r) 1011 if (r)
1008 return r; 1012 return r;
@@ -1051,7 +1055,8 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
1051 1055
1052 r = amdgpu_bo_create(adev, 1024, PAGE_SIZE, true, 1056 r = amdgpu_bo_create(adev, 1024, PAGE_SIZE, true,
1053 AMDGPU_GEM_DOMAIN_VRAM, 1057 AMDGPU_GEM_DOMAIN_VRAM,
1054 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, 1058 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
1059 AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
1055 NULL, NULL, &bo); 1060 NULL, NULL, &bo);
1056 if (r) 1061 if (r)
1057 return r; 1062 return r;