diff options
| author | Grazvydas Ignotas <[email protected]> | 2016-09-25 20:34:49 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2016-09-27 17:00:52 +0000 |
| commit | 4cd00d37559badddb9e55851bb07c398ec3607ae (patch) | |
| tree | 194c16c5831fb01348d9dbd42703814c179fc551 /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |
| parent | drm/amdgpu/i2c: add const where appropriate (diff) | |
| download | kernel-4cd00d37559badddb9e55851bb07c398ec3607ae.tar.gz kernel-4cd00d37559badddb9e55851bb07c398ec3607ae.zip | |
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 <[email protected]>
Signed-off-by: Grazvydas Ignotas <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
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) */ int amdgpu_vce_sw_fini(struct amdgpu_device *adev) { + unsigned i; + if (adev->vce.vcpu_bo == NULL) return 0; @@ -217,8 +219,8 @@ int amdgpu_vce_sw_fini(struct amdgpu_device *adev) amdgpu_bo_unref(&adev->vce.vcpu_bo); - amdgpu_ring_fini(&adev->vce.ring[0]); - amdgpu_ring_fini(&adev->vce.ring[1]); + for (i = 0; i < adev->vce.num_rings; i++) + amdgpu_ring_fini(&adev->vce.ring[i]); release_firmware(adev->vce.fw); mutex_destroy(&adev->vce.idle_mutex); |
