From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Andrey Grodzovsky <andrey.grodzovsky@amd.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: jingwen.chen2@amd.com, Christian.Koenig@amd.com,
monk.liu@amd.com, yiqing.yao@amd.com
Subject: Re: [PATCH 2/5] drm/amdgpu: Add put fence in amdgpu_fence_driver_clear_job_fences
Date: Tue, 21 Jun 2022 09:21:21 +0200 [thread overview]
Message-ID: <f4058d23-6290-a6df-0288-40fe6a86076e@gmail.com> (raw)
In-Reply-To: <20220620220302.86389-3-andrey.grodzovsky@amd.com>
Am 21.06.22 um 00:02 schrieb Andrey Grodzovsky:
> This function should drop the fence refcount when it extracts the
> fence from the fence array, just as it's done in amdgpu_fence_process.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index 957437a5558c..a9ae3beaa1d3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -595,8 +595,10 @@ void amdgpu_fence_driver_clear_job_fences(struct amdgpu_ring *ring)
> for (i = 0; i <= ring->fence_drv.num_fences_mask; i++) {
> ptr = &ring->fence_drv.fences[i];
> old = rcu_dereference_protected(*ptr, 1);
> - if (old && old->ops == &amdgpu_job_fence_ops)
> + if (old && old->ops == &amdgpu_job_fence_ops) {
> RCU_INIT_POINTER(*ptr, NULL);
> + dma_fence_put(old);
> + }
> }
> }
>
next prev parent reply other threads:[~2022-06-21 7:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 22:02 [PATCH 0/5] Rework amdgpu HW fence refocunt and update scheduler parent fence refcount Andrey Grodzovsky
2022-06-20 22:02 ` [PATCH 1/5] drm/amdgpu: Fix possible refcount leak for release of external_hw_fence Andrey Grodzovsky
2022-06-21 7:19 ` Christian König
2022-06-21 19:34 ` Andrey Grodzovsky
2022-06-22 9:00 ` Christian König
2022-06-22 15:01 ` Andrey Grodzovsky
2022-06-22 15:04 ` Christian König
2022-06-23 21:18 ` Andrey Grodzovsky
2022-06-24 6:00 ` Christian König
2022-06-20 22:02 ` [PATCH 2/5] drm/amdgpu: Add put fence in amdgpu_fence_driver_clear_job_fences Andrey Grodzovsky
2022-06-21 7:21 ` Christian König [this message]
2022-06-20 22:03 ` [PATCH 3/5] drm/amdgpu: Prevent race between late signaled fences and GPU reset Andrey Grodzovsky
2022-06-21 7:25 ` Christian König
2022-06-21 19:45 ` Andrey Grodzovsky
2022-06-22 1:47 ` VURDIGERENATARAJ, CHANDAN
2022-06-22 2:41 ` Andrey Grodzovsky
2022-06-22 17:31 ` Andrey Grodzovsky
2022-06-23 5:57 ` Christian König
2022-06-20 22:03 ` [PATCH 4/5] drm/sched: Partial revert of 'drm/sched: Keep s_fence->parent pointer' Andrey Grodzovsky
2022-06-21 7:26 ` Christian König
2022-06-20 22:03 ` [PATCH 5/5] drm/amdgpu: Follow up change to previous drm scheduler change Andrey Grodzovsky
2022-06-21 7:28 ` Christian König
2022-06-21 20:00 ` Andrey Grodzovsky
2022-06-22 7:17 ` Christian König
2022-06-22 17:19 ` Andrey Grodzovsky
2022-06-23 5:52 ` Christian König
2022-06-23 14:51 ` Andrey Grodzovsky
2022-06-23 14:54 ` Christian König
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=f4058d23-6290-a6df-0288-40fe6a86076e@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Christian.Koenig@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrey.grodzovsky@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingwen.chen2@amd.com \
--cc=monk.liu@amd.com \
--cc=yiqing.yao@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox