On 9/28/23 16:51, Christian König wrote: > Am 28.09.23 um 15:37 schrieb Michel Dänzer: >> On 9/28/23 14:59, Ray Strode wrote: >>> On Thu, Sep 28, 2023 at 5:43 AM Michel Dänzer >>> <michel.daenzer@xxxxxxxxxxx> 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. >>> Okay, sure. >>> >>>> Also, at least in this particular case, a single sync file (not dma_fence) for any CRTC might suffice. >>> I don't see how we could rely on that given the provided api and >>> multitude of drivers. It might work and then break randomly. >> If it's supposed to work from the KMS API PoV, any bugs to the contrary should be fixed. >> >> I'm not really seeing the big difference between using a single fence or multiple, anyway. > > The big difference is that a standard modeset can take some time, e.g. setting up power levels, waiting for PLLs to settle, waiting for a vblank etc.. Right (starting a game shouldn't involve such a modeset though in a Wayland session). What I mean is there's no significant difference for user space between using a single out fence or multiple. Just slightly different bookkeeping. > But in the case of turning thing off, what should we wait for? The atomic commit to finish, so it's safe to submit another one without hitting EBUSY. (What we use the completion events for with page flips) -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and Xwayland developer