All of lore.kernel.org
 help / color / mirror / Atom feed
* Upstream support for FreeSync / Adaptive Sync
@ 2017-10-17  9:34 Nicolai Hähnle
  2017-10-17 10:28 ` [Mesa-dev] " Michel Dänzer
  0 siblings, 1 reply; 23+ messages in thread
From: Nicolai Hähnle @ 2017-10-17  9:34 UTC (permalink / raw)
  To: dri-devel, mesa-dev; +Cc: Daenzer, Michel, Lazare, Jordan, Harry Wentland

Hi all,

I just sent out a patch that enables FreeSync in Mesa for the somewhat 
hacked implementation of FreeSync that exists in our hybrid (amdgpu-pro) 
stack's DDX and kernel module. [0]

While this patch isn't meant for upstream, that's as good a time as any 
to raise the issue of how a proper upstream solution would look like. It 
needs to cut across the entire stack, and we should try to align the KMS 
interface with the X11 protocol and the Wayland protocol.

Prior art that I'm aware of includes:

1. The Present protocol extension has a PresentOptionUST bit for 
requesting a specific present time, but the reality is that the 
implementation of that is even less than what the protocol docs claim. [1]

2. There's a VK_GOOGLE_display_timing extension which similarly allows 
providing a desiredPresentTime (in ns).

3. Keith Packard's CRTC_{GET,QUEUE}_SEQUENCE is not specific to Adaptive 
Sync, but seems like something Adaptive Sync-aware applications would 
want to use. [2]

Common sense suggests that there need to be two side to FreeSync / VESA 
Adaptive Sync support:

1. Query the display capabilities. This means querying minimum / maximum 
refresh duration, plus possibly a query for when the earliest/latest 
timing of the *next* refresh.

2. Signal desired present time. This means passing a target timer value 
instead of a target vblank count, e.g. something like this for the KMS 
interface:

   int drmModePageFlipTarget64(int fd, uint32_t crtc_id, uint32_t fb_id,
                               uint32_t flags, void *user_data,
                               uint64_t target);

   + a flag to indicate whether target is the vblank count or the 
CLOCK_MONOTONIC (?) time in ns.

These two sides then need to be plumbed through the entire stack.

I guess for now the main questions are: Is there more "prior art" that 
we should be aware of? Does anybody have partial prototypes or very 
strong feelings about what the interfaces and protocols should look like?

Cheers,
Nicolai

[0] https://patchwork.freedesktop.org/patch/183117/

[1] 
https://cgit.freedesktop.org/xorg/proto/presentproto/tree/presentproto.txt

[2] https://lists.freedesktop.org/archives/dri-devel/2017-August/148905.html
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-10-19 18:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17  9:34 Upstream support for FreeSync / Adaptive Sync Nicolai Hähnle
2017-10-17 10:28 ` [Mesa-dev] " Michel Dänzer
2017-10-17 11:04   ` Nicolai Hähnle
2017-10-17 13:37     ` Michel Dänzer
2017-10-17 12:22   ` Daniel Vetter
2017-10-17 13:46     ` Michel Dänzer
2017-10-17 13:54       ` [Mesa-dev] " Christian König
2017-10-17 14:09       ` Ville Syrjälä
2017-10-17 19:00         ` Nicolai Hähnle
2017-10-17 19:53           ` Ville Syrjälä
2017-10-18 11:07             ` Nicolai Hähnle
2017-10-17 15:04       ` Daniel Vetter
2017-10-17 15:40         ` Michel Dänzer
2017-10-17 17:16           ` [Mesa-dev] " Daniel Vetter
2017-10-17 19:01             ` Nicolai Hähnle
2017-10-18  8:10               ` Daniel Vetter
2017-10-18  9:27                 ` Michel Dänzer
2017-10-18 10:15                 ` Nicolai Hähnle
2017-10-18 16:59                   ` [Mesa-dev] " Michel Dänzer
2017-10-18 19:28                     ` Daniel Vetter
2017-10-19 18:51                       ` Manasi Navare
2017-10-18 19:20                 ` Harry Wentland
2017-10-19  0:17                   ` Manasi Navare

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.