diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 041e0121590c..d7ba048c2f80 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | |||
@@ -35,8 +35,8 @@ | |||
35 | #include "soc15d.h" | 35 | #include "soc15d.h" |
36 | #include "soc15_common.h" | 36 | #include "soc15_common.h" |
37 | 37 | ||
38 | #include "vega10/soc15ip.h" | 38 | #include "soc15ip.h" |
39 | #include "raven1/VCN/vcn_1_0_offset.h" | 39 | #include "vcn/vcn_1_0_offset.h" |
40 | 40 | ||
41 | /* 1 second timeout */ | 41 | /* 1 second timeout */ |
42 | #define VCN_IDLE_TIMEOUT msecs_to_jiffies(1000) | 42 | #define VCN_IDLE_TIMEOUT msecs_to_jiffies(1000) |
@@ -106,7 +106,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) | |||
106 | ring = &adev->vcn.ring_dec; | 106 | ring = &adev->vcn.ring_dec; |
107 | rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL]; | 107 | rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL]; |
108 | r = amd_sched_entity_init(&ring->sched, &adev->vcn.entity_dec, | 108 | r = amd_sched_entity_init(&ring->sched, &adev->vcn.entity_dec, |
109 | rq, amdgpu_sched_jobs); | 109 | rq, amdgpu_sched_jobs, NULL); |
110 | if (r != 0) { | 110 | if (r != 0) { |
111 | DRM_ERROR("Failed setting up VCN dec run queue.\n"); | 111 | DRM_ERROR("Failed setting up VCN dec run queue.\n"); |
112 | return r; | 112 | return r; |
@@ -115,7 +115,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) | |||
115 | ring = &adev->vcn.ring_enc[0]; | 115 | ring = &adev->vcn.ring_enc[0]; |
116 | rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL]; | 116 | rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL]; |
117 | r = amd_sched_entity_init(&ring->sched, &adev->vcn.entity_enc, | 117 | r = amd_sched_entity_init(&ring->sched, &adev->vcn.entity_enc, |
118 | rq, amdgpu_sched_jobs); | 118 | rq, amdgpu_sched_jobs, NULL); |
119 | if (r != 0) { | 119 | if (r != 0) { |
120 | DRM_ERROR("Failed setting up VCN enc run queue.\n"); | 120 | DRM_ERROR("Failed setting up VCN enc run queue.\n"); |
121 | return r; | 121 | return r; |
@@ -261,7 +261,7 @@ int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring) | |||
261 | } | 261 | } |
262 | 262 | ||
263 | if (i < adev->usec_timeout) { | 263 | if (i < adev->usec_timeout) { |
264 | DRM_INFO("ring test on %d succeeded in %d usecs\n", | 264 | DRM_DEBUG("ring test on %d succeeded in %d usecs\n", |
265 | ring->idx, i); | 265 | ring->idx, i); |
266 | } else { | 266 | } else { |
267 | DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n", | 267 | DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n", |
@@ -274,6 +274,7 @@ int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring) | |||
274 | static int amdgpu_vcn_dec_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, | 274 | static int amdgpu_vcn_dec_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, |
275 | bool direct, struct dma_fence **fence) | 275 | bool direct, struct dma_fence **fence) |
276 | { | 276 | { |
277 | struct ttm_operation_ctx ctx = { true, false }; | ||
277 | struct ttm_validate_buffer tv; | 278 | struct ttm_validate_buffer tv; |
278 | struct ww_acquire_ctx ticket; | 279 | struct ww_acquire_ctx ticket; |
279 | struct list_head head; | 280 | struct list_head head; |
@@ -294,7 +295,7 @@ static int amdgpu_vcn_dec_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *b | |||
294 | if (r) | 295 | if (r) |
295 | return r; | 296 | return r; |
296 | 297 | ||
297 | r = ttm_bo_validate(&bo->tbo, &bo->placement, true, false); | 298 | r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); |
298 | if (r) | 299 | if (r) |
299 | goto err; | 300 | goto err; |
300 | 301 | ||
@@ -467,7 +468,7 @@ int amdgpu_vcn_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout) | |||
467 | } else if (r < 0) { | 468 | } else if (r < 0) { |
468 | DRM_ERROR("amdgpu: fence wait failed (%ld).\n", r); | 469 | DRM_ERROR("amdgpu: fence wait failed (%ld).\n", r); |
469 | } else { | 470 | } else { |
470 | DRM_INFO("ib test on ring %d succeeded\n", ring->idx); | 471 | DRM_DEBUG("ib test on ring %d succeeded\n", ring->idx); |
471 | r = 0; | 472 | r = 0; |
472 | } | 473 | } |
473 | 474 | ||
@@ -500,7 +501,7 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring) | |||
500 | } | 501 | } |
501 | 502 | ||
502 | if (i < adev->usec_timeout) { | 503 | if (i < adev->usec_timeout) { |
503 | DRM_INFO("ring test on %d succeeded in %d usecs\n", | 504 | DRM_DEBUG("ring test on %d succeeded in %d usecs\n", |
504 | ring->idx, i); | 505 | ring->idx, i); |
505 | } else { | 506 | } else { |
506 | DRM_ERROR("amdgpu: ring %d test failed\n", | 507 | DRM_ERROR("amdgpu: ring %d test failed\n", |
@@ -643,7 +644,7 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout) | |||
643 | } else if (r < 0) { | 644 | } else if (r < 0) { |
644 | DRM_ERROR("amdgpu: fence wait failed (%ld).\n", r); | 645 | DRM_ERROR("amdgpu: fence wait failed (%ld).\n", r); |
645 | } else { | 646 | } else { |
646 | DRM_INFO("ib test on ring %d succeeded\n", ring->idx); | 647 | DRM_DEBUG("ib test on ring %d succeeded\n", ring->idx); |
647 | r = 0; | 648 | r = 0; |
648 | } | 649 | } |
649 | error: | 650 | error: |