mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
drm/amdgpu/vce3: don't forget to tear down some rings
We can use .num_rings for that.
Fixes: 6f0359ff73
("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>
This commit is contained in:
parent
44f9d7b3f1
commit
4cd00d3755
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
int amdgpu_vce_sw_fini(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
if (adev->vce.vcpu_bo == NULL)
|
if (adev->vce.vcpu_bo == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -217,8 +219,8 @@ int amdgpu_vce_sw_fini(struct amdgpu_device *adev)
|
||||||
|
|
||||||
amdgpu_bo_unref(&adev->vce.vcpu_bo);
|
amdgpu_bo_unref(&adev->vce.vcpu_bo);
|
||||||
|
|
||||||
amdgpu_ring_fini(&adev->vce.ring[0]);
|
for (i = 0; i < adev->vce.num_rings; i++)
|
||||||
amdgpu_ring_fini(&adev->vce.ring[1]);
|
amdgpu_ring_fini(&adev->vce.ring[i]);
|
||||||
|
|
||||||
release_firmware(adev->vce.fw);
|
release_firmware(adev->vce.fw);
|
||||||
mutex_destroy(&adev->vce.idle_mutex);
|
mutex_destroy(&adev->vce.idle_mutex);
|
||||||
|
|
Loading…
Reference in a new issue