]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu: amdgpu_ring_set_fence_errors_and_reemit() handle NULL fence
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 12 May 2026 14:32:29 +0000 (10:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 19:51:33 +0000 (15:51 -0400)
All the guilty fence parameter to be NULL.  Will be needed for
future functionality.

Reviewed-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

index 733e9b668ed8fad45131a765e12c3544996d13b6..8569c1c637a2bb01bab01fd33970848910f6f230 100644 (file)
@@ -750,7 +750,8 @@ void amdgpu_ring_set_fence_errors_and_reemit(struct amdgpu_ring *ring,
                if (unprocessed && !dma_fence_is_signaled_locked(unprocessed)) {
                        fence = container_of(unprocessed, struct amdgpu_fence, base);
                        is_guilty_fence = fence == guilty_fence;
-                       is_guilty_context = fence->context == guilty_fence->context;
+                       is_guilty_context = guilty_fence ?
+                               (fence->context == guilty_fence->context) : false;
 
                        /* mark all fences from the guilty context with an error */
                        if (is_guilty_fence)