Skip to content

Commit 68c3de7

Browse files
brendan-kingMTCoster
authored andcommitted
drm/imagination: only init job done fences once
Ensure job done fences are only initialised once. This fixes a memory manager not clean warning from drm_mm_takedown on module unload. Cc: stable@vger.kernel.org Fixes: eaf01ee ("drm/imagination: Implement job submission and scheduling") Signed-off-by: Brendan King <brendan.king@imgtec.com> Reviewed-by: Matt Coster <matt.coster@imgtec.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250226-init-done-fences-once-v2-1-c1b2f556b329@imgtec.com Signed-off-by: Matt Coster <matt.coster@imgtec.com>
1 parent a5c4c3b commit 68c3de7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/imagination/pvr_queue.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,9 @@ pvr_queue_cccb_fence_init(struct dma_fence *fence, struct pvr_queue *queue)
313313
static void
314314
pvr_queue_job_fence_init(struct dma_fence *fence, struct pvr_queue *queue)
315315
{
316-
pvr_queue_fence_init(fence, queue, &pvr_queue_job_fence_ops,
317-
&queue->job_fence_ctx);
316+
if (!fence->ops)
317+
pvr_queue_fence_init(fence, queue, &pvr_queue_job_fence_ops,
318+
&queue->job_fence_ctx);
318319
}
319320

320321
/**

0 commit comments

Comments
 (0)