- 08 Sep, 2020 3 commits
-
-
Fetch VariableRefresh option value from X conf file for modesetting backend DDX driver. This option defaults to false, and must be set to "true" in conf file for variable refresh support in the DDX driver. Signed-off-by:
Uday Kiran Pichika <pichika.uday.kiran@intel.com>
-
Window wrappers gets the notification when the window properties changes. These wrappers are mainly used to keep track of per-window _VARIABLE_REFRESH property values. These changes have been ported from AMDGPU Signed-off-by:
Uday Kiran Pichika <pichika.uday.kiran@intel.com>
-
These changes have been ported from AMD GPU DDX driver. This patch adds support for setting the CRTC variable refresh property for suitable windows flipping via the Present extension. In order for a window to be suitable for variable refresh it must have the _VARIABLE_REFRESH property set by the MESA and inform Modesetting DDX driver with window property updates. Then the window must pass the checks required to be suitable for Present extension flips - it must cover the entire X screen and no other window may already be flipping. And also DRM connector should be VRR capable. With these conditions met every CRTC for the X screen will have their variable refresh property set to true. Kernel Changes to support this feature in I915 driver is under development. Tested with DOTA2, Xonotic and custom GLX apps. Signed-off-by:
Uday Kiran Pichika <pichika.uday.kiran@intel.com>
-
- 07 Sep, 2020 4 commits
-
-
Reviewed-by:
Roman Gilg <subdiff@gmail.com>
-
present_can_window_flip is only called from the Xorg modesetting driver, never in WNMD mode. Reviewed-by:
Roman Gilg <subdiff@gmail.com>
-
present_wnmd_toplvl_pixmap_window returns a window with the same window pixmap, so the check could never fail. Reviewed-by:
Roman Gilg <subdiff@gmail.com>
-
We can only flip if the window pixmap matches that of the toplevel window. Doing so regardless could cause the toplevel window pixmap to get destroyed while it was still referenced by the window, resulting in use-after-free and likely a crash. Closes: xorg/xserver#1033 Reviewed-by:
Olivier Fourdan <ofourdan@redhat.com> Reviewed-by:
Roman Gilg <subdiff@gmail.com>
-
- 04 Sep, 2020 1 commit
-
-
Noticed this was missing while working on the following fix. v2: * Dropped present_wnmd_can_window_flip hunk (that function is never called, will be cleaned up in a follow-up MR). Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> # v1 Reviewed-by:
Roman Gilg <subdiff@gmail.com>
-
- 01 Sep, 2020 4 commits
-
-
The need_rotate variable is only used once anymore and had semantics which lead to errors in the past. In particular when negated we are dealing with a double negation. The variable gets replaced with a simple check on the xdg-output directly. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
This reverts commit 427f8bc0. When receiving an output update for the mode size we need to rotate the stored width and height values if and only if we have an xdg-output for this output since in this case the stored values describe the output's size in logical space, i.e. rotated. The here reverted commit made a code change with which we would not rotate though when an xdg-output was available since in this case the need_rotate variable was set to False what caused in the check afterwards the first branch to execute.
-
That is just a small style-change to the output_get_new_size function. The function before did take first the height and then the width argument, what is unusual since resolutions are normally named the other way around, for example 1920x1080. Also compare the update_screen_size function. Therefore change the order of arguments for output_get_new_size. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
We can just read out the xdg_output field of the provided xwl_output to check if a rotation is necessary or not. This makes the function easier to understand. Additionally some documentation is added. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
- 31 Aug, 2020 1 commit
-
-
The same pointer is kept in CurrentCursor as well, therefore two RefCursor calls are needed. Fixes use-after-free after switching VTs. Closes: xorg/xserver#1067
-
- 25 Aug, 2020 8 commits
-
-
Matthieu Herrb authored
CVE-2020-14362 ZDI-CAN-11574 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by:
Matthieu Herrb <matthieu@herrb.eu>
-
Matthieu Herrb authored
CVE-2020-14361 ZDI-CAN 11573 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by:
Matthieu Herrb <matthieu@herrb.eu>
-
Matthieu Herrb authored
CVE-2020-14346 / ZDI-CAN-11429 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by:
Matthieu Herrb <matthieu@herrb.eu>
-
Matthieu Herrb authored
CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by:
Matthieu Herrb <matthieu@herrb.eu>
-
It always takes one update cycle for the copy to become visible on the host windowing system, so waiting for the target MSC resulted in 1 cycle delay. We re-use the idle list for copies which were executed but need their completion event sent. Fixes black seams when resizing the "Builder" sub-window of GDK_BACKEND=x11 gtk4-demo on Xwayland (see https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557 ). Unfortunately, this cannot completely fix the seams with apps which queue up multiple frames in advance, since there's always at least one queued frame corresponding to the old window size. But it should at least help a little in that case as well. v2: * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window. (Roman Gilg) * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a comment, for clarity. v3: * Drop exec_msc = target_msc again in present_wnmd_execute. * present_execute_copy should never set vblank->queued in present_wnmd_execute now, so replace that branch with an assertion. (Roman Gilg) Reviewed-by:
Roman Gilg <subdiff@gmail.com> Tested-by:
Roman Gilg <subdiff@gmail.com>
-
Allowing it to be called from more functions than before. No functional change. Reviewed-by:
Roman Gilg <subdiff@gmail.com> Tested-by:
Roman Gilg <subdiff@gmail.com>
-
For tracking the MSC when the present can be executed separately from the target MSC. Allows removing the requeue field instead, plus more later. v2: * Rename wait_msc → exec_msc (Roman Gilg) * Use exec_msc = target_msc instead of exec_msc++, for clarity. * Bug fix: Set exec_msc = target_msc also if present_flip returned false in present_execute. v3: * Set exec_msc = target_msc also if present_wnmd_flip returned false in present_wnmd_execute, for consistency. v4: * Specifically check for exec_msc == crtc_msc + 1 in present_execute_wait/copy, to avoid re-introducing https://bugs.freedesktop.org/show_bug.cgi?id=94596 . Reviewed-by:
Roman Gilg <subdiff@gmail.com> Tested-by:
Roman Gilg <subdiff@gmail.com>
-
Preparation for different handling between SCMD & WNMD. No functional change intended. Reviewed-by:
Roman Gilg <subdiff@gmail.com> Tested-by:
Roman Gilg <subdiff@gmail.com>
-
- 24 Aug, 2020 1 commit
-
-
(Using GLSL 1.30 or newer) The width/height members of xRectangle are unsigned, but they were being interpreted as signed when converting to floating point for the vertex shader, producing incorrect drawing for values > 32767. v2: * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height. (Eric Anholt) Reviewed-by:
Eric Anholt <eric@anholt.net>
-
- 18 Aug, 2020 1 commit
-
-
You will not find GL_ARB_* extensions in a GLES context by definition, the droid you're looking for is named GL_KHR_debug. Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com>
-
- 04 Aug, 2020 1 commit
-
-
Olivier Fourdan authored
Xwayland is just a Wayland client, no X11 screensaver should be expected to work reliably on Xwayland when running rootless because Xwayland cannot grab the input devices so it has no way to actually lock the screen managed by the Wayland compositor. Turn off the screensaver on Xwayland when running rootless by setting the screensaver timeout and interval and their default values to zero and disable the MIT-SCREEN-SAVER extension. Closes: xorg/xserver#1051 Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Reviewed-by:
Michel Dänzer <mdaenzer@redhat.com> Reviewed-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
- 31 Jul, 2020 2 commits
-
-
Avoid leaking un-initalized memory to clients by zeroing the whole pixmap on initial allocation. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by:
Matthieu Herrb <matthieu@herrb.eu> Reviewed-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
Replicate 7d2543a3 but for all types of X servers
-
- 30 Jul, 2020 1 commit
-
-
Instead of optionally return early when an event is aborted and potentially clean it up in there we can only optionally inform Present if not aborted and afterwards clean it up if required. Saves some lines of code and conditional branches. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
- 29 Jul, 2020 2 commits
-
-
Jon Turney authored
-
Jon Turney authored
Update commit ea47af87 renaming master_pixmap to primary_pixmap in struct PixmapRec.
-
- 28 Jul, 2020 1 commit
-
-
Huacai Chen authored
On a DT-base PCI platform, the sysfs path of vga device is like this: /sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0. Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This is because config_udev_odev_setup_attribs() use strstr() to search the first "pci-" in ID_PATH. To fix this, we implement a strrstr() function and use it to search the last "pci-" in ID_PATH, which can get a correct BusID. Signed-off-by:
Huacai Chen <chenhc@lemote.com>
-
- 24 Jul, 2020 1 commit
-
-
Roman Gilg authored
For Pixmap flips to have well defined outcomes the window must be contained by the valid region if such region was specified. The valid region is inserted as an argument to the check in window mode. Setting this argument is missing in screen mode as well but we ignore it for now and only add it to window mode. It seems there are none or only very few clients actually making use of valid regions at the moment. For simplicity we therefore just check if a valid region was set by the client and in this case do never flip, independently of the window being contained by the region or not. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
- 22 Jul, 2020 5 commits
-
-
Roman Gilg authored
The function is never called from present_screen.c in contrast to the behavior in screen mode. In present_wnmd.c we can simply remove the function which does an unnecessary check of the property before setting it and directly set the property at the two locations the function was called previously. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
Roman Gilg authored
With the newly introduced separate API method for idling a presented Pixmap in window mode we can simplify the logic by allowing calls to it at any point in time. This is done by setting the flip_idler flag if the Pixmap was idled before being presented. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
Roman Gilg authored
Notifying Present about events' states was done prior with the single function present_wnmd_event_notify just like in screen mode. But it is more intelligible if at least in window mode we make use of three different functions with names that directly indicate what their purpose is: * present_wnmd_event_notify only for queued events feedback. * present_wnmd_flip_notify for when a presentation occured (flip). * present_wnmd_idle_notify for when the Pixmap of the event can be reused. This is an API-breaking change in regards to window mode. DDX written against the previous version won't work anymore. It is assumed that there only exists the XWayland DDX at the moment using the window mode such that this is not an issue for the overall ecosystem. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
Roman Gilg authored
Rename the lists release_queue to release_list and event_list to wait_list. The prior names release_queue and event_list were ambiguous: in both are event- like vblanks which can be removed from the lists in random order. In the release_queue can be flips that are already released but still wait for the sync or frame callback but normally the release comes later. In the event_list are queued events waiting for a later msc. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
Roman Gilg authored
In xwl_present_window an xwl_screen entry was declared but never actually used. Signed-off-by:
Roman Gilg <subdiff@gmail.com>
-
- 21 Jul, 2020 4 commits
-
-
Alex Goins authored
Commit 1e3f9ea1 removed some NULL checks from xf86RandR12.c, on the premise that they can't be reached unless RandR has already been initialized. For threesuch calls, that's not true: xf86Crtc.c::xf86CrtcScreenInit(): if (c == config->num_crtc) { xf86RandR12SetRotations(screen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 | RR_Reflect_X | RR_Reflect_Y); xf86RandR12SetTransformSupport(screen, TRUE); } else { xf86RandR12SetRotations(screen, RR_Rotate_0); xf86RandR12SetTransformSupport(screen, FALSE); } xf86Crtc.c::xf86CrtcCloseScreen(): xf86RandR12CloseScreen(screen); This change adds checks back to xf86RandR12Set{Rotations,TransformSupport}() and xf86RandR12CloseScreen(), checking that xf86RandR12KeyRec has been registered. Without this, X will hit an assert that causes it to abort. Signed-off-by:
Alex Goins <agoins@nvidia.com>
-
Alex Goins authored
RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether or not RandR has been initialized. As mentioned in commit 4226c6d0, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit 4226c6d0 , fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by:
Alex Goins <agoins@nvidia.com>
-
Alex Goins authored
RRProviderAutoConfigGpuScreen() is called from outside RandR, so there is no guarantee that RandR has been initialized when it is called. As mentioned in commit 4226c6d0, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit 4226c6d0 , fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by:
Alex Goins <agoins@nvidia.com>
-
This can happen e.g. with weston's headless backend. Reviewed-by:
Olivier Fourdan <ofourdan@redhat.com>
-