mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/imagination: only init job done fences once
@ 2025-02-03 15:31 Brendan King via B4 Relay
  2025-02-19 12:47 ` Matt Coster
  0 siblings, 1 reply; 2+ messages in thread
From: Brendan King via B4 Relay @ 2025-02-03 15:31 UTC (permalink / raw)
  To: Frank Binns, Matt Coster, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel, Brendan King

From: Brendan King <Brendan.King@imgtec.com>

Ensure job done fences are only initialised once.

This fixes a memory manager not clean warning from drm_mm_takedown
on module unload.

Signed-off-by: Brendan King <brendan.king@imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_queue.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imagination/pvr_queue.c
index c4f08432882b12f5cdfeb7fc991fd941f0946676..9a67e646f1eae709859f664c796e1940f0b45300 100644
--- a/drivers/gpu/drm/imagination/pvr_queue.c
+++ b/drivers/gpu/drm/imagination/pvr_queue.c
@@ -304,8 +304,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);
 }
 
 /**

---
base-commit: 3ab334814dc7dff39075e055e12847d51878916e
change-id: 20250131-init-done-fences-once-c55c5d0f4d8c

Best regards,
-- 
Brendan King <Brendan.King@imgtec.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/imagination: only init job done fences once
  2025-02-03 15:31 [PATCH] drm/imagination: only init job done fences once Brendan King via B4 Relay
@ 2025-02-19 12:47 ` Matt Coster
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Coster @ 2025-02-19 12:47 UTC (permalink / raw)
  To: Brendan King
  Cc: Frank Binns, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, dri-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1577 bytes --]

On 03/02/2025 15:31, Brendan King via B4 Relay wrote:
> From: Brendan King <Brendan.King@imgtec.com>
> 
> Ensure job done fences are only initialised once.
> 
> This fixes a memory manager not clean warning from drm_mm_takedown
> on module unload.
> 
> Signed-off-by: Brendan King <brendan.king@imgtec.com>

Hi Brendan,

Reviewed-by: Matt Coster <matt.coster@imgtec.com>

Would you mind sending a V2 with "Cc: stable@vger.kernel.org" so this
fix will get picked up for stable backporting?

Cheers,
Matt

> ---
>  drivers/gpu/drm/imagination/pvr_queue.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imagination/pvr_queue.c
> index c4f08432882b12f5cdfeb7fc991fd941f0946676..9a67e646f1eae709859f664c796e1940f0b45300 100644
> --- a/drivers/gpu/drm/imagination/pvr_queue.c
> +++ b/drivers/gpu/drm/imagination/pvr_queue.c
> @@ -304,8 +304,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);
>  }
>  
>  /**
> 
> ---
> base-commit: 3ab334814dc7dff39075e055e12847d51878916e
> change-id: 20250131-init-done-fences-once-c55c5d0f4d8c
> 
> Best regards,

-- 
Matt Coster
E: matt.coster@imgtec.com

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-19 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-03 15:31 [PATCH] drm/imagination: only init job done fences once Brendan King via B4 Relay
2025-02-19 12:47 ` Matt Coster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®