All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patches][nouveau/ddx]: Improvements to bufferswap implementation and timestamping
@ 2012-02-15 23:45 Mario Kleiner
       [not found] ` <1329349524-11650-1-git-send-email-mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Mario Kleiner @ 2012-02-15 23:45 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	bskeggs-H+wXaHxf7aLQT0dZR+AlfA,
	mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ

Hi,

here a set of patches against the nouveau-ddx. This is an extended and
revised set, based on Francisco Jerez feedback from autumn last year.

[1/9] Makes pageflipping work again on X-Server 1.12rc. It apparently stopped
working somewhere around Xorg 1.11+.

[2/9] Implements handling of pageflip completion events from the kernel.
Francisco Jerez argument against including it was that the x-server didn't
have a swaplimit api, so this couldn't be applied at the same time as the
pseudo triple-buffering hack which is in place in the current ddx.
Now we have the swaplimit api in 1.12, so this problem should be solved.

[3/9] Makes use of the swaplimit api. A new xorg.conf option "SwapLimit"
allows to select a swaplimit of 1 or 2 for double-buffering or
triple-buffering. It defaults to 2 for Xorg 1.12+ and 1 for older servers.
This way, on 1.12+ nouveau retains the kind of triple buffering behaviour it
currently has, but swap completion timestamping (OML_sync_control,
INTEL_swap_events, and client swap throttling) works conforming to
the specs. On older servers it removes triple-buffering but makes
nouveau conform to the specs. This is important for apps that need
precise and reliable swap scheduling and timestamping.

[4/9] A bug fix against corrupted desktop when switching from redirected
to non-redirected fullscreen windows under a desktop compositor.
Fixes FDO bug #35452.

[5/9] Some fixes to swap scheduling, revised according to Francisco's
review.

[6/9] Fixes swap throttling for non-fullscreen windows under a desktop
compositor. Split into a separate patch according to Francisco's
feedback.

[7/9] An attempt to provide more sane swap completion events for non-
fullscreen windows. This is a bit of cheating, as it delivers the
events for the earliest point in time one would expect the swap
to complete, assuming only a lightly loaded gpu. Real completion
could be later. I think this is an "improvement" because the current
implementation delivers swap complete events with timestamps and
counts that signal swap completion before the client even requested
the swap.

[8/9] This one adds Francisco's original triple-buffering hack back
for Xorg 1.11 and earlier servers if the xorg.conf option requests
a swaplimit > 1. Users can choose between "triple-buffering" but
broken timestamping or double-buffering with sane timestamping.

[9/9] Fixes a corner case which could cause the ddx to segfault
with its current triple-buffering implementation.

I've tested these on single-display and dual-display setups,
with/without compositor, with/without redirection and checked
the robustness and precision of the timestamps with special
measurement equipment, on XOrg 1.12-rc2 and 1.10. They work
pretty well for me and finally make nouveau very useable for
the kind of scientific applications that require precise
swap scheduling and timestamping, so i'd love to see them
reviewed and hopefully included into the ddx soon.

A couple of things are a bit of hacks:

[3/9] I think the setup of a default swap limit would be
better done in the x-server itself instead of the ddx. The
setup code is a bit awkward, hijacking the ddx->CreateBuffer
function to apply the swaplimit. A DRI2GetSwapLimit() function
is also missing from the server, which could help in the
future to track swaplimit changes by other clients than the ddx
itself. Unfortunately it is too late for the 1.12 release to do
this.

[8/9] Don't know if this is still wanted/needed or not?

[9/9] It fixes the problem and doesn't affect performance, but is
somewhat of a hack. I don't know how to do better, maybe somebody
else has a better solution?

Thanks,
-mario

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

end of thread, other threads:[~2012-07-23 17:19 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-15 23:45 [Patches][nouveau/ddx]: Improvements to bufferswap implementation and timestamping Mario Kleiner
     [not found] ` <1329349524-11650-1-git-send-email-mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
2012-02-15 23:45   ` [PATCH 1/9] dri2: Fix can_exchange() to allow page-flipping on new servers Mario Kleiner
     [not found]     ` <1329349524-11650-2-git-send-email-mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
2012-02-16 10:04       ` Michel Dänzer
     [not found]         ` <1329386665.2859.414.camel-2h6evNeVVYGs1BDpvl8NfQ@public.gmane.org>
2012-02-20  4:59           ` Mario Kleiner
     [not found]             ` <4F41D31E.3030901-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
2012-02-20 10:27               ` Michel Dänzer
     [not found]                 ` <1329733624.2859.536.camel-2h6evNeVVYGs1BDpvl8NfQ@public.gmane.org>
2012-02-22  1:23                   ` Mario Kleiner
2012-02-15 23:45   ` [PATCH 2/9] dri2: Implement handling of pageflip completion events Mario Kleiner
2012-02-15 23:45   ` [PATCH 3/9] dri2: Add support for DRI2SwapLimit() API Mario Kleiner
2012-02-15 23:45   ` [PATCH 4/9] dri2: Update front buffer pixmap and name before exchanging buffers Mario Kleiner
2012-02-15 23:45   ` [PATCH 5/9] dri2: Fixes to swap scheduling Mario Kleiner
2012-02-15 23:45   ` [PATCH 6/9] dri2: Allow vblank controlled swaps for redirected windows. Part I Mario Kleiner
2012-02-15 23:45   ` [PATCH 7/9] dri2: Allow vblank controlled swaps for redirected windows. Part II Mario Kleiner
2012-02-15 23:45   ` [PATCH 8/9] dri2: Reimplement hack for triple-buffering on old X-Servers Mario Kleiner
2012-02-15 23:45   ` [PATCH 9/9] dri2: Fix corner case crash for swaplimit > 1 Mario Kleiner
     [not found]     ` <1329349524-11650-10-git-send-email-mario.kleiner-TdbV1Z3I5XE0NhjG498hmQ@public.gmane.org>
2012-02-16  9:46       ` Michel Dänzer
     [not found]         ` <1329385574.2859.409.camel-2h6evNeVVYGs1BDpvl8NfQ@public.gmane.org>
2012-02-20  5:17           ` Mario Kleiner
2012-07-12 19:39       ` Anssi Hannula
     [not found]         ` <0d082daa8340ab694169e75ff2c3044c-NuFIJhXzKCMOpIWgD9kOMw@public.gmane.org>
2012-07-23 17:19           ` Anssi Hannula
2012-02-29  7:17   ` [Patches][nouveau/ddx]: Improvements to bufferswap implementation and timestamping Ben Skeggs
2012-03-01 18:34     ` Mario Kleiner

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.