Skip to content

Commit

Permalink
drm/v3d: Fix race-condition between DRM scheduler and IRQs
Browse files Browse the repository at this point in the history
Link: #6624
Fixes: e4b5ccd ("drm/v3d: Ensure job pointer is set to NULL after job completion")
Signed-off-by: Maíra Canal <[email protected]>
Co-authored-by: Maíra Canal <[email protected]>
  • Loading branch information
2 people authored and popcornmix committed Jan 24, 2025
1 parent 527ec1f commit 6d16e47
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions drivers/gpu/drm/v3d/v3d_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ v3d_irq(int irq, void *arg)
v3d->gpu_queue_stats[V3D_BIN].last_exec_end = local_clock();

trace_v3d_bcl_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base);

v3d->bin_job = NULL;
dma_fence_signal(&fence->base);

status = IRQ_HANDLED;
}

Expand All @@ -116,8 +118,10 @@ v3d_irq(int irq, void *arg)
v3d->gpu_queue_stats[V3D_RENDER].last_exec_end = local_clock();

trace_v3d_rcl_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base);

v3d->render_job = NULL;
dma_fence_signal(&fence->base);

status = IRQ_HANDLED;
}

Expand All @@ -128,8 +132,10 @@ v3d_irq(int irq, void *arg)
v3d->gpu_queue_stats[V3D_CSD].last_exec_end = local_clock();

trace_v3d_csd_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base);

v3d->csd_job = NULL;
dma_fence_signal(&fence->base);

status = IRQ_HANDLED;
}

Expand Down Expand Up @@ -166,8 +172,10 @@ v3d_hub_irq(int irq, void *arg)
v3d->gpu_queue_stats[V3D_TFU].last_exec_end = local_clock();

trace_v3d_tfu_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base);

v3d->tfu_job = NULL;
dma_fence_signal(&fence->base);

status = IRQ_HANDLED;
}

Expand Down

0 comments on commit 6d16e47

Please sign in to comment.