RE: [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings
"Min, Frank" <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <CY8PR12MB9035366BB0F12BFAC611A42AE9A42@CY8PR12MB9035.namprd12.prod.outlook.com> |
AMD General Acked-By: Frank Min<[email protected]> -----Original Message----- From: Bob Zhou <[email protected]> Sent: Wednesday, August 19, 2026 2:43 PM To: [email protected]; Koenig, Christian <[email protected]>; Deucher, Alexander <[email protected]>; Min, Frank <[email protected]> Cc: Zhou, Bob <[email protected]> Subject: [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings uvd_v7_0_sw_init() does not initialize the UVD decode ring for an SR-IOV VF. However, amdgpu_uvd_resume() unconditionally force-completes the decode ring when restoring its fence sequence. Skip fence completion when the fence driver is not initialized. Fixes: 043f2271e2d0 ("drm/amdgpu: mark force completed fences with -ECANCELED") Signed-off-by: Bob Zhou <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 228a405a94c4f..ecd7caa95d4b2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -517,7 +517,8 @@ int amdgpu_uvd_resume(struct amdgpu_device *adev) } memset_io(ptr, 0, size); /* to restore uvd fence seq */ - amdgpu_fence_driver_force_completion(&adev->uvd.inst[i].ring, NULL); + if (adev->uvd.inst[i].ring.fence_drv.initialized) + amdgpu_fence_driver_force_completion(&adev->uvd.inst[i].ring, +NULL); } } return 0; -- 2.34.1