From: "Christian König" <christian.koenig@amd.com>
To: phasta@kernel.org, Danilo Krummrich <dakr@kernel.org>
Cc: Lyude Paul <lyude@redhat.com>, David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Sumit Semwal <sumit.semwal@linaro.org>,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/nouveau: Don't signal when killing the fence context
Date: Thu, 22 May 2025 16:35:42 +0200 [thread overview]
Message-ID: <f912b8c4-c37b-4c7c-ab9f-e1b44f6fcc13@amd.com> (raw)
In-Reply-To: <3dda25c3108747bf1c7ab2974b2429a26f0762d0.camel@mailbox.org>
On 5/22/25 15:43, Philipp Stanner wrote:
>>
>> Well there is no need to implement it, but when it is implemented the
>> caller *must* call it when polling.
>
> I don't understand. Please elaborate on that a bit more. If there's no
> need to implement it, then why can't one have a
> __dma_fence_is_signaled(), which is then identical?
Because the caller then doesn't call it when it is implemented.
E.g. you give people a function which ignores the callback.
>>
>> IIRC the background that we didn't allowed this was that we already
>> had the case that users only looked at the signaling bit and then
>> where surprised that it never changed.
>
> Why would anyone expect that a fence gets signaled by calling a
> function with the name "dma_fence_is_signaled()"? :-)
Because when that function returns true the fence is considered signaled.
> That was my original point, the name is not intuitive at all.
>
> For example, if a driver doesn't implement that callback but signals
> fences in interrupt handlers, and then forgets to (re-)activate the
> interrupt, fences will never get signaled and callers to
> dma_fence_is_signaled() will never read 'true', which isn't surprising.
>
> Again, the point remains the same: the driver must guarantee that
> fences will get signaled. Independently from how consumers of the fence
> check it. Consumers could just stop calling dma_fence_is_signaled()
> after the point in time T alltogether and then the driver would still
> have to signal everything.
No it doesn't. You need to call dma_fence_enable_signaling for that.
Regards,
Christian.
>
>
> P.
>
>
>
>>
>> Regards,
>> Christian.
>>
>>>
>>>
>>> P.
>>>
>>>>
>>>> Regards,
>>>> Christian.
>>>
>>
>
next prev parent reply other threads:[~2025-05-22 14:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 11:25 [PATCH 1/2] dma-buf: Add __dma_fence_is_signaled() Philipp Stanner
2025-05-22 11:25 ` [PATCH 2/2] drm/nouveau: Don't signal when killing the fence context Philipp Stanner
2025-05-22 12:06 ` Christian König
2025-05-22 12:20 ` Philipp Stanner
2025-05-22 12:34 ` Christian König
2025-05-22 12:42 ` Philipp Stanner
2025-05-22 13:05 ` Christian König
2025-05-22 13:50 ` Danilo Krummrich
2025-05-22 15:01 ` Christian König
2025-05-22 12:57 ` Tvrtko Ursulin
2025-05-22 13:15 ` Christian König
2025-05-22 12:59 ` Danilo Krummrich
2025-05-22 13:09 ` Christian König
2025-05-22 13:16 ` Philipp Stanner
2025-05-22 13:24 ` Christian König
2025-05-22 13:43 ` Philipp Stanner
2025-05-22 14:35 ` Christian König [this message]
2025-05-22 13:41 ` Danilo Krummrich
2025-05-23 14:47 ` [PATCH 1/2] dma-buf: Add __dma_fence_is_signaled() Tvrtko Ursulin
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=f912b8c4-c37b-4c7c-ab9f-e1b44f6fcc13@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=phasta@kernel.org \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
/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
all inboxes | Powered by JetHome®