* [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings
@ 2026-08-19 6:43 Bob Zhou
2026-08-19 12:44 ` Liu, Leo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bob Zhou @ 2026-08-19 6:43 UTC (permalink / raw)
To: amd-gfx, christian.koenig, Alexander.Deucher, frank.min; +Cc: Bob Zhou
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 <bobzhou2@amd.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings
2026-08-19 6:43 [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings Bob Zhou
@ 2026-08-19 12:44 ` Liu, Leo
2026-08-20 9:26 ` Min, Frank
2026-08-24 18:22 ` Christian König
2 siblings, 0 replies; 4+ messages in thread
From: Liu, Leo @ 2026-08-19 12:44 UTC (permalink / raw)
To: Zhou, Bob, amd-gfx@lists.freedesktop.org, Koenig, Christian,
Deucher, Alexander, Min, Frank
Cc: Zhou, Bob
AMD General
Acked-by: Leo Liu <leo.liu@amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Bob Zhou
> Sent: Wednesday, August 19, 2026 2:43 AM
> To: amd-gfx@lists.freedesktop.org; Koenig, Christian
> <Christian.Koenig@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Min, Frank <Frank.Min@amd.com>
> Cc: Zhou, Bob <Bob.Zhou@amd.com>
> 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 <bobzhou2@amd.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings
2026-08-19 6:43 [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings Bob Zhou
2026-08-19 12:44 ` Liu, Leo
@ 2026-08-20 9:26 ` Min, Frank
2026-08-24 18:22 ` Christian König
2 siblings, 0 replies; 4+ messages in thread
From: Min, Frank @ 2026-08-20 9:26 UTC (permalink / raw)
To: Zhou, Bob, amd-gfx@lists.freedesktop.org, Koenig, Christian,
Deucher, Alexander
Cc: Zhou, Bob
AMD General
Acked-By: Frank Min<Frank.Min@amd.com>
-----Original Message-----
From: Bob Zhou <bobzhou2@amd.com>
Sent: Wednesday, August 19, 2026 2:43 PM
To: amd-gfx@lists.freedesktop.org; Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Min, Frank <Frank.Min@amd.com>
Cc: Zhou, Bob <Bob.Zhou@amd.com>
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 <bobzhou2@amd.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings
2026-08-19 6:43 [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings Bob Zhou
2026-08-19 12:44 ` Liu, Leo
2026-08-20 9:26 ` Min, Frank
@ 2026-08-24 18:22 ` Christian König
2 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2026-08-24 18:22 UTC (permalink / raw)
To: Bob Zhou, amd-gfx, Alexander.Deucher, frank.min
On 8/19/26 08:43, Bob Zhou wrote:
> 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 <bobzhou2@amd.com>
> ---
> 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);
That check should potentially be inside amdgpu_fence_driver_force_completion(), apart from that it looks good to me.
Regards,
Christian.
> }
> }
> return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-24 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 6:43 [PATCH v3] drm/amdgpu: avoid force-completing uninitialized UVD rings Bob Zhou
2026-08-19 12:44 ` Liu, Leo
2026-08-20 9:26 ` Min, Frank
2026-08-24 18:22 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.