drm/amdgpu: clear RB at ring init
authorMonk Liu <Monk.Liu@amd.com>
Wed, 1 Jun 2016 21:37:21 +0000 (17:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 18:50:37 +0000 (14:50 -0400)
This help fix reloading driver hang issue of SDMA
ring.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c

index 870f9494252c83925f4898d286f28891c8e79897..dc8a7bbedfeaf3307e724f46c18db88b338ab322 100644 (file)
@@ -310,6 +310,9 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                }
                r = amdgpu_bo_kmap(ring->ring_obj,
                                       (void **)&ring->ring);
+
+               memset((void *)ring->ring, 0, ring->ring_size);
+
                amdgpu_bo_unreserve(ring->ring_obj);
                if (r) {
                        dev_err(adev->dev, "(%d) ring map failed\n", r);