- 15 Mar, 2019 1 commit
-
-
If they don't, flipping will result in corrupted display. Test case: * Run Xorg at 1920x1080 with no window manager * glxgears -geometry 2048x1080
-
- 29 Nov, 2018 1 commit
-
-
Signed-off-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
- 28 Mar, 2018 10 commits
-
-
Flipping pixmaps per window needs additional arguments in the flip mode API. Add these as preperation for window flip mode. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Add hooks to query caps, get crtcs, abort vblanks and destroy a flip. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
To reduce future code duplication refactor timings adjustment out as a separate function. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Flip modes can now have different implementations of present_can_window_flip. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Make present_pixmap a common function callable by any flip mode. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
To be shared by multiple flip modes, refactor execute functionality, such that logical chunks can go in new separate file. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Add 'queue_vblank', 'flush' and 're_execute' hooks, that are supposed to be shared with other flip modes. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
With the new internal flip mode API move vblank creation and so on into a seperate file, such that it can be shared between flip modes. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Add some basic function hooks to our future present-internal flip mode API, that will allow us to share functionality in between modes and move more code in separate files. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
As a preperation for future flip mode alternatives move most of the functionality from 'present.c' into a separate file. Leave some functions needed by future other flip modes in 'present.c'. Signed-off-by:
Roman Gilg <subdiff@gmail.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
- 05 Mar, 2018 2 commits
-
-
Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible v5: Fix memory corruption in XWayland (uninitialized pointer) Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
Add 'check_flip2' hook for driver to let know the core about why flipping is not possible ('reason'). If it is because of unsupported buffer format/modifier, a PresentCompleteNotify event is sent to the client with the PresentCompleteModeSuboptimalCopy mode. v2: Check for PresentOptionSuboptimal and check driver version before using 'check_flip2'. v3: Only require one of 'check_flip' or 'check_flip2' to be implemented by the driver. Refactor reasons list to enum Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Adam Jackson <ajax@redhat.com>
-
- 24 Jan, 2018 1 commit
-
-
This reverts commit 5c00e693. It broke the Gallium nine state tracker, which makes PresentPixmap requests on one display connection and processes the corresponding events on another one. The issue that motivated this change is prevented on the client side by https://cgit.freedesktop.org/mesa/mesa/commit/?id=7b0e8264dd21ae05521d08d41fecd84139401fef Bugzilla: https://bugs.freedesktop.org/104678
-
- 23 Nov, 2017 1 commit
-
-
We were sending the events to all clients listening for them on the window. But clients can get confused by events from another client, and I can't imagine any case where receiving events from other clients would be required. v2: * Also restrict events sent to additional windows to the presenting client * Don't shorten line lengths Reviewed-by:
Keith Packard <keithp@keithp.com>
-
- 04 Oct, 2017 1 commit
-
-
Later events are sometimes added in front of the queue (e.g. if page flipping fails) so we need to check the whole queue on event. Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com>
-
- 08 Feb, 2017 1 commit
-
-
Works fine now. Reviewed-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com>
-
- 01 Feb, 2017 1 commit
-
-
This prevents the tearing of moving window in a composite WM desktop when output slave is attached but none of its crtc is really active. Signed-off-by:
Qiang Yu <Qiang.Yu@amd.com> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com>
-
- 10 Jan, 2017 1 commit
-
-
We are no longer using the present_flip_queue list only for presents which have already been submitted to the driver for page flipping, but also for those which we are queueing up to be flipped later, marked with vblank->queued == TRUE. We were incorrectly calling present_flip_notify for such entries, failing the assertion in present_flip_notify (or presumably resulting in other undesirable behaviour with assertions disabled). Reproduction recipe: Run the JavaFX test case referenced by https://bugs.freedesktop.org/show_bug.cgi?id=98831#c6 and alt-tab out of it while it's fullscreen. May take a few attempts to hit the assertion failure. Fixes: bab0f450 ("present: Fix presentation of flips out of order") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98854 Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
- 15 Aug, 2016 2 commits
-
-
We were asserting that these were called before from other places, but that isn't always the case, e.g. during server shutdown. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96951 Reported-and-Tested-by:
Tod Jackson <tod.jackson@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com>
-
Easier than dealing with it in all paths that can end up here during server shutdown. Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
- 28 Jul, 2016 1 commit
-
-
present_restore_screen_pixmap's work doesn't need to be done several times for the same pending flip. Fixes a crash if the X server quits while a flip is pending, in which case present_set_abort_flip may be called several times, including when screen->root is already cleared to NULL. Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
-
- 17 Jun, 2016 3 commits
-
-
Hans de Goede authored
A single provider can be both a offload and source slave at the same time, the use of seperate lists breaks in this case e.g. : xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 0 name:modesetting xrandr --setprovideroutputsource 1 0x7b xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 1 name:modesetting xrandr --setprovideroffloadsink 1 0x7b xrandr --listproviders Providers: number : 3 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 2 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting Provider 2: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting Not good. The problem is that the provider with id 0x46 now is on both the output_slave_list and the offload_slave_list of the master screen. This commit fixes this by unifying all 3 lists into a single slaves list. Note that this does change the struct _Screen definition, so this is an ABI break. I do not expect any of the drivers to actually use the removed / changed fields so a recompile should suffice. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Dave Airlie <airlied@redhat.com>
-
Chris Wilson authored
The flip queue currently only holds events submitted to the driver for flipping, awaiting the completion notifier. It is short. We therefore can speed up interrupt processing by keeping the small number of events ready to be flipped on the end of the flip queue. By appending the events to the flip_queue in the order that they become ready, we also resolve one issue causing Present to display frames out of order. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Reviewed-and-tested-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Chris Wilson authored
With large numbers of queued vblank, the list iteration on every interupt dominates processing time. If we reorder the list to be in ascending event order, then not only is also likely to be in order for notification queries (i.e. the notification will be near the start of the list), we can also stop iterating when past the target event_id. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Reviewed-and-tested-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
- 24 Mar, 2016 1 commit
-
-
This code was added to deal with the driver present hook failing, in which case we need to wait for the next MSC before executing the presentation. However, it could also take effect in cases where the driver incorrectly thinks the current MSC matches the target one (e.g. due to the kernel interface only supporting 32-bit MSC values), in which case it could result in the presentation getting requeued over and over. To prevent such issues, check specifically for the target MSC immediately following the current MSC. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94596 Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com> Reviewed-by:
Keith Packard <keithp@keithp.com>
-
- 11 Mar, 2016 1 commit
-
-
Due to the way present currently works, we don't ever check with the secondary adapters if we can flip at all. We shouldn't flip if the secondary adapters are attached to the pixmap currently, however using the current check_flip callback isn't possible as it passes the Window to the driver (something we shouldn't be doing), so the slave driver can never get it's own screen ptr back. For now to fix the problem just block flips if we have any slaves configured. We can fix the ABI up later, but this fix can be backported to stable. Signed-off-by:
Dave Airlie <airlied@redhat.com> Reviewed-by:
Keith Packard <keithp@keithp.com>
-
- 01 Mar, 2016 3 commits
-
-
After present_set_abort_flip, the screen pixmap will be used for all screen drawing, so we need to restore the current flip pixmap contents to the screen pixmap here as well. Improves flashing / stutter e.g. when something like a popup menu appears on top of a flipping fullscreen window or when switching out of fullscreen. Note that this means present_set_abort_flip now relies on screen->root being non-NULL, but that's already the case in other present code. Reviewed-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk>
-
The following fix will use the refactored function. The logic in the refactored function is slightly simplified, exploiting the fact that this function is only ever called with a valid flip pixmap. v2: Assert that flip_pixmap is non-NULL instead of testing and bailing on NULL, preserve test for flip_window being non-NULL before calling present_set_tree_pixmap for it (Keith Packard) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1) Reviewed-by:
Keith Packard <keithp@keithp.com>
-
present_unflip may be called several times from present_check_flip_window during the same unflip. We can only copy to the screen pixmap the first time, otherwise we may scribble over other windows. The flip pixmap contents don't get updated after the first time anyway. Fixes at least the following problems, which were introduced by commit 806470b9 ("present: Copy unflip contents back to the Screen Pixmap"): On xfwm4 without compositing, run glxgears and put its window into fullscreen mode to start flipping. While in fullscreen, open the xfwm4 window menu by pressing Alt-Space. The window menu was invisible most of the time because it was getting scribbled over by a repeated unflip copy. When switching a flipping window out of fullscreen, a repeated unflip copy could leave artifacts of the flip pixmap on the desktop. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94325 Reviewed-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk>
-
- 25 Feb, 2016 3 commits
-
-
While present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com>
-
For flipping, we wait for the MSC before the target MSC and then call the driver flip hook. If the latter fails, we have to wait for the target MSC before falling back to a copy, or else it's executed too early. Fixes glxgears running at unbounded framerate (not synchronized to the refresh rate) in fullscreen if the driver flip hook fails. Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com>
-
To make them usable from any other function in the file. No functional change. Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com>
-
- 20 Jan, 2016 1 commit
-
-
When a window moves from one CRTC to another, present_window_to_crtc_msc updates window_priv->msc_offset according to the delta between the current MSC values of the old and new CRTC: window_priv->msc_offset += new_msc - old_msc; window_priv->msc_offset is initially 0, so if new_msc < old_msc, window_priv->msc_offset wraps around and becomes a large number. If the window_msc parameter passed in is small (in particular if it's 0, such as is the case when the client just wants to know the current window MSC value), the returned CRTC MSC value may still be a large number. In that case, the existing MSC comparisons in pixmap_present weren't working as intended, resulting in scheduling a wait far into the future when the target MSC had actually already passed. This would result in the client (e.g. the Chromium browser) hanging when moving its window between CRTCs. In order to fix this, introduce msc_is_(equal_or_)after helper functions which take the wraparound into account for comparing two MSC values. Signed-off-by:
Michel Dänzer <michel.daenzer@amd.com> Reviewed-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Martin Peres <martin.peres@linux.intel.com> Signed-off-by:
Keith Packard <keithp@keithp.com>
-
- 07 Dec, 2015 3 commits
-
-
When unflipping, we may find that our flip window has been redirected. If we replace the redirected Window with the Screen Pixmap we then have mutliple fullscreen Windows believing that their own the Screen Pixmap - multiple fullscreen Windows that are being flipped by Clients, and so continue to flip causing popping between e.g. the compositor and the game. [ajax: Fix up present_execute() hunk to account for changes introduced in fe07ec19 ] Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com>
-
The vblank event request for a synchronous flip is scheduled for the vblank before the target flip msc (so that the flip itself appears at the right frame). If we cancel that flip and so wish to schedule a copy instead, that copy needs to be postponed by a frame in order for it be performed at the requested time. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com>
-
When verifying whether a pending flip is still valid, we need to pass down the orignal sync_flip mode (e.g. if the driver only supports sync flips, verifying a async flip will falsely fail). Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com>
-
- 09 Nov, 2015 2 commits
-
-
According to the spec, PresentOptionAsync should only trigger a different behaviour when the target msc has been reached. In this case if the driver is able to do async swaps, we use them to avoid a screen copy. When the target msc hasn't been reached yet, we want to use sync swaps. v2: Fix indentation and simplify checks for Async flips Signed-off-by:
Axel Davy <axel.davy@ens.fr> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com>
-
It is according to the protocol: "If 'options' contains PresentOptionAsync, and the 'target-msc' is less than or equal to the current msc for 'window', then the operation will be performed as soon as possible, not necessarily waiting for the next vertical blank interval." Signed-off-by:
Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by:
Michel Dänzer <michel.daenzer@amd.com> Reviewed-by:
Axel Davy <axel.davy@ens.fr>
-