drm/amdgpu: Not to finish an uninitialized ring
Subsystems (2)
PATCH 1/1 drm/amdgpu: Not to finish an uninitialized ring
If a ring is not initialized, it also should not be finished. For example, in Vega10's SR-IOV environment, UVD's decode ring is not initialized, but will be finnished in amdgpu_uvd_sw_fini, because UVD driver put all the uvd decode ring's finish operation into amdgpu_uvd_sw_fini function, while not uvd_vXXX_0_sw_fini. This will lead to amdgpu module unloading failure.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +4 -0
@@ -261,6 +261,10 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring) { ring->ready = false; +/* Not to finish a ring which is not initialized */ +if (!(ring->adev) || !(ring->adev->rings[ring->idx])) +return ; +amdgpu_wb_free (ring->adev, ring->rptr_offs);amdgpu_wb_free (ring->adev, ring->wptr_offs);
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): 1502189764-11227-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org
Liu, Monk
Reviewed-by Monk LiuReview
Quoted 1 line
(quoted diff) +1
-0+ /* Not to finish a ring which is not initialized */
Just write "don't finish the ring if not initialized"
With that comment addressed,
-----Original Message-----
From: Trigger Huang [mailto:[email protected]]
Sent: Tuesday, August 8, 2017 6:56 PM
To: [email protected]
Cc: Liu, Monk <[email protected]>; Yu, Xiangliang <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: Not to finish an uninitialized ring
If a ring is not initialized, it also should not be finished.
For example, in Vega10's SR-IOV environment, UVD's decode ring is not initialized, but will be finnished in amdgpu_uvd_sw_fini, because UVD driver put all the uvd decode ring's finish operation into amdgpu_uvd_sw_fini function, while not uvd_vXXX_0_sw_fini. This will lead to amdgpu module unloading failure.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +4 -1
@@ -261,6 +261,10 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring) { ring->ready = false; +/* Not to finish a ring which is not initialized */ +if (!(ring->adev) || !(ring->adev->rings[ring->idx])) +return ; +amdgpu_wb_free (ring->adev, ring->rptr_offs);amdgpu_wb_free (ring->adev, ring->wptr_offs); --
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): BLUPR12MB044960035E0F22C79ABC112D848A0-7LeqcoF/[email protected]
Am 08.08.2017 um 13:13 schrieb Liu, Monk:
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c void amdgpu_ring_fini(struct amdgpu_ring *ring) { · line 263
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1
-0+/* Not to finish a ring which is not initialized */ Just write "don't finish the ring if not initialized"
With that comment addressed,
Reviewed-by Monk Liu <[email protected]>
Additional to that the commit message is to long. Please break it after 80 chars.
With that fixed the patch is Reviewed-by: Christian König <[email protected]>
Quoted 33 lines
-----Original Message-----
From: Trigger Huang [mailto:[email protected]]
Sent: Tuesday, August 8, 2017 6:56 PM
To: [email protected]
Cc: Liu, Monk <[email protected]>; Yu, Xiangliang <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: Not to finish an uninitialized ringIf a ring is not initialized, it also should not be finished.
For example, in Vega10's SR-IOV environment, UVD's decode ring is not initialized, but will be finnished inamdgpu_uvd_sw_fini, because UVD driver put all the uvd decode ring's finish operation intoamdgpu_uvd_sw_finifunction, while notuvd_vXXX_0_sw_fini. This will lead to amdgpu module unloading failure.Signed-off-by Trigger Huang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +4
-1@@ -261,6 +261,10 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring) { ring->ready = false; +/* Not to finish a ring which is not initialized */ +if (!(ring->adev) || !(ring->adev->rings[ring->idx])) +return ; +amdgpu_wb_free (ring->adev, ring->rptr_offs);amdgpu_wb_free (ring->adev, ring->wptr_offs); --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx