diff options
author | Monk Liu <Monk.Liu@amd.com> | 2016-06-01 21:37:21 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 18:50:37 (GMT) |
commit | cc7d8c79792e626546ef7ef7086882b2c83b89e1 (patch) | |
tree | 14c85e16bd3c991011eec8b3a19c15fdbe6914bb /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
parent | 5dd0775e502b26b44e5bcb5f504a977a565f2f3e (diff) | |
download | linux-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.c | 3 |
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 870f949..dc8a7bb 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); |