Commit Graph

16996 Commits

Author SHA1 Message Date
Adam Jackson
8449c8623d miext/sync: Fix needless ABI change
The initialized field was added in:

    commit 82f01ad786
    Author: Alex Goins <agoins@nvidia.com>
    Date:   Wed Apr 10 13:48:02 2019 -0500

        xsync: Add resource inside of SyncCreate, export SyncCreate

But it added this field not at the end of SyncObject. It may not have
been _usefully_ possible to create those from another extension prior to
that commit, but that's still an ABI-incompatible change.

(cherry picked from commit 194ba38728)
2019-08-21 14:50:13 -04:00
Aaron Plattner
39b3005c32 GLX: Set GlxServerExports::{major,minor}Version
Commit 56c0a71fdd incremented the
GLXSERVER_VENDOR_ABI_MINOR_VERSION define, but this define was not actually
being used to set glxServer.minorVersion.

Update the initializer for glxServer to use the correct version numbers.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit b4231d6902)
2019-08-13 14:53:55 -07:00
Kyle Brenneman
d3034ef2f5 GLX: Add a function to change a clients vendor list.
Add a new function, GlxServerExports::setClientScreenVendor, which will change
the vendor that handles GLX requests for a screen, but only for requests from
a specific client.

v2: Increment the GLXVND minor version number.
v3: Note the GLXVND version requirement for setClientScreenVendor.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 56c0a71fdd)
2019-08-13 14:53:55 -07:00
Kyle Brenneman
abeae4a6d3 GLX: Use the sending client for looking up XID's
When GlxGetXIDMap looks up an unknown XID, it will now look up a vendor based
on the screen number for the XID and the client that sent the current request.

In GlxGetXIDMap, if the XID is for a regular X window, then it won't be in the
(XID -> vendor) mapping, so we have to look up a vendor by screen number.

With this change, GlxGetXIDMap will use the (screen -> vendor) map for
whichever client sent the current request, instead of using the global
(screen -> vendor) map.

Since GlxGetXIDMap doesn't take a ClientPtr argument, GlxDispatchRequest will
store the client for the current request in a global variable. That way, the
ABI for GLXVND doesn't need to change.

v2: Fix an error check in GlxDispatchRequest.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 8b67ec7cc6)
2019-08-13 14:53:55 -07:00
Kyle Brenneman
1fdb7cbce5 GLX: Add a per-client vendor mapping.
Each client now has its own (screen, vendor) mapping.

Currently, it's just a copy of the global mapping, but later changes will allow
it to change.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 37a36a6b5b)
2019-08-13 14:53:55 -07:00
Alex Goins
82f01ad786 xsync: Add resource inside of SyncCreate, export SyncCreate
As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
want to create a fence, then initialize it in their own way. This currently
can't be done without adding a function directly to Xext/sync.c due to the fact
that the RTFence resource type is private and there is no external interface to
add to it.

To facilitate other X extensions creating fences and initializing them, this
change exports SyncCreate() and adds the resource directly within it. Callers no
longer need to call AddResource() after SyncCreate(), they only need to
initialize the SyncObject.

To prevent FreeFence() and FreeCounter() from segfaulting if the call to
AddResource() fails before the sync object is initialized, this adds a new
'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
FreeCounter() to skip de-initialization and simply free the object.
Initialization after adding the resource shouldn't otherwise be a problem due to
the single-threaded nature of X.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit 7f962c70b6)
2019-08-13 14:53:55 -07:00
Olivier Fourdan
dfd51be3ca xwayland: Do not free a NULL GBM bo
Both `gbm_bo_create()` and `gbm_bo_create_with_modifiers()` can fail and
return `NULL`.

If that occurs, `xwl_glamor_gbm_create_pixmap()` will not create a
pixmap for the (NULL) GBM bo, but would still try to free the bo which
leads to a crash in mesa:

  [...]
  #7  <signal handler called>
  #8  in gbm_bo_destroy (bo=0x0) at ../src/gbm/main/gbm.c:439
  #9  in xwl_glamor_gbm_create_pixmap () at xwayland-glamor-gbm.c:245
  #10 in ProcCreatePixmap () at dispatch.c:1440
  #11 in Dispatch () at dispatch.c:478
  #12 in dix_main () at main.c:276

To avoid the crash, only free the GBM bo if not `NULL`.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Bugzilla: https://bugzilla.redhat.com/1729925
(cherry picked from commit d9ec525059)
2019-07-26 19:44:03 +00:00
Adam Jackson
df7ee10d98 xwayland: Expand the RANDR screen size limits
There's not really a good way to query this from the wayland server, so
just set the maximum to the X11 protocol limits. While we're at it,
lower the minimum screen size to something implausibly small too, just
in case.

Fixes: xorg/xserver#850
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit d0850241c6)
2019-07-26 19:44:03 +00:00
Olivier Fourdan
44c693f45d xwayland: Update screen pixmap on output resize
Running Xwayland non-rootless and resizing the output would lead to a
crash while trying to update the larger areas of the root window.

Make sure we resize the backing pixmap according to the new output size
to avoid the crash.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/834
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit ce9455b5ee)
2019-07-26 19:44:03 +00:00
Matt Roper
1804e73271 dri2: Sync i965_pci_ids.h from mesa
Copied from Mesa with no modifications.

This update brings in a significant number of new platform ID's.

Syncs with mesa up to commit e334a595e ("intel/icl: Add new ICL
PCI-IDs").

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit a8d9ebeb43)
2019-07-26 19:44:03 +00:00
Marco Trevisan (Treviño)
98e3db2ac4 Xi: Use current device active grab to deliver touch events if any
When Retrieving touch delivery data we need to check if we have an active
grab on such device, and in that case use it to delivery events.
If we don't do this, when rejecting the touch events in DeactivatePointerGrab,
we will end-up in creating an implicit grab that will change the device
deviceGrab's state, causing a recursion during TouchEndTouch.

Fixes #7

https://bugs.freedesktop.org/show_bug.cgi?id=96536
(cherry picked from commit 35e5a76cc1)
2019-07-26 19:44:03 +00:00
Michel Dänzer
26b6ba5347 Revert "present/scmd: Check that the flip and screen pixmap pitches match"
This reverts commit ef91da2757.

I thought this couldn't work under any circumstances, but I was wrong,
and drivers are already checking for cases that really cannot work.

Fixes issue #839.

(cherry picked from commit 2f0dd1816d)
2019-07-10 11:04:11 -04:00
Carlos Garnacho
c86222d4bd xwayland: Reset scheduled frames after hiding tablet cursor
Hiding the tablet tool cursor results in it being hidden forever after.
This is due to the stale frame callback that will neither be disposed
or replaced. This can be reproduced in krita (X11) as the pointer
cursor is hidden while over the canvas.

Clearing the frame callback ensures the correct behavior in future
xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being
displayed, and a new frame callback created), and is 1:1
with xwl_seat_set_cursor() for pointers.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
(cherry picked from commit dea4a74621)
2019-06-06 11:48:13 +02:00
Olivier Fourdan
6e199e4613 glamor: Make pixmap exportable from gbm_bo_from_pixmap()
If a pixmap is not exportable, `glamor_gbm_bo_from_pixmap()` would fail
and the modesettings driver would consequently fail to do its page flip,
which both prevents Present from working and also fill up the logs with
error messages such as:

  (EE) modeset(0): Failed to get GBM bo for flip to new front.
  (EE) modeset(0): present flip failed

Refactor the code so that `glamor_gbm_bo_from_pixmap()` takes care of
making the pixmap exportable.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Yuxuan Shui yshui@hadean.com
See-also: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/131
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/68
Fixes: 86b2d8740a "glamor: Reallocate pixmap storage without modifiers
       if necessary"
(cherry picked from commit 26fe29f4fa)
2019-06-05 15:12:31 +02:00
Olivier Fourdan
34ad57e570 xwayland: Check status in GBM pixmap creation
The current code in `xwl_glamor_gbm_create_pixmap_for_bo()` may fail in
several cases that are not checked for:

 - `eglCreateImageKHR()` may have failed to create the image,
 - `glEGLImageTargetTexture2DOES()` may fail and set an error,
 - `glamor_set_pixmap_texture()` may fail for very large pixmaps
    because the corresponding FBO could not be created.

Trying to upload content to a pixmap with no texture will crash Mesa,
glamor and Xwayland, e.g.:

  XXX fail to create fbo.
  (EE)
  (EE) Backtrace:
  (EE) 0: Xwayland (OsSigHandler+0x29)
  (EE) 1: libpthread.so.0 (funlockfile+0x50)
  (EE) 2: libc.so.6 (__memmove_avx_unaligned_erms+0x215)
  (EE) 3: dri/i965_dri.so (_mesa_format_convert+0xab3)
  (EE) 4: dri/i965_dri.so (_mesa_texstore+0x205)
  (EE) 5: dri/i965_dri.so (store_texsubimage+0x28c)
  (EE) 6: dri/i965_dri.so (intel_upload_tex+0x13b)
  (EE) 7: dri/i965_dri.so (texture_sub_image+0x134)
  (EE) 8: dri/i965_dri.so (texsubimage_err+0x150)
  (EE) 9: dri/i965_dri.so (_mesa_TexSubImage2D+0x48)
  (EE) 10: Xwayland (glamor_upload_boxes+0x246)
  (EE) 11: Xwayland (glamor_copy+0x4d1)
  (EE) 12: Xwayland (miCopyRegion+0x96)
  (EE) 13: Xwayland (miDoCopy+0x43c)
  (EE) 14: Xwayland (glamor_copy_area+0x24)
  (EE) 15: Xwayland (damageCopyArea+0xba)
  (EE) 16: Xwayland (compCopyWindow+0x31c)
  (EE) 17: Xwayland (damageCopyWindow+0xd3)
  (EE) 18: Xwayland (miResizeWindow+0x7b7)
  (EE) 19: Xwayland (compResizeWindow+0x3a)
  (EE) 20: Xwayland (ConfigureWindow+0xa96)
  (EE) 21: Xwayland (ProcConfigureWindow+0x7d)
  (EE) 22: Xwayland (Dispatch+0x320)
  (EE) 23: Xwayland (dix_main+0x366)
  (EE) 24: libc.so.6 (__libc_start_main+0xf3)
  (EE) 25: Xwayland (_start+0x2e)
  (EE)
  Fatal server error:
  (EE) Caught signal 11 (Segmentation fault). Server aborting
  (EE)

Check for the possible cases of failure above and fallback to the
regular glamor pixmap creation when an error is detected.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/661
(cherry picked from commit fc6380a11b)
2019-06-05 15:12:31 +02:00
Olivier Fourdan
6711b5c6fd xwayland: Avoid a crash on pointer enter with a grab
On pointer enter notification, Xwayland checks for an existing pointer
warp with a `NULL` sprite.

In turn, `xwl_pointer_warp_emulator_maybe_lock()` checks for an existing
grab and the destination window using `XYToWindow()` which does not
check for the actual sprite not being `NULL`.

So, in some cases, when the pointer enters the surface and there is an
existing X11 grab which is not an ownerEvents grab, Xwayland would crash
trying to dereference the `NULL` sprite pointer:

  #0  __GI_raise ()
  #1  __GI_abort () at abort.c:79
  #2  OsAbort () at utils.c:1351
  #3  AbortServer () at log.c:879
  #4  FatalError () at log.c:1017
  #5  OsSigHandler () at osinit.c:156
  #6  OsSigHandler () at osinit.c:110
  #7  <signal handler called>
  #8  XYToWindow (pSprite=0x0, x=0, y=0) at events.c:2880
  #9  xwl_pointer_warp_emulator_maybe_lock () at xwayland-input.c:2673
  #10 pointer_handle_enter () at xwayland-input.c:434

Avoid the crash by simply checking for the sprite being not `NULL` in
`xwl_pointer_warp_emulator_maybe_lock()`

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Bugzilla: https://bugzilla.redhat.com/1708119
(cherry picked from commit 0a07446318)
2019-06-05 15:12:31 +02:00
Adam Jackson
fbbdd56131 xserver 1.20.5
Signed-off-by: Adam Jackson <ajax@redhat.com>
2019-05-30 14:07:06 -04:00
Peter Hutterer
240868527b dix: leave last.valuators alone on slave switch
Terms:
dev->last.valuator[] is the last value given to us by the driver
dev->valuator.axisVal[] is the last value sent to the client
dev->last.scroll[] is the abs value of the scroll axis as given by the driver,
        used for button emulation calculation (and the remainder)

This function updates the device's last.valuator state based on the current
master axis state. This way, relative motion continues fluidly when switching
between devices. Before mouse 2 comes into effect, it's valuator state is
updated to wherever the pointer currently is so the relative event applies on
top of that.

This can only work for x/y axes, all other axes aren't guaranteed to have the
same meaning and/or may not be present:
- xtest device: no valuator 2
- mouse: valuator 2 is horizontal scroll axis
- tablet: valuator 2 is pressure

Scaling the current value from the pressure range into the range for
horizontal scrolling makes no sense. And it causes scroll jumps:

- scroll down, last.valuator == axisVal == 20
- xdotool click 1, the XTest device doesn't have that valuator
- scroll up
  - updateSlaveDeviceCoords reset last.valuator to 0 (axisVal == 20)
  - DeviceClassesChangedEvent includes value 20 for the axis
  - event is processed, last.value changes from 0 to -1
  - axisVal is updated to -1, causing a jump of -21

The same applies when we switch from tablet to mouse wheel if the pressure
value is 0 on proximity out (basically guaranteed). So let's drop this code
altogether and only leave the scaling for the relative x/y motion.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d7b1753d44)
2019-05-28 14:21:57 -04:00
Olivier Fourdan
5bc29a67b8 glamor: pixmap FBO may not be allocated
If `_glamor_create_tex()` fails to allocate the FBO because of
GL_OUT_OF_MEMORY error, the `pixmap_priv->fbo` is NULL.

However, `glamor_get_pixmap_texture()` doesn't actually check whether
the `pixmap_priv->fbo` is NULL and will segfault with a NULL pointer
dereference trying to access the `pixmap_priv->fbo->tex`.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/647
(Cherry picked from commit 74479a99ec)
2019-05-20 12:11:11 +02:00
Peter Hutterer
d0c7483b3e xwayland: fix a realloc OOM error case
Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(Cherry picked from commit 7c25439f0d)
2019-04-05 12:39:00 +02:00
Olivier Fourdan
bb74db6b38 xwayland: search for a render node to use
wl_drm's protocol "device" event provides the path to the DRM device,
which may not be a render node, thus causing Xwayland to fall back to
DRM authentication which may fail if the user has switched to another
VT while Xwayland is starting.

Search for a render node corresponding to the given DRM device and try
to use it instead, as render nodes do not need DRM authentication and
Xwayland can make use of them if it can find one.

Closes: https://bugs.freedesktop.org/108038
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(Cherry picked from commit 361894497c)
2019-04-05 12:33:28 +02:00
Michel Dänzer
87491ced98 present/scmd: Check that the flip and screen pixmap pitches match
If they don't, flipping will result in corrupted display.

Test case:

* Run Xorg at 1920x1080 with no window manager
* glxgears -geometry 2048x1080
(Cherry picked from commit ef91da2757)
2019-03-25 12:45:52 +01:00
Michel Dänzer
5781563371 xwayland/present: Destroy sync_callback in xwl_present_cleanup
xwl_present_cleanup frees the struct xwl_present_window memory,
so if there's a pending callback, we have to destroy it to prevent
use-after-free in xwl_present_sync_callback.

Should fix issue #645.

Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(Cherry picked from commit 2e18eec6f0)
2019-03-25 12:45:52 +01:00
Michel Dänzer
8e2f5410ce Revert "gitlab-ci: Only run docker-image stage if relevant source files change"
This reverts commit 8694395fcf.

Some scenarios have come to light where this failed to ensure the docker
image exists:

* If the master branch of a forked repository is used for an MR which
  doesn't modify .gitlab-ci.yml, the docker-image job may not run.
* If the docker-image job of the first pipeline in a forked repository
  is cancelled or fails for any reason, and .gitlab-ci.yml isn't
  modified for the next pipeline run.
(Cherry picked from commit 0ec9a13c2a)
2019-03-25 12:45:52 +01:00
Ray Strode
34553f5026 dix: ensure work queues are cleared on reset
If the server resets, most client workqueues are cleaned up as the
clients are killed.

The one exception is the server's client, which is exempt from
the killing spree.

If that client has a queued work procedure active, it won't get
cleared on reset.

This commit ensures it gets cleared too.

(cherry picked from commit 8738ce85df)

Fixes: xorg/xserver#670
2019-03-21 10:29:04 -04:00
Adam Jackson
94f036d412 xserver 1.20.4
Signed-off-by: Adam Jackson <ajax@redhat.com>
2019-02-25 13:31:13 -05:00
Michel Dänzer
9850d20c2a gitlab-ci: Run make distcheck in autotools build & test job
We don't set the PIGLIT_DIR and XTS_DIR environment variables for make
distcheck for now, otherwise it complains about files left behind by
piglit.

(cherry picked from commit 432fad04e7)
2019-02-25 13:07:16 -05:00
Michel Dänzer
fcac9b10c9 glx,xquartz: Fix make distcheck
Guard BUILT_SOURCES and CLEANFILES by XWIN_GLX_WINDOWS/XQUARTZ.

(cherry picked from commit f9bbc9d5ea)
2019-02-25 13:06:58 -05:00
Michel Dänzer
01a03a476a present/wnmd: Allow flipping if the window pixmap matches the toplevel's
Instead of testing window->redirectDraw.

With Xwayland, the toplevel window is always redirected, so this would
unnecessarily preclude flipping there in some cases, e.g. with wlroots
based Wayland compositors or with fullscreen X11 windows in weston.

Fixes issue #631.
(Cherry picked from commit a093a88531)
2019-02-22 11:56:44 +01:00
Michel Dänzer
e5984241ab gitlab-ci: Add autotools build & test job
(Cherry picked from commit 2f12c80175)
2019-02-22 11:56:23 +01:00
Michel Dänzer
de6d87b619 gitlab-ci: Use ccache
Meson picks it up automatically.

Based on:

* https://gitlab.freedesktop.org/mesa/mesa/merge_requests/240
* https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
* https://stackoverflow.com/questions/53659419/ccache-no-hits-in-gitlab-ci

v2 based on the corresponding Mesa change:
* Quote CCACHE_(BASE)DIR environment variables.
* Clear ccache stats in before_script.
* Move cache stanza to the build-and-test job, the cache isn't used in
  the docker-image job.

Reviewed-by: Adam Jackson <ajax@redhat.com> # v1
(Cherry picked from commit b577df7745)
2019-02-22 11:56:01 +01:00
Michel Dänzer
37ad8dd978 gitlab-ci: Add ccache to docker image, and leave in autotools
We're going to make use of these in build & test jobs.
(Cherry picked from commit 537f06e21e)
2019-02-22 11:55:31 +01:00
Michel Dänzer
61eccbcec9 gitlab-ci: Don't rely on $CI_PROJECT_NAME
The name of a forked repository can be changed later, in which case this
would fail to refer to the main repository.

Pointed out by Eric Engestrom in
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/224 .
(Cherry picked from commit fede384962)
2019-02-22 11:54:57 +01:00
Michel Dänzer
e10cfd8fcc gitlab-ci: Only run docker-image stage if relevant source files change
Otherwise there's normally no need to run it. It will also run when a
new branch is created, which ensures that the docker image always exists
(e.g. in a newly forked repository).

Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143
(Cherry picked from commit 8694395fcf)
2019-02-22 11:54:41 +01:00
Michel Dänzer
7246730edf gitlab-ci: Set LC_ALL=C.UTF-8
Although piglit could now handle non-ASCII characters in the
environment, meson was still failing without this (even though it's
using Python 3).

Reviewed-by: Eric Anholt <eric@anholt.net>
(Cherry picked from commit bc6998b728)
2019-02-22 11:53:55 +01:00
Michel Dänzer
8db5a711da test: Use .../piglit instead of .../piglit-*.py
The latter use Python 2 and break with any non-ASCII characters in the
environment, the former uses Python 3 and works fine in that case.

Reviewed-by: Eric Anholt <eric@anholt.net>
(Cherry picked from commit 4aaaf69229)
2019-02-22 11:53:37 +01:00
Michel Dänzer
3314af2d15 gitlab-ci: Docker image can be generated as part of pipeline
This removes the dependency on an externally generated docker image, and
should make it easier to update the docker image or make other changes
related to it.

This is based on Debian testing, because I'm most familiar with Debian.
But it should be easy to base it on another distro.

v2:
* Use kaniko instead of docker-in-docker for image generation, so it can
  also work in unprivileged runners.
* Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
  the image work.
(Cherry picked from commit f56d8e2282)
2019-02-22 11:53:12 +01:00
Michel Dänzer
e8b4e94d51 Drop Travis Linux build in favour of GitLab CI
Fold build-travis-deps.sh into .gitlab-ci.yml.

Preparation for the next change, which would break the Travis Linux
build.

Reviewed-by: Eric Anholt <eric@anholt.net>
(Cherry picked from commit ed44f9cd6a)
2019-02-22 11:52:42 +01:00
Michel Daenzer
4925f38dc0 Make artifacts of piglit results if job fails
Can be useful for figuring out what caused the failure.
(Cherry picked from commit a7472da941)
2019-02-22 11:51:57 +01:00
Michel Daenzer
b6ef90d83b travis: Use a single meson invocation
The prefix setting didn't take for some reason.
(Cherry picked from commit c1bb392b1d)
2019-02-22 11:51:35 +01:00
Adam Jackson
7753fd9989 gitlab: Skip the docker-in-docker step
No idea which cult's cargo I was looking at there. Cuts about a minute
off the build time.

Signed-off-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit a41ccaa085)
2019-02-22 11:50:05 +01:00
Peter Hutterer
524104e15c Xi: lock the input thread for any pointer barrier list manipulation
The input thread checks the barriers for pointer positioning, swapping the
list out from underneath is considered impolite.

Reported-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 678d64aa2e)
2019-02-20 14:27:16 -05:00
Peter Harris
ae9dda1e26 os: Fix GetTimeInMicros resolution
GetTimeInMillis is called first, which sets clockid to
CLOCK_MONOTONIC_COARSE, which is typically much lower resolution than
the callers of GetTimeInMicros want.

Prior to a779fda224, GetTimeInMillis and
GetTimeInMicros did not share a clockid.

Restore the clockid split to fix the granularity of GetTimeInMicros.

Signed-off-by: Peter Harris <pharris@opentext.com>
(cherry picked from commit 937a5b78a2)
2019-02-20 14:26:51 -05:00
A. Wilcox
013c28a122 DRI2: Add another Coffeelake PCI ID
A user of Adélie Linux reported that modesetting wasn't working properly on
their Intel i7-9700K-integrated UHD 630 GPU.  Xorg.0.log showed:

[   131.902] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x8086 / 0x3e98
[   131.902] (EE) modeset(0): Failed to initialize the DRI2 extension.

Indeed, that PCI ID is missing from i965_pci_ids.  Adding it fixed the issue
and allowed the system to work with i965_dri under modesetting.

(cherry picked from commit d3a26bbf61)
2019-02-20 14:26:12 -05:00
Adam Jackson
a51d7a730c vnd: Fix a silly memory leak
'disp' was already allocated by LookupVendorPrivDispatch above,
clobbering it will do no good.

Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 709c656297)
2019-02-20 14:26:07 -05:00
Adam Jackson
544d0e961c mi: When {en,dis}abling extensions, match names case-insensitively
Both because extension names are inconsistently capitalized on the wire,
and because the table we're walking spells it COMPOSITE not Composite.
The latter is certainly also a bug, but there's no reason for us to be
that strict.

Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit bf991a5f98)
2019-02-20 14:26:02 -05:00
Adam Jackson
2215e8c7cf dri3: Fix XACE access mode for open and get_supported_modifiers
Neither opening a screen nor querying its modifiers confers the right to
attach the buffer for any particular pixmap. GetAttr seems more correct.

Fixes: xorg/xserver#550
(cherry picked from commit 086c2e3de5)
2019-02-20 14:25:58 -05:00
Michel Dänzer
59e0b5f041 xfree86/modes: Don't clobber gamma LUT of compatibility output's CRTC
If the driver calls xf86HandleColormaps, CMapChangeGamma updates the HW
gamma LUT of all CRTCs via xf86RandR12LoadPalette. However,
xf86RandR12ChangeGamma was then clobbering the gamma LUT of the RandR
1.2 compatibility output's CRTC with the gamma curves computed from the
screen's global gamma values.

Fix this by bailing if xf86RandR12LoadPalette is installed.

Fixes: 02ff0a5d7e "xf86RandR12: Fix XF86VidModeSetGamma triggering a
                     BadImplementation error"
(cherry picked from commit 30044b2253)
2019-02-20 14:25:49 -05:00
Maya Rashish
712d0e86aa xfree86: Try nouveau on NetBSD as well.
(cherry picked from commit e3fb178617)
2019-02-20 14:25:31 -05:00
Maya Rashish
ff1d1692e7 Fix typo in error message
(cherry picked from commit bf2a7bb4ff)
2019-02-20 14:25:28 -05:00