summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2026-05-12 10:32:29 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-06-17 15:51:33 -0400
commit714d354479b132c411b9f1771c4868616ed0f5c0 (patch)
tree3de7801ade8e5b0afaaf0d423ad138831c50e5eb /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
parent36ed61b1c01a24fd3891d1e01025751d7d0603ac (diff)
downloadlinux-next-714d354479b132c411b9f1771c4868616ed0f5c0.tar.gz
linux-next-714d354479b132c411b9f1771c4868616ed0f5c0.zip
drm/amdgpu: amdgpu_ring_set_fence_errors_and_reemit() handle NULL fence
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 733e9b668ed8..8569c1c637a2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -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)