diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2020-02-25 11:31:46 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-02-26 14:17:33 -0500 |
commit | 6f9f960472c348b3753d63bd85c9b37d7c083cff (patch) | |
tree | 6d119a9b0f0d6f5766872e1f1fb3f9eb911c26e2 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
parent | ef1caf48bd4d7cb568f22bf9d7cc9d725edc1555 (diff) | |
download | linux-6f9f960472c348b3753d63bd85c9b37d7c083cff.tar.bz2 |
drm/amdgpu: cleanup amdgpu_ring_fini
cleanup amdgpu_ring_fini to check the prerequisites before changing ring->sched.ready
Signed-off-by: Nirmoy Das <nirmoy.das@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, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index e5c83e164d82..6f20b5365f76 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -351,12 +351,13 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, */ void amdgpu_ring_fini(struct amdgpu_ring *ring) { - ring->sched.ready = false; /* Not to finish a ring which is not initialized */ if (!(ring->adev) || !(ring->adev->rings[ring->idx])) return; + ring->sched.ready = false; + amdgpu_device_wb_free(ring->adev, ring->rptr_offs); amdgpu_device_wb_free(ring->adev, ring->wptr_offs); |