diff options
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index dc391693d7ce..bfddf97dd13e 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | |||
@@ -1100,6 +1100,18 @@ static void uvd_v6_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring) | |||
1100 | amdgpu_ring_write(ring, 0xE); | 1100 | amdgpu_ring_write(ring, 0xE); |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | static void uvd_v6_0_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count) | ||
1104 | { | ||
1105 | int i; | ||
1106 | |||
1107 | WARN_ON(ring->wptr % 2 || count % 2); | ||
1108 | |||
1109 | for (i = 0; i < count / 2; i++) { | ||
1110 | amdgpu_ring_write(ring, PACKET0(mmUVD_NO_OP, 0)); | ||
1111 | amdgpu_ring_write(ring, 0); | ||
1112 | } | ||
1113 | } | ||
1114 | |||
1103 | static void uvd_v6_0_enc_ring_emit_pipeline_sync(struct amdgpu_ring *ring) | 1115 | static void uvd_v6_0_enc_ring_emit_pipeline_sync(struct amdgpu_ring *ring) |
1104 | { | 1116 | { |
1105 | uint32_t seq = ring->fence_drv.sync_seq; | 1117 | uint32_t seq = ring->fence_drv.sync_seq; |
@@ -1532,7 +1544,6 @@ static const struct amd_ip_funcs uvd_v6_0_ip_funcs = { | |||
1532 | static const struct amdgpu_ring_funcs uvd_v6_0_ring_phys_funcs = { | 1544 | static const struct amdgpu_ring_funcs uvd_v6_0_ring_phys_funcs = { |
1533 | .type = AMDGPU_RING_TYPE_UVD, | 1545 | .type = AMDGPU_RING_TYPE_UVD, |
1534 | .align_mask = 0xf, | 1546 | .align_mask = 0xf, |
1535 | .nop = PACKET0(mmUVD_NO_OP, 0), | ||
1536 | .support_64bit_ptrs = false, | 1547 | .support_64bit_ptrs = false, |
1537 | .get_rptr = uvd_v6_0_ring_get_rptr, | 1548 | .get_rptr = uvd_v6_0_ring_get_rptr, |
1538 | .get_wptr = uvd_v6_0_ring_get_wptr, | 1549 | .get_wptr = uvd_v6_0_ring_get_wptr, |
@@ -1548,7 +1559,7 @@ static const struct amdgpu_ring_funcs uvd_v6_0_ring_phys_funcs = { | |||
1548 | .emit_hdp_flush = uvd_v6_0_ring_emit_hdp_flush, | 1559 | .emit_hdp_flush = uvd_v6_0_ring_emit_hdp_flush, |
1549 | .test_ring = uvd_v6_0_ring_test_ring, | 1560 | .test_ring = uvd_v6_0_ring_test_ring, |
1550 | .test_ib = amdgpu_uvd_ring_test_ib, | 1561 | .test_ib = amdgpu_uvd_ring_test_ib, |
1551 | .insert_nop = amdgpu_ring_insert_nop, | 1562 | .insert_nop = uvd_v6_0_ring_insert_nop, |
1552 | .pad_ib = amdgpu_ring_generic_pad_ib, | 1563 | .pad_ib = amdgpu_ring_generic_pad_ib, |
1553 | .begin_use = amdgpu_uvd_ring_begin_use, | 1564 | .begin_use = amdgpu_uvd_ring_begin_use, |
1554 | .end_use = amdgpu_uvd_ring_end_use, | 1565 | .end_use = amdgpu_uvd_ring_end_use, |