提交 845253e7 编写于 作者: S Sonny Jiang 提交者: Alex Deucher

drm/amdgpu: reset wptr at cp compute resume (v2)

This patch is to resolve compute hang at resume time.

v2: (agd5f) squash in second fix
Signed-off-by: NSonny Jiang <sonny.jiang@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
上级 dc78330a
...@@ -3144,6 +3144,12 @@ static int gfx_v8_0_cp_compute_resume(struct amdgpu_device *adev) ...@@ -3144,6 +3144,12 @@ static int gfx_v8_0_cp_compute_resume(struct amdgpu_device *adev)
WREG32(mmCP_HQD_PQ_DOORBELL_CONTROL, WREG32(mmCP_HQD_PQ_DOORBELL_CONTROL,
mqd->cp_hqd_pq_doorbell_control); mqd->cp_hqd_pq_doorbell_control);
/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */
ring->wptr = 0;
mqd->cp_hqd_pq_wptr = ring->wptr;
WREG32(mmCP_HQD_PQ_WPTR, mqd->cp_hqd_pq_wptr);
mqd->cp_hqd_pq_rptr = RREG32(mmCP_HQD_PQ_RPTR);
/* set the vmid for the queue */ /* set the vmid for the queue */
mqd->cp_hqd_vmid = 0; mqd->cp_hqd_vmid = 0;
WREG32(mmCP_HQD_VMID, mqd->cp_hqd_vmid); WREG32(mmCP_HQD_VMID, mqd->cp_hqd_vmid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册