aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-05-06 09:31:19 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-11 13:30:30 -0400
commitf153d2867bf74f84d47f67c377a8e3a34865e562 (patch)
tree22a99ad8bd91d3526880318e2a284f5e896a1f92
parent9f8fb5a2b339ba83493991ca8f1173a939a696d3 (diff)
drm/amdgpu: move context switch handling into common code v2
It was a source of bugs to repeat that in each IP version. v2: rename parameter Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/cik_sdma.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c2
12 files changed, 25 insertions, 29 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 781f0471ef06..db87edc72936 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -283,7 +283,7 @@ struct amdgpu_ring_funcs {
283 int (*parse_cs)(struct amdgpu_cs_parser *p, uint32_t ib_idx); 283 int (*parse_cs)(struct amdgpu_cs_parser *p, uint32_t ib_idx);
284 /* command emit functions */ 284 /* command emit functions */
285 void (*emit_ib)(struct amdgpu_ring *ring, 285 void (*emit_ib)(struct amdgpu_ring *ring,
286 struct amdgpu_ib *ib); 286 struct amdgpu_ib *ib, bool ctx_switch);
287 void (*emit_fence)(struct amdgpu_ring *ring, uint64_t addr, 287 void (*emit_fence)(struct amdgpu_ring *ring, uint64_t addr,
288 uint64_t seq, unsigned flags); 288 uint64_t seq, unsigned flags);
289 void (*emit_pipeline_sync)(struct amdgpu_ring *ring); 289 void (*emit_pipeline_sync)(struct amdgpu_ring *ring);
@@ -2221,7 +2221,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
2221#define amdgpu_ring_get_rptr(r) (r)->funcs->get_rptr((r)) 2221#define amdgpu_ring_get_rptr(r) (r)->funcs->get_rptr((r))
2222#define amdgpu_ring_get_wptr(r) (r)->funcs->get_wptr((r)) 2222#define amdgpu_ring_get_wptr(r) (r)->funcs->get_wptr((r))
2223#define amdgpu_ring_set_wptr(r) (r)->funcs->set_wptr((r)) 2223#define amdgpu_ring_set_wptr(r) (r)->funcs->set_wptr((r))
2224#define amdgpu_ring_emit_ib(r, ib) (r)->funcs->emit_ib((r), (ib)) 2224#define amdgpu_ring_emit_ib(r, ib, c) (r)->funcs->emit_ib((r), (ib), (c))
2225#define amdgpu_ring_emit_pipeline_sync(r) (r)->funcs->emit_pipeline_sync((r)) 2225#define amdgpu_ring_emit_pipeline_sync(r) (r)->funcs->emit_pipeline_sync((r))
2226#define amdgpu_ring_emit_vm_flush(r, vmid, addr) (r)->funcs->emit_vm_flush((r), (vmid), (addr)) 2226#define amdgpu_ring_emit_vm_flush(r, vmid, addr) (r)->funcs->emit_vm_flush((r), (vmid), (addr))
2227#define amdgpu_ring_emit_fence(r, addr, seq, flags) (r)->funcs->emit_fence((r), (addr), (seq), (flags)) 2227#define amdgpu_ring_emit_fence(r, addr, seq, flags) (r)->funcs->emit_fence((r), (addr), (seq), (flags))
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index d6f85923edcd..88b8fda7340f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -121,18 +121,16 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
121{ 121{
122 struct amdgpu_device *adev = ring->adev; 122 struct amdgpu_device *adev = ring->adev;
123 struct amdgpu_ib *ib = &ibs[0]; 123 struct amdgpu_ib *ib = &ibs[0];
124 uint64_t ctx, old_ctx;
125 struct fence *hwf; 124 struct fence *hwf;
126 struct amdgpu_vm *vm = NULL; 125 struct amdgpu_vm *vm = NULL;
127 unsigned i, patch_offset = ~0; 126 unsigned i, patch_offset = ~0;
128 bool skip_preamble; 127 bool skip_preamble, need_ctx_switch;
129 128
130 int r = 0; 129 int r = 0;
131 130
132 if (num_ibs == 0) 131 if (num_ibs == 0)
133 return -EINVAL; 132 return -EINVAL;
134 133
135 ctx = ibs->ctx;
136 if (job) /* for domain0 job like ring test, ibs->job is not assigned */ 134 if (job) /* for domain0 job like ring test, ibs->job is not assigned */
137 vm = job->vm; 135 vm = job->vm;
138 136
@@ -156,7 +154,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
156 patch_offset = amdgpu_ring_init_cond_exec(ring); 154 patch_offset = amdgpu_ring_init_cond_exec(ring);
157 155
158 if (vm) { 156 if (vm) {
159 /* do context switch */
160 r = amdgpu_vm_flush(ring, ib->vm_id, ib->vm_pd_addr, 157 r = amdgpu_vm_flush(ring, ib->vm_id, ib->vm_pd_addr,
161 ib->gds_base, ib->gds_size, 158 ib->gds_base, ib->gds_size,
162 ib->gws_base, ib->gws_size, 159 ib->gws_base, ib->gws_size,
@@ -173,16 +170,17 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
173 /* always set cond_exec_polling to CONTINUE */ 170 /* always set cond_exec_polling to CONTINUE */
174 *ring->cond_exe_cpu_addr = 1; 171 *ring->cond_exe_cpu_addr = 1;
175 172
176 skip_preamble = ring->current_ctx == ctx; 173 skip_preamble = ring->current_ctx == ib->ctx;
177 old_ctx = ring->current_ctx; 174 need_ctx_switch = ring->current_ctx != ib->ctx;
178 for (i = 0; i < num_ibs; ++i) { 175 for (i = 0; i < num_ibs; ++i) {
176 ib = &ibs[i];
179 177
180 /* drop preamble IBs if we don't have a context switch */ 178 /* drop preamble IBs if we don't have a context switch */
181 if ((ib->flags & AMDGPU_IB_FLAG_PREAMBLE) && skip_preamble) 179 if ((ib->flags & AMDGPU_IB_FLAG_PREAMBLE) && skip_preamble)
182 continue; 180 continue;
183 181
184 amdgpu_ring_emit_ib(ring, ib); 182 amdgpu_ring_emit_ib(ring, ib, need_ctx_switch);
185 ring->current_ctx = ctx; 183 need_ctx_switch = false;
186 } 184 }
187 185
188 if (ring->funcs->emit_hdp_invalidate) 186 if (ring->funcs->emit_hdp_invalidate)
@@ -191,7 +189,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
191 r = amdgpu_fence_emit(ring, &hwf); 189 r = amdgpu_fence_emit(ring, &hwf);
192 if (r) { 190 if (r) {
193 dev_err(adev->dev, "failed to emit fence (%d)\n", r); 191 dev_err(adev->dev, "failed to emit fence (%d)\n", r);
194 ring->current_ctx = old_ctx;
195 if (ib->vm_id) 192 if (ib->vm_id)
196 amdgpu_vm_reset_id(adev, ib->vm_id); 193 amdgpu_vm_reset_id(adev, ib->vm_id);
197 amdgpu_ring_undo(ring); 194 amdgpu_ring_undo(ring);
@@ -212,6 +209,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
212 if (patch_offset != ~0 && ring->funcs->patch_cond_exec) 209 if (patch_offset != ~0 && ring->funcs->patch_cond_exec)
213 amdgpu_ring_patch_cond_exec(ring, patch_offset); 210 amdgpu_ring_patch_cond_exec(ring, patch_offset);
214 211
212 ring->current_ctx = ibs->ctx;
215 amdgpu_ring_commit(ring); 213 amdgpu_ring_commit(ring);
216 return 0; 214 return 0;
217} 215}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 7b7b0f64530a..ad91664a7649 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -762,7 +762,7 @@ out:
762 * @ib: the IB to execute 762 * @ib: the IB to execute
763 * 763 *
764 */ 764 */
765void amdgpu_vce_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib) 765void amdgpu_vce_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib, bool ctx_switch)
766{ 766{
767 amdgpu_ring_write(ring, VCE_CMD_IB); 767 amdgpu_ring_write(ring, VCE_CMD_IB);
768 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr)); 768 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr));
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h
index ef99d2370182..40d0650e3a37 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h
@@ -34,7 +34,7 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
34 bool direct, struct fence **fence); 34 bool direct, struct fence **fence);
35void amdgpu_vce_free_handles(struct amdgpu_device *adev, struct drm_file *filp); 35void amdgpu_vce_free_handles(struct amdgpu_device *adev, struct drm_file *filp);
36int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx); 36int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx);
37void amdgpu_vce_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib); 37void amdgpu_vce_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib, bool ctx_switch);
38void amdgpu_vce_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq, 38void amdgpu_vce_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
39 unsigned flags); 39 unsigned flags);
40int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring); 40int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring);
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index df824f80ac07..6c2aa2b863b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -210,7 +210,7 @@ static void cik_sdma_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count)
210 * Schedule an IB in the DMA ring (CIK). 210 * Schedule an IB in the DMA ring (CIK).
211 */ 211 */
212static void cik_sdma_ring_emit_ib(struct amdgpu_ring *ring, 212static void cik_sdma_ring_emit_ib(struct amdgpu_ring *ring,
213 struct amdgpu_ib *ib) 213 struct amdgpu_ib *ib, bool ctx_switch)
214{ 214{
215 u32 extra_bits = ib->vm_id & 0xf; 215 u32 extra_bits = ib->vm_id & 0xf;
216 u32 next_rptr = ring->wptr + 5; 216 u32 next_rptr = ring->wptr + 5;
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index d82fa9641f0e..189ef2b23668 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -2030,13 +2030,12 @@ static void gfx_v7_0_ring_emit_fence_compute(struct amdgpu_ring *ring,
2030 * on the gfx ring for execution by the GPU. 2030 * on the gfx ring for execution by the GPU.
2031 */ 2031 */
2032static void gfx_v7_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, 2032static void gfx_v7_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
2033 struct amdgpu_ib *ib) 2033 struct amdgpu_ib *ib, bool ctx_switch)
2034{ 2034{
2035 bool need_ctx_switch = ring->current_ctx != ib->ctx;
2036 u32 header, control = 0; 2035 u32 header, control = 0;
2037 u32 next_rptr = ring->wptr + 5; 2036 u32 next_rptr = ring->wptr + 5;
2038 2037
2039 if (need_ctx_switch) 2038 if (ctx_switch)
2040 next_rptr += 2; 2039 next_rptr += 2;
2041 2040
2042 next_rptr += 4; 2041 next_rptr += 4;
@@ -2047,7 +2046,7 @@ static void gfx_v7_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
2047 amdgpu_ring_write(ring, next_rptr); 2046 amdgpu_ring_write(ring, next_rptr);
2048 2047
2049 /* insert SWITCH_BUFFER packet before first IB in the ring frame */ 2048 /* insert SWITCH_BUFFER packet before first IB in the ring frame */
2050 if (need_ctx_switch) { 2049 if (ctx_switch) {
2051 amdgpu_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0)); 2050 amdgpu_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0));
2052 amdgpu_ring_write(ring, 0); 2051 amdgpu_ring_write(ring, 0);
2053 } 2052 }
@@ -2070,7 +2069,7 @@ static void gfx_v7_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
2070} 2069}
2071 2070
2072static void gfx_v7_0_ring_emit_ib_compute(struct amdgpu_ring *ring, 2071static void gfx_v7_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
2073 struct amdgpu_ib *ib) 2072 struct amdgpu_ib *ib, bool ctx_switch)
2074{ 2073{
2075 u32 header, control = 0; 2074 u32 header, control = 0;
2076 u32 next_rptr = ring->wptr + 5; 2075 u32 next_rptr = ring->wptr + 5;
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 9a0b6df210c1..0d556c907ab6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -5646,13 +5646,12 @@ static void gfx_v8_0_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
5646} 5646}
5647 5647
5648static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, 5648static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
5649 struct amdgpu_ib *ib) 5649 struct amdgpu_ib *ib, bool ctx_switch)
5650{ 5650{
5651 bool need_ctx_switch = ring->current_ctx != ib->ctx;
5652 u32 header, control = 0; 5651 u32 header, control = 0;
5653 u32 next_rptr = ring->wptr + 5; 5652 u32 next_rptr = ring->wptr + 5;
5654 5653
5655 if (need_ctx_switch) 5654 if (ctx_switch)
5656 next_rptr += 2; 5655 next_rptr += 2;
5657 5656
5658 next_rptr += 4; 5657 next_rptr += 4;
@@ -5663,7 +5662,7 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
5663 amdgpu_ring_write(ring, next_rptr); 5662 amdgpu_ring_write(ring, next_rptr);
5664 5663
5665 /* insert SWITCH_BUFFER packet before first IB in the ring frame */ 5664 /* insert SWITCH_BUFFER packet before first IB in the ring frame */
5666 if (need_ctx_switch) { 5665 if (ctx_switch) {
5667 amdgpu_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0)); 5666 amdgpu_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0));
5668 amdgpu_ring_write(ring, 0); 5667 amdgpu_ring_write(ring, 0);
5669 } 5668 }
@@ -5686,7 +5685,7 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
5686} 5685}
5687 5686
5688static void gfx_v8_0_ring_emit_ib_compute(struct amdgpu_ring *ring, 5687static void gfx_v8_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
5689 struct amdgpu_ib *ib) 5688 struct amdgpu_ib *ib, bool ctx_switch)
5690{ 5689{
5691 u32 header, control = 0; 5690 u32 header, control = 0;
5692 u32 next_rptr = ring->wptr + 5; 5691 u32 next_rptr = ring->wptr + 5;
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index 6be2c0faa1bc..de94adb2b19e 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -242,7 +242,7 @@ static void sdma_v2_4_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count)
242 * Schedule an IB in the DMA ring (VI). 242 * Schedule an IB in the DMA ring (VI).
243 */ 243 */
244static void sdma_v2_4_ring_emit_ib(struct amdgpu_ring *ring, 244static void sdma_v2_4_ring_emit_ib(struct amdgpu_ring *ring,
245 struct amdgpu_ib *ib) 245 struct amdgpu_ib *ib, bool ctx_switch)
246{ 246{
247 u32 vmid = ib->vm_id & 0xf; 247 u32 vmid = ib->vm_id & 0xf;
248 u32 next_rptr = ring->wptr + 5; 248 u32 next_rptr = ring->wptr + 5;
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index b3dab09205af..ca2aee3e88a3 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -400,7 +400,7 @@ static void sdma_v3_0_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count)
400 * Schedule an IB in the DMA ring (VI). 400 * Schedule an IB in the DMA ring (VI).
401 */ 401 */
402static void sdma_v3_0_ring_emit_ib(struct amdgpu_ring *ring, 402static void sdma_v3_0_ring_emit_ib(struct amdgpu_ring *ring,
403 struct amdgpu_ib *ib) 403 struct amdgpu_ib *ib, bool ctx_switch)
404{ 404{
405 u32 vmid = ib->vm_id & 0xf; 405 u32 vmid = ib->vm_id & 0xf;
406 u32 next_rptr = ring->wptr + 5; 406 u32 next_rptr = ring->wptr + 5;
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index 46a397654837..a75ffb5b11b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -489,7 +489,7 @@ static int uvd_v4_2_ring_test_ring(struct amdgpu_ring *ring)
489 * Write ring commands to execute the indirect buffer 489 * Write ring commands to execute the indirect buffer
490 */ 490 */
491static void uvd_v4_2_ring_emit_ib(struct amdgpu_ring *ring, 491static void uvd_v4_2_ring_emit_ib(struct amdgpu_ring *ring,
492 struct amdgpu_ib *ib) 492 struct amdgpu_ib *ib, bool ctx_switch)
493{ 493{
494 amdgpu_ring_write(ring, PACKET0(mmUVD_RBC_IB_BASE, 0)); 494 amdgpu_ring_write(ring, PACKET0(mmUVD_RBC_IB_BASE, 0));
495 amdgpu_ring_write(ring, ib->gpu_addr); 495 amdgpu_ring_write(ring, ib->gpu_addr);
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
index b96486c09250..ecb81014d836 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
@@ -539,7 +539,7 @@ static int uvd_v5_0_ring_test_ring(struct amdgpu_ring *ring)
539 * Write ring commands to execute the indirect buffer 539 * Write ring commands to execute the indirect buffer
540 */ 540 */
541static void uvd_v5_0_ring_emit_ib(struct amdgpu_ring *ring, 541static void uvd_v5_0_ring_emit_ib(struct amdgpu_ring *ring,
542 struct amdgpu_ib *ib) 542 struct amdgpu_ib *ib, bool ctx_switch)
543{ 543{
544 amdgpu_ring_write(ring, PACKET0(mmUVD_LMI_RBC_IB_64BIT_BAR_LOW, 0)); 544 amdgpu_ring_write(ring, PACKET0(mmUVD_LMI_RBC_IB_64BIT_BAR_LOW, 0));
545 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr)); 545 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr));
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index 892bdac4bb21..a43f1a7c58bc 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -631,7 +631,7 @@ static int uvd_v6_0_ring_test_ring(struct amdgpu_ring *ring)
631 * Write ring commands to execute the indirect buffer 631 * Write ring commands to execute the indirect buffer
632 */ 632 */
633static void uvd_v6_0_ring_emit_ib(struct amdgpu_ring *ring, 633static void uvd_v6_0_ring_emit_ib(struct amdgpu_ring *ring,
634 struct amdgpu_ib *ib) 634 struct amdgpu_ib *ib, bool ctx_switch)
635{ 635{
636 amdgpu_ring_write(ring, PACKET0(mmUVD_LMI_RBC_IB_64BIT_BAR_LOW, 0)); 636 amdgpu_ring_write(ring, PACKET0(mmUVD_LMI_RBC_IB_64BIT_BAR_LOW, 0));
637 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr)); 637 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr));