All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	"Pekka Paalanen" <ppaalanen@gmail.com>,
	"Christian König" <christian.koenig@amd.com>
Cc: Rob Clark <robdclark@chromium.org>,
	Matthew Brost <matthew.brost@intel.com>,
	Jack Zhang <Jack.Zhang1@amd.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"moderated list:DMA BUFFER SHARING FRAMEWORK" 
	<linaro-mm-sig@lists.linaro.org>,
	Luben Tuikov <luben.tuikov@amd.com>, Roy Sun <Roy.Sun@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Tian Tao <tiantao6@hisilicon.com>,
	Lee Jones <lee.jones@linaro.org>,
	"open list:DMA BUFFER SHARING FRAMEWORK" 
	<linux-media@vger.kernel.org>
Subject: Re: [RFC 0/4] dma-fence: Deadline awareness
Date: Thu, 29 Jul 2021 12:28:36 +0200	[thread overview]
Message-ID: <4def9567-f88d-3b7c-5ed2-d1686a25fbb3@daenzer.net> (raw)
In-Reply-To: <15cf73a8-eda4-3559-561a-a05a14f445d0@gmail.com>

On 2021-07-29 12:14 p.m., Christian König wrote:
> Am 29.07.21 um 11:15 schrieb Pekka Paalanen:
>> [SNIP]
>>> But how does it then help to wait on the CPU instead?
>> A compositor does not "wait" literally. It would only check which state
>> set is ready to be used, and uses the most recent set that is ready. Any
>> state sets that are not ready are ignored and reconsidered the next
>> time the compositor updates the screen.
> 
> Mhm, then I'm not understanding what Michel's changes are actually doing.

In a nutshell, my mutter MR holds back all Wayland state changes which were committed together with a new buffer (and dependent later ones) until the dma-buf file descriptors for that buffer have become readable. This is achieved by adding the fds to the main event loop (if they aren't readable already when the buffer is committed), and when they become readable, all corresponding state changes are propagated such that they will be taken into account for drawing the next frame.


>> Depending on which state sets are selected for a screen update, the
>> global window manager state may be updated accordingly, before the
>> drawing commands for the composition can be created.
>>
>>> See what I'm proposing is to either render the next state of the window
>>> or compose from the old state (including all atomic properties).
>> Yes, that's exactly how it would work. It's just that state for a
>> window is not an independent thing, it can affect how unrelated windows
>> are managed.
>>
>> A simplified example would be two windows side by side where the
>> resizing of one causes the other to move. You can't resize the window
>> or move the other until the buffer with the new size is ready. Until
>> then the compositor uses the old state.
>>
>>> E.g. what do you do if you timeout and can't have the new window content
>>> on time? What's the fallback here?
>> As there is no wait, there is no timeout either.
>>
>> If the app happens to be frozen (e.g. some weird bug in fence handling
>> to make it never ready, or maybe it's just bugged itself and never
>> drawing again), then the app is frozen, and all the rest of the desktop
>> continues running normally without a glitch.
> 
> But that is in contradict to what you told me before.
> 
> See when the window should move but fails to draw it's new content what happens?
> 
> Are the other windows which would be affected by the move not drawn as well?

Basically, the compositor draws its output as if the new buffer and all connected Wayland state changes had not been committed yet.


-- 
Earthling Michel Dänzer               |               https://redhat.com
Libre software enthusiast             |             Mesa and X developer

  reply	other threads:[~2021-07-29 10:29 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 23:38 [RFC 0/4] dma-fence: Deadline awareness Rob Clark
2021-07-26 23:38 ` Rob Clark
2021-07-26 23:38 ` [RFC 1/4] dma-fence: Add deadline awareness Rob Clark
2021-07-26 23:38   ` Rob Clark
2021-07-27  7:11   ` Christian König
2021-07-27  7:11     ` Christian König
2021-07-27 14:25     ` Rob Clark
2021-07-27 14:25       ` Rob Clark
2021-07-28  7:03       ` Christian König
2021-07-28  7:03         ` Christian König
2021-07-28 11:37         ` Christian König
2021-07-28 11:37           ` Christian König
2021-07-28 15:15           ` Rob Clark
2021-07-28 15:15             ` Rob Clark
2021-07-28 17:23             ` Christian König
2021-07-28 17:23               ` Christian König
2021-07-28 17:58               ` Rob Clark
2021-07-28 17:58                 ` Rob Clark
2021-07-29  7:03                 ` Daniel Vetter
2021-07-29  7:03                   ` Daniel Vetter
2021-07-29 15:23                   ` Rob Clark
2021-07-29 15:23                     ` Rob Clark
2021-07-29 16:18                     ` Daniel Vetter
2021-07-29 16:18                       ` Daniel Vetter
2021-07-29 17:32                       ` Rob Clark
2021-07-29 17:32                         ` Rob Clark
2021-07-26 23:38 ` [RFC 2/4] drm/vblank: Add helper to get next vblank time Rob Clark
2021-07-26 23:38   ` Rob Clark
2021-07-26 23:38 ` [RFC 3/4] drm/atomic-helper: Set fence deadline for vblank Rob Clark
2021-07-26 23:38   ` Rob Clark
2021-07-27 10:44   ` Michel Dänzer
2021-07-27 10:44     ` Michel Dänzer
2021-07-27 14:33     ` Rob Clark
2021-07-27 14:33       ` Rob Clark
2021-07-26 23:38 ` [RFC 4/4] drm/scheduler: Add fence deadline support Rob Clark
2021-07-26 23:38   ` Rob Clark
2021-07-26 23:51 ` [RFC 0/4] dma-fence: Deadline awareness Rob Clark
2021-07-26 23:51   ` Rob Clark
2021-07-27 14:41 ` Michel Dänzer
2021-07-27 14:41   ` Michel Dänzer
2021-07-27 15:12   ` Rob Clark
2021-07-27 15:12     ` Rob Clark
2021-07-27 15:19     ` Michel Dänzer
2021-07-27 15:37       ` Rob Clark
2021-07-27 15:37         ` Rob Clark
2021-07-28 11:36         ` Christian König
2021-07-28 11:36           ` Christian König
2021-07-28 13:08           ` Michel Dänzer
2021-07-28 13:13             ` Christian König
2021-07-28 13:13               ` Christian König
2021-07-28 13:24               ` Michel Dänzer
2021-07-28 13:24                 ` Michel Dänzer
2021-07-28 13:31                 ` Christian König
2021-07-28 13:31                   ` Christian König
2021-07-28 13:57                   ` Pekka Paalanen
2021-07-28 13:57                     ` Pekka Paalanen
2021-07-28 14:30                     ` Christian König
2021-07-28 14:30                       ` Christian König
2021-07-29  8:08                       ` Michel Dänzer
2021-07-29  8:23                       ` Pekka Paalanen
2021-07-29  8:23                         ` Pekka Paalanen
2021-07-29  8:43                         ` Christian König
2021-07-29  8:43                           ` Christian König
2021-07-29  9:15                           ` Pekka Paalanen
2021-07-29  9:15                             ` Pekka Paalanen
2021-07-29 10:14                             ` Christian König
2021-07-29 10:14                               ` Christian König
2021-07-29 10:28                               ` Michel Dänzer [this message]
2021-07-29 10:28                                 ` Michel Dänzer
2021-07-29 11:00                               ` Pekka Paalanen
2021-07-29 11:00                                 ` Pekka Paalanen
2021-07-29 11:43                                 ` Christian König
2021-07-29 11:43                                   ` Christian König
2021-07-29 12:49                                   ` Pekka Paalanen
2021-07-29 12:49                                     ` Pekka Paalanen
2021-07-29 13:41                                     ` Christian König
2021-07-29 13:41                                       ` Christian König
2021-07-29 14:10                                       ` Pekka Paalanen
2021-07-29 14:10                                         ` Pekka Paalanen
2021-07-28 15:27                     ` Rob Clark
2021-07-28 15:27                       ` Rob Clark
2021-07-28 17:20                       ` Christian König
2021-07-28 15:34                 ` Rob Clark
2021-07-28 15:34                   ` Rob Clark
2021-07-29  7:09                   ` Daniel Vetter
2021-07-29  7:09                     ` Daniel Vetter
2021-07-29  8:17                     ` Michel Dänzer
2021-07-29  8:17                       ` Michel Dänzer
2021-07-29  9:03                       ` Daniel Vetter
2021-07-29  9:03                         ` Daniel Vetter
2021-07-29  9:37                         ` Pekka Paalanen
2021-07-29  9:37                           ` Pekka Paalanen
2021-07-29 12:18                           ` Daniel Vetter
2021-07-29 12:18                             ` Daniel Vetter
2021-07-29 12:59                             ` Pekka Paalanen
2021-07-29 12:59                               ` Pekka Paalanen
2021-07-29 14:05                               ` Daniel Vetter
2021-07-29 14:05                                 ` Daniel Vetter
2021-07-27 21:17 ` [RFC 5/4] drm/msm: Add deadline based boost support Rob Clark
2021-07-27 21:17   ` Rob Clark

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=4def9567-f88d-3b7c-5ed2-d1686a25fbb3@daenzer.net \
    --to=michel@daenzer.net \
    --cc=Jack.Zhang1@amd.com \
    --cc=Roy.Sun@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=lee.jones@linaro.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luben.tuikov@amd.com \
    --cc=matthew.brost@intel.com \
    --cc=ppaalanen@gmail.com \
    --cc=robdclark@chromium.org \
    --cc=tiantao6@hisilicon.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.