Skip to contentSkip to conversation

drm/amdgpu:fix uvd ring fini routine(v2)

PATCH In review Monk Liu 2 participants 2 messages Sep 20, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu:fix uvd ring fini routine(v2)

fix missing finish uvd enc_ring.
v2:
since the adev pointer check in already in ring_fini so drop the check outsider

Change-Id Ib74237ca5adcb3b128c9b751fced0b7db7b09e86
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +4 -0
index 331e34a..e8bd50c 100644
@@ -269,6 +269,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 
 int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
 {
+	int i;
 	kfree(adev->uvd.saved_bo);
 
 	amd_sched_entity_fini(&adev->uvd.ring.sched, &adev->uvd.entity);
@@ -279,6 +280,9 @@ int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
 
 	amdgpu_ring_fini(&adev->uvd.ring);
 
+	for (i = 0; i < AMDGPU_MAX_UVD_ENC_RINGS; ++i)
+		amdgpu_ring_fini(&adev->uvd.ring_enc[i]);
+
 	release_firmware(adev->uvd.fw);
 
 	return 0;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1505899877-18542-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 20.09.2017 um 11:31 schrieb Monk Liu:

Quoted 7 lines

fix missing finish uvd enc_ring.
v2:
since the adev pointer check in already in ring_fini so drop the check outsider

Change-Id Ib74237ca5adcb3b128c9b751fced0b7db7b09e86
Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +1 -0
index 331e34a..e8bd50c 100644
@@ -269,6 +269,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
 
  int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
  {
+	int i;
  	kfree(adev->uvd.saved_bo);
 
  	amd_sched_entity_fini(&adev->uvd.ring.sched, &adev->uvd.entity);

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c int amdgpu_uvd_sw_fini(struct amdgpu_device *adev) · line 288

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +3 -0
@@ -279,6 +280,9 @@ int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
 
  	amdgpu_ring_fini(&adev->uvd.ring);
 
+	for (i = 0; i < AMDGPU_MAX_UVD_ENC_RINGS; ++i)
+		amdgpu_ring_fini(&adev->uvd.ring_enc[i]);
+
  	release_firmware(adev->uvd.fw);
 
  	return 0;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx