Skip to contentSkip to conversation

drm/amdgpu/gfx9: ensure mqd data take effect when gpu reset

PATCH New Yintian Tao 1 participant 1 message Jun 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx9: ensure mqd data take effect when gpu reset

We should ensure mqd data take effect when gpu reset. Otherwise, it will rasie ring ib tests failure.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -0
index 2e9cac1..bea641d 100644
@@ -3123,6 +3123,8 @@ static int gfx_v9_0_kiq_init_queue(struct amdgpu_ring *ring)
 		if (adev->gfx.mec.mqd_backup[mqd_idx])
 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct v9_mqd_allocation));
 
+		/* clean gpu table status */
+		amdgpu_gmc_flush_gpu_tlb(adev, 0, 0);
 		/* reset ring buffer */
 		ring->wptr = 0;
 		amdgpu_ring_clear_ring(ring);
@@ -3147,6 +3149,8 @@ static int gfx_v9_0_kiq_init_queue(struct amdgpu_ring *ring)
 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(struct v9_mqd_allocation));
 	}
 
+	/* make sure mqd data landed into VRAM */
+	amdgpu_asic_flush_hdp(adev, NULL);
 	return 0;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx