All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: bp@alien8.de, mikhail.v.gavrilov@gmail.com, michel@daenzer.net,
	amd-gfx@lists.freedesktop.org
Subject: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency
Date: Mon, 19 Dec 2022 11:47:18 +0100	[thread overview]
Message-ID: <20221219104718.21677-1-christian.koenig@amd.com> (raw)

That function consumes the reference.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: aab9cf7b6954 ("drm/amdgpu: use scheduler dependencies for VM updates")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index 59cf64216fbb..535cd6569bcc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -238,8 +238,10 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p,
 	/* Wait for PD/PT moves to be completed */
 	dma_resv_iter_begin(&cursor, bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL);
 	dma_resv_for_each_fence_unlocked(&cursor, fence) {
+		dma_fence_get(fence);
 		r = drm_sched_job_add_dependency(&p->job->base, fence);
 		if (r) {
+			dma_fence_put(fence);
 			dma_resv_iter_end(&cursor);
 			return r;
 		}
-- 
2.34.1


             reply	other threads:[~2022-12-19 10:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 10:47 Christian König [this message]
2022-12-19 14:00 ` [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency Borislav Petkov
2022-12-21 21:10   ` Alex Deucher
2023-01-03  8:34     ` Christian König
2023-01-03 14:26       ` Alex Deucher
2023-01-03 14:28         ` Michel Dänzer
2023-01-05  1:44         ` Mikhail Gavrilov
2023-01-05 10:03           ` Christian König
2023-01-06 12:59             ` Mikhail Gavrilov
2023-01-06 14:24               ` Alex Deucher
2023-01-06 15:27                 ` Christian König
2023-01-09 13:13                   ` Mikhail Gavrilov
2023-01-09 13:40                     ` Christian König
2023-01-10 18:21                       ` Mikhail Gavrilov
2023-01-12 12:05                         ` Christian König
2022-12-19 15:08 ` Luben Tuikov
2022-12-23 10:00 ` Michal Kubecek
2022-12-23 22:55 ` Mikhail Gavrilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221219104718.21677-1-christian.koenig@amd.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bp@alien8.de \
    --cc=michel@daenzer.net \
    --cc=mikhail.v.gavrilov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.