AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: daniel.stone@collabora.com,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	"wayland-devel@lists.freedesktop.org"
	<wayland-devel@lists.freedesktop.org>,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2
Date: Thu, 8 Sep 2016 12:36:31 +0300	[thread overview]
Message-ID: <20160908123631.721dcab0@eldfell> (raw)
In-Reply-To: <8e3f5a2b-0de8-7b0a-b64b-ec298955fe75@daenzer.net>


[-- Attachment #1.1: Type: text/plain, Size: 4284 bytes --]

On Tue, 16 Aug 2016 10:46:13 +0900
Michel Dänzer <michel@daenzer.net> wrote:

> On 16/08/16 10:32 AM, Mario Kleiner wrote:
> > Cc'ing Daniel Stone and Pekka Paalanen, because this relates to wayland.
> > 
> > Wrt. having a new pageflip parameter struct, i wonder if it wouldn't
> > make sense to then already prepare some space in it for specifying an
> > absolute target time, e.g., in u64 microseconds? Or make this part of
> > the atomic pageflip framework?  
> 
> I feel like this is too much hassle for the DRM_IOCTL_MODE_PAGE_FLIP
> ioctl, probably makes sense to only deal with this in the atomic API.
> 
> 
> > In Wayland we now have the presentation_feedback extension (maybe it got
> > a new name?), which is great to get feedback when and how presentation
> > was completed, essentially the equivalent of X11's GLX_INTEL_swap_events
> > + some useful extra info / the feedback half of OML_sync_control.
> > 
> > That was supposed to be complemented by a presentation_queue extension
> > which would provide the other half of OML_sync_control, the part where
> > an app can tell the compositor when and how to present surface updates.
> > I remember that a year ago inclusion of that extension was blocked on
> > some other more urgent important blocker bugs? Did this make progress?

Hi,

sorry, I'm pretty poor at following dri-devel@.

Yeah, the Wayland extension for queueing frames to be presented at
specific times has not been going anywhere for a long time. IIRC the
blockers have since been resolved, now it would need dusting off and
seeing how it interacts with those protocol additions. I wasn't too
happy with the design at the time, either, because of the question of
which state to queue and which not.

Nowadays presentation_feedback lives in
https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/presentation-time
and has been declared stable.

> > For timing sensitive applications such an extension is even more
> > important in a wayland world than under X11. On X11 most desktops allow
> > unredirecting fullscreen windows, so an app can drive the flip timing
> > rather direct. At least on Weston as i remember it from my last tests a
> > year ago, that wasn't possible, and an app that doesn't want to present
> > at each video refresh, but at specific target times had to guess what
> > the specific compositors scheduling strategy might be and then "play
> > games" wrt. to timing surface commit's to trick the compositor into sort
> > of doing the right thing - very fragile.
> > 
> > Anyway, the idea of presentation_queue was to specify the requested time
> > of presentation as actual time, not as a target vblank count. This
> > because applications that care about precise presentation timing, like
> > my kind of neuroscience/medical visual stimulation software, or also
> > video players, or e.g., at least the VDPAU video presentation api
> > "think" in absolute time, not in refresh cycles. Also a target vblank
> > count for presentation is less meaningful than a target time for things
> > like variable framerate displays/adaptive sync, or displays which don't
> > have a classic refresh cycle at all. It might also be useful if one
> > thinks about something like VR compositors, where precise timing control
> > could help for some of the tricks ("time warping" iirc?) they use to
> > hide/cope with latency from head tracking -> display.
> > 
> > It would be nice if the kernel could help compositors which would
> > implement presentation_queue or similar to be robust/precise in face of
> > future stuff like Freesync, or of added delays due to Optimus/Prime
> > hybrid-graphics setups. If we wanted to synchronize presentation of
> > multiple displays in a Freesync type display setup, absolute target
> > times could also be helpful.  
> 
> I agree with all of this though.

I'm very happy to hear the idea has support!


Thanks,
pq


> I'd like to add that the X11 Present extension specification already
> includes support for specifying a target time instead of a target
> refresh cycle. This isn't implemented yet though, but it should be
> relatively straightforward to implement using the kind of kernel API you
> describe.

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-09-08  9:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  3:39 [PATCH 0/6] drm: Explicit target vblank seqno for page flips Michel Dänzer
     [not found] ` <1470281981-18172-1-git-send-email-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-04  3:39   ` [PATCH 1/6] drm: Add page_flip_target CRTC hook Michel Dänzer
2016-08-04 10:47     ` Daniel Vetter
2016-08-04 11:01       ` Daniel Vetter
     [not found]         ` <20160804110116.GI6232-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2016-08-08  3:54           ` Michel Dänzer
2016-08-08  8:14             ` Daniel Vetter
     [not found]     ` <1470281981-18172-2-git-send-email-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-04 15:13       ` Alex Deucher
     [not found]         ` <CADnq5_OeoXDYnjAwnQCY9RXwqMo8eQ8LqWgUOeC0tgjH1b6M_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-08  3:33           ` Michel Dänzer
2016-08-08  7:23       ` [PATCH 1/6] drm: Add page_flip_target CRTC hook v2 Michel Dänzer
2016-08-04  3:39   ` [PATCH 2/6] drm/amdgpu: Provide page_flip_target hook Michel Dänzer
2016-08-04  3:39   ` [PATCH 4/6] drm/radeon: " Michel Dänzer
2016-08-16  0:35     ` Mario Kleiner
     [not found]       ` <dccd9347-afc4-83a6-8014-20692e71fd03-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-16  1:49         ` Michel Dänzer
2016-09-17 12:41           ` Mario Kleiner
     [not found]             ` <b00edbdc-c467-3f33-5a07-32def2961190-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-20  2:59               ` Michel Dänzer
2016-08-04  3:39   ` [PATCH 5/6] drm/radeon: Set MASTER_UPDATE_MODE to 0 again Michel Dänzer
2016-08-04  3:39   ` [PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags Michel Dänzer
2016-08-04  7:42     ` Ville Syrjälä
     [not found]       ` <20160804074205.GY4329-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-08-08  7:06         ` Michel Dänzer
2016-08-04 10:56     ` Daniel Vetter
     [not found]       ` <20160804105609.GG6232-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2016-08-08  6:53         ` Michel Dänzer
2016-08-08  7:23     ` [PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2 Michel Dänzer
2016-08-16  1:32       ` Mario Kleiner
     [not found]         ` <8974b919-6f9c-5912-0d26-f1a526829f83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-16  1:46           ` Michel Dänzer
2016-09-08  9:36             ` Pekka Paalanen [this message]
2016-08-04  7:38   ` [PATCH 0/6] drm: Explicit target vblank seqno for page flips Christian König
2016-08-04  3:39 ` [PATCH 3/6] drm/amdgpu: Set MASTER_UPDATE_MODE to 0 again Michel Dänzer
2016-08-04  9:51 ` [PATCH 0/6] drm: Explicit target vblank seqno for page flips Daniel Stone
2016-08-04 10:01   ` Michel Dänzer
2016-08-04 10:12     ` Daniel Stone
2016-08-04 11:15       ` Ville Syrjälä
     [not found]       ` <CAPj87rPO-QbyhmBy2p3XASqNdzrm3hmw0EsLLJYB2K4bBvTTrw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-08  3:53         ` Michel Dänzer
2016-08-04 15:16 ` Alex Deucher

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=20160908123631.721dcab0@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel.stone@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    --cc=wayland-devel@lists.freedesktop.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