aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
diff options
context:
space:
mode:
authorYuBiao Wang <[email protected]>2021-06-09 02:41:34 +0000
committerAlex Deucher <[email protected]>2021-06-11 20:03:26 +0000
commit29b4ac0ed9130229cf518edab01fd6b20d9f1c92 (patch)
treed2567ff439d937fc023b694d28e6d2598acc980e /drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
parentdrm/amd/pm: Only primary die supports power data (diff)
downloadkernel-29b4ac0ed9130229cf518edab01fd6b20d9f1c92.tar.gz
kernel-29b4ac0ed9130229cf518edab01fd6b20d9f1c92.zip
drm/amdgpu: reset psp ring wptr during ring_create
[Why] psp ring wptr is not initialized properly in ring_create, which would lead to psp failure after several gpu reset. [How] Set ring_wptr to zero in psp_ring_create. Signed-off-by: YuBiao Wang <[email protected]> Reviewed-by: Horace Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_v3_1.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/psp_v3_1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index ce7377d2368f..b86dcbabb635 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -227,6 +227,7 @@ static int psp_v3_1_ring_create(struct psp_context *psp,
psp_v3_1_reroute_ih(psp);
if (amdgpu_sriov_vf(adev)) {
+ ring->ring_wptr = 0;
ret = psp_v3_1_ring_stop(psp, ring_type);
if (ret) {
DRM_ERROR("psp_v3_1_ring_stop_sriov failed!\n");