diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2016-09-25 16:34:49 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-27 13:00:52 -0400 |
commit | 4cd00d37559badddb9e55851bb07c398ec3607ae (patch) | |
tree | 194c16c5831fb01348d9dbd42703814c179fc551 /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |
parent | 44f9d7b3f1096ec5c90b2396f600f385f4bf4a00 (diff) |
drm/amdgpu/vce3: don't forget to tear down some rings
We can use .num_rings for that.
Fixes: 6f0359ff7307 ("vce3: add support for third vce ring")
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index 686d99c121a8..3b03558ddb01 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |||
@@ -210,6 +210,8 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size) | |||
210 | */ | 210 | */ |
211 | int amdgpu_vce_sw_fini(struct amdgpu_device *adev) | 211 | int amdgpu_vce_sw_fini(struct amdgpu_device *adev) |
212 | { | 212 | { |
213 | unsigned i; | ||
214 | |||
213 | if (adev->vce.vcpu_bo == NULL) | 215 | if (adev->vce.vcpu_bo == NULL) |
214 | return 0; | 216 | return 0; |
215 | 217 | ||
@@ -217,8 +219,8 @@ int amdgpu_vce_sw_fini(struct amdgpu_device *adev) | |||
217 | 219 | ||
218 | amdgpu_bo_unref(&adev->vce.vcpu_bo); | 220 | amdgpu_bo_unref(&adev->vce.vcpu_bo); |
219 | 221 | ||
220 | amdgpu_ring_fini(&adev->vce.ring[0]); | 222 | for (i = 0; i < adev->vce.num_rings; i++) |
221 | amdgpu_ring_fini(&adev->vce.ring[1]); | 223 | amdgpu_ring_fini(&adev->vce.ring[i]); |
222 | 224 | ||
223 | release_firmware(adev->vce.fw); | 225 | release_firmware(adev->vce.fw); |
224 | mutex_destroy(&adev->vce.idle_mutex); | 226 | mutex_destroy(&adev->vce.idle_mutex); |