From: "Michel Dänzer" <michel.daenzer@mailbox.org>
To: "Christian König" <christian.koenig@amd.com>,
"Ray Strode" <halfline@gmail.com>
Cc: alexander.deucher@amd.com, daniel.vetter@ffwll.ch,
Xinhui.Pan@amd.com, dri-devel@lists.freedesktop.org,
airlied@redhat.com
Subject: Re: [PATCH] drm/atomic: Perform blocking commits on workqueue
Date: Thu, 28 Sep 2023 11:43:53 +0200 [thread overview]
Message-ID: <dbed4fe6-e99b-a31e-5715-7bd594fc22fb@mailbox.org> (raw)
In-Reply-To: <a1316597-e91b-32f8-78d3-13977438149b@amd.com>
On 9/28/23 08:56, Christian König wrote:
> Am 27.09.23 um 22:25 schrieb Ray Strode:
>> On Wed, Sep 27, 2023 at 4:05 AM Christian König
>> <christian.koenig@amd.com> wrote:
>
>>> When it's really not desirable to account the CPU overhead to the
>>> process initiating it then you probably rather want to use an non
>>> blocking commit plus a dma_fence to wait for the work to end from userspace.
>> Well, first I don't think that's very convenient. You're talking about
>> a per-plane property, so there would need to be a separate file
>> descriptor allocated for every plane, right? and user-space would have
>> to block on all of them before proceeding?
OUT_FENCE_PTR is a per-CRTC property, not per-plane. Also, at least in this particular case, a single sync file (not dma_fence) for any CRTC might suffice.
>> Also, are you sure that works in all cases? The problematic case we're facing right >> now is when all planes and all crtcs are getting disabled. I'm just skimming
>> over the code here, but I see this:
>>
>> → for_each_new_crtc_in_state(state, crtc, crtc_state, i) {•
>> ...
>> → → if (arg->flags & DRM_MODE_PAGE_FLIP_EVENT || fence_ptr) {•
>> ...
>> → → → e = create_vblank_event(crtc, arg->user_data);•
>> ...
>> → → → crtc_state->event = e;•
>> → → }•
>> ...
>> → → if (fence_ptr) {•
>> ...
>> → → → fence = drm_crtc_create_fence(crtc);•
>> ...
>> → → → ret = setup_out_fence(&f[(*num_fences)++], fence);•
>> ...
>> → → → crtc_state->event->base.fence = fence;•
>> → → }•
>>
>> Is the code really going to allocate a vblank_event when all the
>> crtc's are disabled ? I guess it's possible, but that's
>> counterintuitive to me. I really don't know. You're confident a set of
>> fences will actually work?
>
> No when you disable everything there is of course no fence allocated.
I don't see why not. "new_crtc_in_state" in this code means the atomic commit contains some state for the CRTC (such as setting the OUT_FENCE_PTR property), it could disable or leave it disabled though. I can't see any other code which would prevent this from working with a disabled CRTC, I could be missing something though.
> But then you also should never see anything waiting for to long to actually be able to trigger the RLIMIT_RTTIME.
amdgpu DC exceeds 200ms on some setups, see the linked issue.
>> Regardless, this seems like a roundabout way to address a problem that
>> we could just ... fix.
Handling modesets asynchronously does seem desirable in mutter to me. E.g. it would allow doing modesets in parallel with modesets or other atomic commits on other GPUs.
> From what I know RLIMIT_RTTIME usually works in units of multiple seconds.
RealtimeKit seems to allow 200ms maximum.
--
Earthling Michel Dänzer | https://redhat.com
Libre software enthusiast | Mesa and Xwayland developer
next prev parent reply other threads:[~2023-09-28 9:44 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 17:05 [PATCH] drm/atomic: Perform blocking commits on workqueue Ray Strode
2023-09-27 8:04 ` Christian König
2023-09-27 20:25 ` Ray Strode
2023-09-28 6:56 ` Christian König
2023-09-28 9:43 ` Michel Dänzer [this message]
2023-09-28 12:59 ` Ray Strode
2023-09-28 13:37 ` Michel Dänzer
2023-09-28 14:51 ` Christian König
2023-09-28 15:19 ` Michel Dänzer
2023-09-28 12:46 ` Ray Strode
2023-09-28 13:23 ` Christian König
2023-09-28 13:58 ` Michel Dänzer
2023-09-28 15:02 ` Christian König
2023-09-28 14:20 ` Ray Strode
2023-09-28 15:03 ` Ville Syrjälä
2023-09-28 19:33 ` Ray Strode
2023-10-04 17:27 ` Ville Syrjälä
2023-10-04 19:38 ` Ray Strode
2023-10-05 9:57 ` Daniel Vetter
2023-10-05 10:16 ` Ville Syrjälä
2023-10-10 11:36 ` Daniel Vetter
2023-10-05 11:51 ` Christian König
2023-10-05 21:04 ` Ray Strode
2023-10-06 7:12 ` Christian König
2023-10-06 18:48 ` Ray Strode
2023-10-08 10:37 ` Michel Dänzer
2023-10-09 6:42 ` Christian König
2023-10-09 12:19 ` Ville Syrjälä
2023-10-09 12:36 ` Christian König
2023-10-10 11:41 ` Daniel Vetter
2023-10-12 18:19 ` Ray Strode
2023-10-13 9:41 ` Daniel Vetter
2023-10-13 10:22 ` Michel Dänzer
2023-10-17 7:32 ` Daniel Vetter
2023-10-17 7:55 ` Christian König
2023-10-13 14:04 ` Ray Strode
2023-10-17 7:37 ` Daniel Vetter
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=dbed4fe6-e99b-a31e-5715-7bd594fc22fb@mailbox.org \
--to=michel.daenzer@mailbox.org \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=halfline@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox