From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>,
David M Nieto <david.nieto@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/amdgpu: free resources on fence usage query
Date: Fri, 14 May 2021 09:26:18 +0200 [thread overview]
Message-ID: <942da2f6-1aa2-3ec8-19fb-68be0da5f03d@gmail.com> (raw)
In-Reply-To: <CADnq5_NtPNk_6uhgPu8dSE-RPgRwMXYBHFvQ50WzEj_3N2bbHA@mail.gmail.com>
Am 13.05.21 um 20:00 schrieb Alex Deucher:
> On Thu, May 13, 2021 at 1:45 PM David M Nieto <david.nieto@amd.com> wrote:
>> Free the resources if the fence needs to be ignored
>> during the ratio calculation
>>
>> Signed-off-by: David M Nieto <david.nieto@amd.com>
> Series is:
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> Will push it momentarily.
To drm-misc-next or amd-staging-drm-next? You need to rebase on upstream
for the later.
Christian.
>
> Alex
>
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> index 01fe60fedcbe..9036c93b4a0c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
>> @@ -669,11 +669,15 @@ void amdgpu_ctx_fence_time(struct amdgpu_ctx *ctx, struct amdgpu_ctx_entity *cen
>> if (!fence)
>> continue;
>> s_fence = to_drm_sched_fence(fence);
>> - if (!dma_fence_is_signaled(&s_fence->scheduled))
>> + if (!dma_fence_is_signaled(&s_fence->scheduled)) {
>> + dma_fence_put(fence);
>> continue;
>> + }
>> t1 = s_fence->scheduled.timestamp;
>> - if (t1 >= now)
>> + if (!ktime_before(t1, now)) {
>> + dma_fence_put(fence);
>> continue;
>> + }
>> if (dma_fence_is_signaled(&s_fence->finished) &&
>> s_fence->finished.timestamp < now)
>> *total += ktime_sub(s_fence->finished.timestamp, t1);
>> --
>> 2.17.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-05-14 7:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 22:37 David M Nieto
2021-05-06 22:37 ` [PATCH 1/2] drm/amdgpu: free resources on fence usage query David M Nieto
2021-05-06 22:37 ` [PATCH 2/2] drm/amdgpu: fix fence calculation David M Nieto
2021-05-07 7:18 ` Christian König
2021-05-10 20:29 ` [PATCH 1/2] drm/amdgpu: free resources on fence usage query David M Nieto
2021-05-10 20:29 ` [PATCH 2/2] drm/amdgpu: fix fence calculation David M Nieto
2021-05-11 7:53 ` Christian König
2021-05-11 18:14 ` Nieto, David M
2021-05-12 6:55 ` Christian König
2021-05-12 6:56 ` Christian König
2021-05-12 19:40 ` Nieto, David M
2021-05-12 19:45 ` [PATCH 1/2] drm/amdgpu: free resources on fence usage query David M Nieto
2021-05-12 19:45 ` [PATCH 2/2] drm/amdgpu: fix fence calculation David M Nieto
2021-05-13 8:11 ` Christian König
2021-05-13 17:42 ` Nieto, David M
2021-05-13 17:45 ` [PATCH 1/2] drm/amdgpu: free resources on fence usage query David M Nieto
2021-05-13 17:45 ` [PATCH 2/2] drm/amdgpu: fix fence calculation (v2) David M Nieto
2021-05-13 18:00 ` [PATCH 1/2] drm/amdgpu: free resources on fence usage query Alex Deucher
2021-05-14 7:26 ` Christian König [this message]
2021-05-14 14:01 ` Alex Deucher
[not found] <579fa92-ad25-323a-0c41-ac07ac47fa42@gmail.com>
2021-05-11 18:27 ` David M Nieto
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=942da2f6-1aa2-3ec8-19fb-68be0da5f03d@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=david.nieto@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 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.