summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2016-06-02 00:37:21 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 21:50:37 +0300
commitcc7d8c79792e626546ef7ef7086882b2c83b89e1 (patch)
tree14c85e16bd3c991011eec8b3a19c15fdbe6914bb /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
parent5dd0775e502b26b44e5bcb5f504a977a565f2f3e (diff)
downloadlinux-cc7d8c79792e626546ef7ef7086882b2c83b89e1.tar.xz
drm/amdgpu: clear RB at ring init
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 870f9494252c..dc8a7bbedfea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -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);