Commit Graph

7765 Commits

Author SHA1 Message Date
Giuseppe Bilotta
6828645916 Xephyr: free driverPrivates on Fini
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-11-06 16:49:14 -05:00
Daniel Martin
d5379b350f Use ARRAY_SIZE all over the tree
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with
the ARRAY_SIZE macro from dix.h when possible. A semantic patch for
coccinelle has been used first. Additionally, a few macros have been
inlined as they had only one or two users.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-30 13:45:20 -04:00
Daniel Martin
04a305121f modesetting: Fix potential buffer overflow
If one misconfigures a ZaphodHeads value (more than 20 characters
without a delimiter), we get an overflow of our buffer.  Use
xstrtokenize() instead of writing/fixing our own tokenizer.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-30 13:44:34 -04:00
Alex Goins
266d9868ca xf86-video-modesetting: Fix ms_queue_vblank(flags = MS_QUEUE_RELATIVE)
Change 677c32bc refactored all usages of drmWaitVBlank() into a helper function,
ms_queue_vblank().

ms_queue_vblank() takes in an MS_QUEUE_RELATIVE flag to indicate that the
sequence number is relative rather than absolute, but still treats the actual
sequence number as absolute, passing it through ms_crtc_msc_to_kernel_msc()
unconditionally before calling drmWaitVBlank().

ms_crtc_msc_to_kernel_msc() works by subtracting a vblank offset from the
provided sequence number, which only makes sense for absolute sequence numbers.
In the case of PRIME Sync, drmmode_SharedPixmapPrsentOnVBlank() passes in 1,
which results in a large negative vblank offset. After subtracting, we're left
with a relative sequence number of 100,000+, i.e. wait for 100,000+ vblanks...

In the relative case we want to pass in the sequence number unmodified. Simply
add a check to do this.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-10-27 10:00:47 -04:00
Alex Goins
68d95e759f ramdac: Check ScreenPriv != NULL in xf86ScreenSetCursor()
Similar to change cba5a10f, xf86ScreenSetCursor() would dereference ScreenPriv
without NULL checking it. If Option "SWCursor" is specified, ScreenPriv == NULL.

Without this fix, it is observed that setting Option "SWCursor" "on" on the
modesetting driver in a PRIME configuration will segfault the server.

It is important to return success rather than failure in the instance that
ScreenPriv == NULL and pCurs == NullCursor, because otherwise xf86SetCursor()
can fall into infinite recursion: xf86SetCursor(pCurs) calls
xf86ScreenSetCursor(pCurs), and if FALSE, calls xf86SetCursor(NullCursor). If
xf86ScreenSetCursor(NullCursor) returns FALSE, it calls
xf86SetCursor(NullCursor) again and this repeats forever.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-10-25 09:52:44 -04:00
Lyude Paul
4d53e30651 meson: Don't use '' in link_with, ever
String arguments as elements in the array passed to the link_with
argument in meson's executable() functions are not valid and will end up
causing the build file generation to file. This actually ended up
exposing a bug in meson that caused it not to report where in the
meson.build file it was failing:

https://github.com/mesonbuild/meson/pull/2527

The proper way to have a variable that can contain either an empty link
target or an actual link target is:

some_target = []
if some_cond
    some_target = static_library(...)
endif

This way if some_cond is False, some_target gets set to [], gets passed
to executable() in the link_with array, and then gets removed by array
flattening.

This also unbreaks Xwayland builds with -Dglx=false, the thing that
originally made me notice this.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-10-24 10:53:56 -04:00
Daniel Martin
f44935cdb7 modesetting: Use helper to fetch drmModeProperty(Blob)s
Replace the various loops to lookup drmModeProperty(Blob)s by
introducing helper functions.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2017-10-23 11:40:31 -04:00
Daniel Martin
6abdb54a11 modesetting: Fix leak of tile_blob in drmmode_output_destroy
And drmModeFreePropertyBlob() can handle NULL pointers, no need to check
edid_blob.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2017-10-23 11:24:47 -04:00
Daniel Martin
8d7f7e2426 modesetting: Check crtc before searching link-status property
No need to lookup the link-status property if we don't have a crtc.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-20 15:25:50 -04:00
Daniel Martin
8c455db0eb modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
XF86_PDEV_SERVER_FD is defined since:

    commit 5fb641a29b
    Author: Hans de Goede <hdegoede@redhat.com>
    Date:   Mon Jan 13 12:03:46 2014 +0100

        hotplug: Extend OdevAttributes for server-managed fd support

ifdef'ing for it is a leftover from the external xf86-video-modesetting.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-20 15:25:45 -04:00
Daniel Martin
66d8cbf8ce modesetting: Fix warning of unused variable if not GLAMOR_HAS_GBM
../hw/xfree86/drivers/modesetting/driver.c: In function ‘redisplay_dirty’:
../hw/xfree86/drivers/modesetting/driver.c:586:20: warning: unused variable ‘ms’ [-Wunused-variable]
     modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));

Move the variable ms into #ifdef GLAMOR_HAS_GBM, where it is used.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-20 15:25:40 -04:00
Lyude Paul
0debe01190 meson: Silence -Wformat-nonliteral for x86emu
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-20 13:15:35 -04:00
Lyude Paul
cbca18c551 x86emu: Fix type conversion warnings on x86_64 with DEBUG
Warnings come from the fact that PRIx32 is not used for printing 32 bit
values instead of "%lx", and "%lx" evaluates to a 64 bit long on 64 bit
systems while PRIx32 always evaluates to the right type for the
respective arch.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-20 13:15:32 -04:00
Lyude Paul
01470ce0a9 fbdevhw: Fix inconsistent #if DEBUG usage
fbdevhw is the only file in X's source that actually uses #if DEBUG to
check for debugging instead of #ifdef DEBUG. This is contrary to
everything else that checks the DEBUG macro in the source, so let's make
it consistent and in turn, make our meson files a little simpler.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-20 13:15:25 -04:00
Jon Turney
a10b4fcdc0 meson: Fix linkage of loadable modules for PE/COFF
For the loadable modules it makes sense to build for PE/COFF targets, link
those loadable modules with the import library for the Xorg executable, so
that symbols provided by the executable can be satisfied at link time (as
required by PE/COFF).

Since this uses the syntax of using the returned build target object from an
executable() with an implib: kwarg to link_with:, introduced in meson 0.42
and a syntax error with older meson, also update the minimum meson version
which we require in project() to that.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-10-12 15:22:04 -04:00
Jon Turney
d43b1ca852 meson: Fix underlinkage of shadow loadable module
Future work: probably some other modules are underlinked?

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-10-12 15:22:04 -04:00
Nathan Kidd
1b1d4c0469 hw/xfree86: unvalidated lengths
This addresses:
CVE-2017-12180 in XFree86-VidModeExtension
CVE-2017-12181 in XFree86-DGA
CVE-2017-12182 in XFree86-DRI

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Nathan Kidd <nkidd@opentext.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2017-10-10 23:33:44 +02:00
Nathan Kidd
cad5a1050b Unvalidated lengths
v2: Add overflow check and remove unnecessary check (Julien Cristau)

This addresses:
CVE-2017-12184 in XINERAMA
CVE-2017-12185 in MIT-SCREEN-SAVER
CVE-2017-12186 in X-Resource
CVE-2017-12187 in RENDER

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Nathan Kidd <nkidd@opentext.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2017-10-10 23:33:34 +02:00
Keith Packard
677c32bcda xf86-video-modesetting: Add ms_queue_vblank helper [v3]
This provides an API wrapper around the kernel interface for queueing
a vblank event, simplifying all of the callers.

v2: Fix missing '|' in computing vbl.request.type

v3: Remove spurious bit of next patch (thanks, Michel Dänzer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-04 15:17:41 -04:00
Adam Jackson
1d1ff1142a dmx: More const correctness
Fixes several dozen cases like:

../hw/dmx/examples/ev.c: In function ‘main’:
../hw/dmx/examples/ev.c:147:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
                         tmp = "X";
                             ^

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-04 11:19:06 -04:00
Adam Jackson
eb25facb37 dmx: Fix a silly redeclaration bug
../hw/dmx/dmx.c:66:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls]
 extern int PanoramiXNumScreens;
            ^~~~~~~~~~~~~~~~~~~
In file included from ../hw/dmx/dmx.c:65:0:
../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here
 extern _X_EXPORT int PanoramiXNumScreens;
                      ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-04 11:18:49 -04:00
Keith Packard
37f4e7651a modesetting: Skip no-longer-present connectors when resetting BAD links
Outputs may have NULL mode_output (connector) pointers if the
connector disappears while the server is running. Skip these when
resetting outputs with BAD link status.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-26 15:46:48 -04:00
Adam Jackson
147b4602f9 xfree86: Hush some warnings when Xv is disabled
Spotted by Appveyor:

xf86Crtc.c:3281:1: warning: ‘xf86_crtc_box_area’ defined but not used [-Wunused-function]
 xf86_crtc_box_area(BoxPtr box)
 ^~~~~~~~~~~~~~~~~~
xf86Crtc.c:3268:1: warning: ‘x86_crtc_box’ defined but not used [-Wunused-function]
 x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
 ^~~~~~~~~~~~
xf86Crtc.c:3256:1: warning: ‘x86_crtc_box_intersect’ defined but not used [-Wunused-function]
 x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
 ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-09-26 10:42:55 -04:00
Nick Sarnie
84e3b96b53 suid: Include sysmacros.h to fix build after glibc-2.25
[Added HAVE_SYS_SYSMACROS_H guard - ajax]

Signed-off-by: Nick Sarnie <commendsarnex@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-25 13:04:25 -04:00
Eric Anholt
5cbfa27654 test: Add basic SYNC tests.
I couldn't find any, and I was modifying the implementation, so I had
to write some.  I would like the test to end with a "make sure there
weren't any stray unchecked errors", but I didn't figure out how to do
that.

v2: Extend sync tests to cover alarm delta and waitvalue changes.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-09-20 13:19:27 -04:00
Eric Anholt
a09743c930 meson: Move Xvfb build under an option.
Autotools also had it as an option.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-20 13:19:21 -04:00
Jon Turney
7d0728d6c4 Revert "dmx: fix linking"
Since commit 3ef16dfb98, "dmx: fix
linking", linking dmx is broken for me:

  CCLD     Xdmx.exe
../../render/.libs/librender.a(glyph.o): In function `HashGlyph':
/wip/xserver/build.x86_64/../render/glyph.c:168: undefined reference to `x_sha1_init'
/wip/xserver/build.x86_64/../render/glyph.c:174: undefined reference to `x_sha1_update'
/wip/xserver/build.x86_64/../render/glyph.c:177: undefined reference to `x_sha1_update'
/wip/xserver/build.x86_64/../render/glyph.c:180: undefined reference to `x_sha1_final'
../../render/.libs/librender.a(mipict.o): In function `miClipPictureReg':
/wip/xserver/build.x86_64/../render/mipict.c:233: undefined reference to `pixman_region_n_rects'
/wip/xserver/build.x86_64/../render/mipict.c:234: undefined reference to `pixman_region_n_rects'
/wip/xserver/build.x86_64/../render/mipict.c:235: undefined reference to `pixman_region_rectangles'
/wip/xserver/build.x86_64/../render/mipict.c:236: undefined reference to `pixman_region_rectangles'
/wip/xserver/build.x86_64/../render/mipict.c:248: undefined reference to `pixman_region_init'
/wip/xserver/build.x86_64/../render/mipict.c:251: undefined reference to `pixman_region_not_empty'
/wip/xserver/build.x86_64/../render/mipict.c:261: undefined reference to `pixman_region_not_empty'
../../render/.libs/librender.a(mipict.o): In function `miComputeCompositeRegion':
/wip/xserver/build.x86_64/../render/mipict.c:340: undefined reference to `pixman_region_init'

The change this was fixing appears to be effectively reverted by
542d9f6807, so just revert commit
3ef16dfb98.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-18 13:00:54 -04:00
Dawid Kurek
fbd80b2c8e modesetting: Blacklist EVDI devices from PRIME sync
UDL (usb) devices are blacklisted because of they weird behaviour when
it comes to vblank events. As EVDI uses very similar model of handling
vblanks it should be treated similarly.

When doing a page flip, EVDI does not wait for real vblank, but
simulates it by adding constant delay. It also does not support
DRM_IOCTL_WAIT_VBLANK.

In contrast to UDL, EVDI uses platform devices, thus instead of 'usb' in
path they all have 'platform'.

It is possible to blacklist by 'platform', so without explicitly saying
'evdi', but it might be misleading when it comes to real reason for it.

Signed-off-by: Dawid Kurek <dawid.kurek@displaylink.com>
2017-09-13 14:40:58 -04:00
Emil Velikov
eac1a2e37b dri2: sort DRI2InfoPtr::version checking in ascending order
Makes it easer to follow if 8 is between 7 and 9 ;-)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-09-13 14:38:06 -04:00
Roman Gilg
82df2ce38c xwayland: Avoid repeatedly looping through window ancestor chain
Calling xwl_window_from_window means looping through the window ancestor
chain whenever it is called on a child window or on an automatically
redirected window.

Since these properties and the potential ancestor's xwl_window are constant
between window realization and unrealization, we can omit the looping by
always putting the respective xwl_window in the Window's private field on
its realization. If the Window doesn't feature an xwl_window on its own,
it's the xwl_window of its first ancestor with one.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-09-13 11:51:10 -04:00
Olivier Fourdan
1089d5d518 xwayland: add envvar XWAYLAND_NO_GLAMOR
Not all compositors allow for customizing the Xwayland command line,
gnome-shell/mutter for example have the command line and path to
Xwayland binary hardcoded, which makes it harder for users to disable
glamor acceleration in Xwayland (glamor being used by default).

Add an environment variable XWAYLAND_NO_GLAMOR to disable glamor support
in Xwayland.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-13 11:21:16 -04:00
Eric Anholt
5abaa50b29 meson: Move the BUILD_DATE/TIME setup to configure time.
By having it as a custom_target with build_always, every "ninja -C
build" would rebuild Xorg for the new date/time, even if the rest of
Xorg didn't change.

We could build the rest of Xorg into a static lib, and regenerate
date/time when the static lib changes and link that into a final Xorg,
but BUILD_DATE/TIME is such a dubious feature (compared to including a
git sha, which is easy with meson) it doesn't seem worth the build
time cost.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-13 11:14:57 -04:00
Eric Anholt
05e7e8b587 meson: Include BUILD_DATE in the meson xf86Build.h.
Due to a typo, I only had BUILD_TIME present.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-13 11:14:53 -04:00
Eric Anholt
2b080a14c8 meson: Respect SOURCE_DATE_EPOCH for reproducible builds.
This just copies over Chris Lamb's code from autotools.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-13 11:14:50 -04:00
Emil Velikov
17e4885700 xwayland: use the lowercase xnf.*alloc API
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-06 08:56:39 +10:00
Olivier Fourdan
cdd0352ba0 xwayland: Fix a segfault with pointer locking
Xwayland would crash in some circumstances while trying to issue a
pointer locking when the cursor is hidden when there is no seat focus
window set.

The crash signature looks like:

 #0  zwp_pointer_constraints_v1_lock_pointer ()
 #1  xwl_pointer_warp_emulator_lock () at xwayland-input.c:2584
 #2  xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2756
 #3  xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2765
 #4  xwl_seat_cursor_visibility_changed () at xwayland-input.c:2768
 #5  xwl_set_cursor () at xwayland-cursor.c:245
 #6  miPointerUpdateSprite () at mipointer.c:468
 #7  miPointerDisplayCursor () at mipointer.c:206
 #8  CursorDisplayCursor () at cursor.c:150
 #9  AnimCurDisplayCursor () at animcur.c:220
 #10 ChangeToCursor () at events.c:936
 #11 ActivatePointerGrab () at events.c:1542
 #12 GrabDevice () at events.c:5120
 #13 ProcGrabPointer () at events.c:4908
 #14 Dispatch () at dispatch.c:478
 #15 dix_main () at main.c:276

xwl_pointer_warp_emulator_lock() tries to use the surface from the
xwl_seat->focus_window leading to a NULL pointer dereference when that
value is NULL.

Check that xwl_seat->focus_window is not NULL earlier in the stack in
xwl_seat_maybe_lock_on_hidden_cursor() and return early if not the case
to avoid the crash.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102474
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-05 11:35:40 +10:00
Olivier Fourdan
3fbc3c3eef xwayland: No grab handler without protocol support
If the compositor has no support for the Xwayland keyboard grab
protocol, there is no need to set-up our keyboard grab handler.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-04 14:22:28 +10:00
Emil Velikov
591ac95f73 xwin: automake: remove unused {SRCS, DEFS}_{NATIVEGDI, PRIMARYFB}
Left over from the following commits:

8465ee788f xwin: Remove native GDI engine (v2)
c79f824bf6 xwin: Remove primary DirectDraw engine

v2: drop leading - in the makefile

Cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> (v1)
2017-08-22 10:59:41 -04:00
Emil Velikov
69fe6156ec xwin: remove always true/set XWIN_RANDR conditional/define
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:41 -04:00
Emil Velikov
8f1a200d0b xwin: remove always true/set XWIN_MULTIWINDOW conditional/define
v2: drop trailing endif (Jon)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:41 -04:00
Emil Velikov
9d00f6190a xwin: remove always true/set XWIN_CLIPBOARD conditional/define
v2: drop trailing endif (Jon)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:41 -04:00
Emil Velikov
1ef6569225 os: make MitGenerateCookie() independent of XCSECURITY
Analogous to previous commit.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:40 -04:00
Emil Velikov
292ee71516 os: make GenerateRandomData() independent of XCSECURITY
The function itself does not depend on the macro. Move it outside
of the ifdef guard and remove the identical copy in XWIN.

This is step 1 towards removing the duplication in winauth.c and moving
the OS specifics to os/

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:40 -04:00
Emil Velikov
8aee1f40ea xwin/glx: remove unused __GLXWinScreen::glx_enable_bits
All the relevant code already uses the ::base::glx_enable_bits one.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-08-22 10:59:40 -04:00
Adam Jackson
51bab63b73 glx: Remove True/False defines
Those are xlib spellings, we say TRUE/FALSE pretty consistently
elsewhere in the server.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-08-21 10:12:54 -04:00
Michel Dänzer
8e3b26ceaa Make PixmapDirtyUpdateRec::src a DrawablePtr
This allows making the master screen's pixmap_dirty_list entries
explicitly reflect that we're now tracking the root window instead of
the screen pixmap, in order to allow Present page flipping on master
outputs while there are active slave outputs.

Define HAS_DIRTYTRACKING_DRAWABLE_SRC for drivers to check, but leave
HAS_DIRTYTRACKING_ROTATION defined as well to make things slightly
easier for drivers.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-08-15 17:01:39 +09:00
Eric Anholt
2d50e32e0b meson: Fix xwayland build since xwayland-keyboard-grab.
The version detect was erroring out with 1.9 protos installed, and we
weren't building the new code.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-02 09:39:04 +01:00
Olivier Fourdan
0a448d133f xwayland: Add grab protocol support
The keyboard grabbing protocol for Xwayland is included in
wayland-protocol 1.9.

Update the wayland-protocol required version in both configure and meson
builds and add support for this new protocol in Xwayland.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-01 10:56:42 +01:00
Adam Jackson
3050d27761 xfree86: Fix X -configure driver sort yet again
There were two bugs here: The comparison function was not stable when
one or more of the drivers being compared is a fallback, and the last
driver in the list would never be moved.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-07-31 10:57:22 -04:00
Adam Jackson
6f9939525c modesetting: Fix PCI initialization on non-zero domains
libdrm's busid matching for the legacy three-integer bus string format
simply ignores the domain number, rather than what we were doing here of
packing the domain into the bus number. Whatever, just use the existing
code to build a busid string, since that gets the domain right.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-07-31 10:55:52 -04:00