@@ -205,19 +205,21 @@ static int vpe_v6_1_ring_start(struct amdgpu_vpe *vpe)
205205static int vpe_v_6_1_ring_stop (struct amdgpu_vpe * vpe )
206206{
207207 struct amdgpu_device * adev = vpe -> ring .adev ;
208- uint32_t rb_cntl , ib_cntl ;
208+ uint32_t queue_reset ;
209+ int ret ;
209210
210- rb_cntl = RREG32 (vpe_get_reg_offset (vpe , 0 , regVPEC_QUEUE0_RB_CNTL ));
211- rb_cntl = REG_SET_FIELD (rb_cntl , VPEC_QUEUE0_RB_CNTL , RB_ENABLE , 0 );
212- WREG32 (vpe_get_reg_offset (vpe , 0 , regVPEC_QUEUE0_RB_CNTL ), rb_cntl );
211+ queue_reset = RREG32 (vpe_get_reg_offset (vpe , 0 , regVPEC_QUEUE_RESET_REQ ));
212+ queue_reset = REG_SET_FIELD (queue_reset , VPEC_QUEUE_RESET_REQ , QUEUE0_RESET , 1 );
213+ WREG32 (vpe_get_reg_offset (vpe , 0 , regVPEC_QUEUE_RESET_REQ ), queue_reset );
213214
214- ib_cntl = RREG32 (vpe_get_reg_offset (vpe , 0 , regVPEC_QUEUE0_IB_CNTL ));
215- ib_cntl = REG_SET_FIELD (ib_cntl , VPEC_QUEUE0_IB_CNTL , IB_ENABLE , 0 );
216- WREG32 (vpe_get_reg_offset (vpe , 0 , regVPEC_QUEUE0_IB_CNTL ), ib_cntl );
215+ ret = SOC15_WAIT_ON_RREG (VPE , 0 , regVPEC_QUEUE_RESET_REQ , 0 ,
216+ VPEC_QUEUE_RESET_REQ__QUEUE0_RESET_MASK );
217+ if (ret )
218+ dev_err (adev -> dev , "VPE queue reset failed\n" );
217219
218220 vpe -> ring .sched .ready = false;
219221
220- return 0 ;
222+ return ret ;
221223}
222224
223225static int vpe_v6_1_set_trap_irq_state (struct amdgpu_device * adev ,
0 commit comments