summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan King <Brendan.King@imgtec.com>2025-02-26 18:43:54 +0300
committerMatt Coster <matt.coster@imgtec.com>2025-03-03 15:10:13 +0300
commit68c3de7f707e8a70e0a6d8087cf0fe4a3d5dbfb0 (patch)
tree4eb0c7143b5a421a37f0818fe6799fc0dca75128
parenta5c4c3ba95a52d66315acdfbaba9bd82ed39c250 (diff)
downloadlinux-68c3de7f707e8a70e0a6d8087cf0fe4a3d5dbfb0.tar.xz
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: eaf01ee5ba28 ("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>
-rw-r--r--drivers/gpu/drm/imagination/pvr_queue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imagination/pvr_queue.c
index f3f1c5212df7..43411be930a2 100644
--- a/drivers/gpu/drm/imagination/pvr_queue.c
+++ b/drivers/gpu/drm/imagination/pvr_queue.c
@@ -313,8 +313,9 @@ pvr_queue_cccb_fence_init(struct dma_fence *fence, struct pvr_queue *queue)
static void
pvr_queue_job_fence_init(struct dma_fence *fence, struct pvr_queue *queue)
{
- pvr_queue_fence_init(fence, queue, &pvr_queue_job_fence_ops,
- &queue->job_fence_ctx);
+ if (!fence->ops)
+ pvr_queue_fence_init(fence, queue, &pvr_queue_job_fence_ops,
+ &queue->job_fence_ctx);
}
/**