Commit Graph

15940 Commits

Author SHA1 Message Date
Adam Jackson
0803918e64 fb: Remove 24bpp support (v3)
v2:
- Require power-of-two bpp in ScreenInit
- Eliminate fbCreatePixmapBpp

v3
- Squash in the exa and glamor changes so we can remove pRotatedPixmap
  in the same stroke.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-17 15:14:42 -04:00
Adam Jackson
e33be78e2a xfree86: Remove 24bpp pixmap format support (v2)
There's really no reason to pretend to support this, apps hate it, all
we're doing is giving people a way to injure themselves. It doesn't work
anyway with any Radeon, any NVIDIA chip, or any Intel chip since i810.
Rip out all the logic for handling 24bpp pixmaps and framebuffers, and
silently ignore the old options that would ask for it.

The cirrus alpine driver has been updated to default to 16bpp, and both
it and the i810 driver can now use the 32->24 conversion code in shadow
if they want. All other drivers support 32bpp. Configurations that
explicitly request 24bpp in order to fit in VRAM will be broken now
though.

v2: Fix command line options to silently ignore 24bpp rather than fail

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-17 15:14:38 -04:00
Adam Jackson
83c4297d2c ephyr: Don't clobber bitsPerPixel when using glamor
This ends up passing 0 as the bpp argument to fb screen setup, which is
not really the best plan.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-17 15:14:21 -04:00
Eric Anholt
fe0b297420 glamor: Fix dashed line rendering.
We were binding the screen pixmap as the dash and sampling its alpha,
which is usually just 1.0 (no dashing at all).

Please cherry-pick this to active stable branches.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-03-16 11:30:58 -07:00
Adam Jackson
5b5ba7dc3d Revert "sdksyms: Tighten up the symbols we add to the magic table"
Enough people are reporting build issues pointing at this commit that
it's not worth the benefit.

This reverts commit 3dad57b121.
2017-03-16 14:19:37 -04:00
Adam Jackson
e337de2d48 xinerama: Implement graphics exposures for window->pixmap copies (v4)
This code is using GetImage to accumulate a logical view of the window
image (since the windows will be clipped to their containing screen),
and then PutImage to load that back into the pixmap.  What it wasn't
doing was constructing a region for the obscured areas of the window and
emitting graphics exposures for same.

v2: Fix coordinate translation when the source is the root window
v3: Create sourceBox with the right coordinates initially instead of
translating (Keith Packard)
v4: Clamp the region to 15 bits to avoid overflow (Keith Packard)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-15 16:16:36 -04:00
Adam Jackson
f1f865e909 parser: Fix crash when xf86nameCompare(s1 = x, s2 = NULL)
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-15 16:07:10 -04:00
Olivier Fourdan
455051a0f1 glamor: Check glamor_set_destination_drawable() return value
Check the value returned by glamor_set_destination_drawable() and use
the fallback code path where possible.

Bugzilla: https://bugzilla.redhat.com/1417575
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2017-03-15 15:41:13 -04:00
Olivier Fourdan
04b4bad7c0 glamor: glamor_set_destination_drawable() can fail
The fbo_array of a given glamor pixmap can be NULL in some cases, as
glamor_create_fbo_array() can fail to allocate the FBO array.

If this is the case, glamor_pixmap_fbo_at() will return NULL even though
the box index is valid, and glamor_set_destination_drawable() simply
assumes glamor_pixmap_fbo_at() will return an FBO prior to pass the
value to glamor_set_destination_pixmap_fbo(), which will segfault.

We need a way for glamor_set_destination_drawable() to fail safely and
let the caller know about the failure.

Add a boolean return value to glamor_set_destination_drawable() for that
purpose.

Bugzilla: https://bugzilla.redhat.com/1417575
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2017-03-15 15:41:12 -04:00
Olivier Fourdan
b0ce1d088a Xephyr: Check screen resources creation success
If the screen pixmap or the corresponding texture creation with glamor
fails, exit cleanly with an error message instead of segfaulting.

Fixes: https://bugzilla.redhat.com/1431633
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2017-03-15 15:36:52 -04:00
Olivier Fourdan
f40ff18c96 glamor: Check for NULL pixmap in glamor_get_pixmap_texture()
glamor_create_pixmap() would return a NullPixmap if the given size is
larger than the maximum size of a pixmap.

But glamor_get_pixmap_texture() won't check if the given pixmap is
non-null, leading to a segfault if glamor_create_pixmap() failed.

This can be reproduced by passing Xephyr a very large screen width,
e.g.:

 $ Xephyr -glamor -screen 32768x1024 :10

 (EE)
 (EE) Backtrace:
 (EE) 0: Xephyr (OsSigHandler+0x29)
 (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0)
 (EE) 2: Xephyr (glamor_get_pixmap_texture+0x30)
 (EE) 3: Xephyr (ephyr_glamor_create_screen_resources+0xc6)
 (EE) 4: Xephyr (ephyrCreateResources+0x98)
 (EE) 5: Xephyr (dix_main+0x275)
 (EE) 6: /lib64/libc.so.6 (__libc_start_main+0xf1)
 (EE) 7: Xephyr (_start+0x2a)
 (EE) 8: ? (?+0x2a) [0x2a]
 (EE)
 (EE) Segmentation fault at address 0x0
 (EE)
 Fatal server error:
 (EE) Caught signal 11 (Segmentation fault). Server aborting
 (EE)
 Aborted (core dumped)

Bugzilla: https://bugzilla.redhat.com/1431633
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2017-03-15 15:36:44 -04:00
Adam Jackson
646bc74cde test: Fix distcheck failures
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-14 12:28:24 -04:00
Jon TURNEY
bca2216090 xfree86: work around a sdksyms problem with gcc5 on Cygwin
The linemarkers in the preprocessor output from gcc5 on Cygwin have
canonicalized paths to included files (e.g. xserver/build/../include/misc.h
is canonicalized to xserver/build/include/misc.h). (see gcc svn rev 210264,
which causes the transformation performed by -fcanonical-system-headers to
be applied to all include pathnames)

These canonicalized paths won't match $topdir, so sdksyms doesn't look at
the contents of those headers for sdk exported symbols.

Workaround this by canonicalizing all the paths we consider, using readlink.

v2:
Keep a cache of readlink results so it isn't quite so dreadfully slow.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-03-14 11:51:37 -04:00
Tobias Stoeckmann
ac15d4cecc render: Fix out of boundary heap access
ProcRenderCreateRadialGradient and ProcRenderCreateConicalGradient must
be protected against an integer overflow during length check. This is
already included in ProcRenderCreateLinearGradient since the fix for
CVE-2008-2362.

This can only be successfully exploited on a 32 bit system for an
out of boundary read later on. Validated by using ASAN.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-03-13 16:54:20 -04:00
Michel Dänzer
0c1574d988 glamor: Fix typo: "vec2_pos" -> "vec2 pos"
Fixes crash when trying to use dashed lines:

 Failed to compile VS: 0:8(2): error: `vec2_pos' undeclared

Trivial.

Fixes: 	d8161aeb50 ("glamor: Fix missing declaration in dash vertex
                       shader")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99943
2017-03-09 18:13:31 +09:00
Olivier Fourdan
937527f979 xwayland: Monitor client states to destroy callbacks
Client resources can survive the client itself, in which case we
may end up in our sync callback trying to access client's data after
it's been freed/reclaimed.

Add a ClientStateCallback handler to monitor the client state changes
and clear the sync callback set up by the glamor drm code if any.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100040
Tested-by: Mark B <mark.blakeney@bullet-systems.net>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-03-09 17:37:05 +09:00
Jon Turney
669eb0a654 test: Use correct signature for XISetEventMask wrapper
This looks like it's always been wrong, but didn't matter before the single
test binary changes as the wrapper was only in place for tests which didn't
care about it's effects, so didn't forward to the real implementation. (see
the changes to protocol-xiselectevents.c in 773fc07e)

This fixes the protocol_xigetselectedevents_test for me.  I'm a bit
surprised that passes for anyone at the moment.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-09 14:07:58 +10:00
Qiang Yu
9232835bd1 glamor: use drmGetDeviceNameFromFD2 when available
This is for glamor can support fd from DRM render node which is useful
for a render only DDX.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
2017-03-07 16:00:27 -05:00
Olivier Fourdan
d4b7e0eaa4 xwayland: clear cursor frame callback
After an X cursor is unrealized, the seat's corresponding x_cursor is
cleared, but if a frame callback was pending at the time, it will
remain and thus prevent any further cursor update, leaving the window
with no cursor.

Make sure to destroy the frame callback, if any, when that occurs, so
that next time a cursor needs to be set, it won't be ignored for a frame
callback that will never be triggered.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389327
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Rui Matos <tiagomatos@gmail.com>
2017-03-07 15:51:07 -05:00
Olivier Fourdan
64ca14b85e xwayland: make sure client is not gone in sync callback
in XWayland, dri3_send_open_reply() is called from a sync callback, so
there is a possibility that the client might be gone when we get to the
callback eventually, which leads to a crash in _XSERVTransSendFd() from
WriteFdToClient() .

Check if clientGone has been set in the sync callback handler to avoid
this.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99149
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100040
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1416553
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Tested-by: Mark B <mark.blakeney@bullet-systems.net>
2017-03-06 18:37:16 -05:00
Adam Jackson
5c44169cae os: Squash missing declaration warning for timingsafe_memcmp
timingsafe_memcmp.c:21:1: warning: no previous prototype for ‘timingsafe_memcmp’ [-Wmissing-prototypes]
 timingsafe_memcmp(const void *b1, const void *b2, size_t len)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-02 17:20:30 -05:00
Adam Jackson
0d7f05ed99 miarc: "Cache" arc span data for dashed arcs
This avoids recomputing the span data for every dash. x11perf thinks
this is a pretty modest speedup:

    832919.4       840471.1 ( 1.009)   100-pixel dashed ellipse
    672353.1       680652.2 ( 1.012)   100-pixel double-dashed ellipse
     13748.9        24287.9 ( 1.767)   100-pixel wide dashed ellipse
      9236.3        21298.2 ( 2.306)   100-pixel wide double-dashed ellipse

But part of the reason it's so modest there is that the arcs are
relatively small (100 pixel diameter at line width 10, so ~6000 pixels)
and the dashes relatively large (30 on 20 off so ~6 dashes per
quadrant).

With larger arcs and finer dashes this is much more impressive. A fairly
trivial testcase of a single 15000x13000 arc with the default {2, 2}
dash pattern drops from ~3500 milliseconds to 10 milliseconds.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-02 11:08:39 -05:00
Adam Jackson
849c825855 miarc: Make the caller free the arc span data
drawArc does some fairly expensive computation, but it's only sensitive
to arc width/height. Thread the span data up through the call chain so
it's at least possible for the caller to cache things.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-02 11:08:39 -05:00
Adam Jackson
9426c5500b miarc: Style cleanup for miWideArc
Outdent, normalize comment formatting, and use 'goto out' idiom for
error paths. No functional change.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-02 11:08:39 -05:00
Olivier Fourdan
fe5c340046 xwayland: do not set checkRepeat on master kbd
keyboard_check_repeat() fetches the XWayland seat from the
dev->public.devicePrivate do do its thing.

If a key event is sent programmatically through Xtest, our device is the
virtual core keyboard and that has a dev->public.devicePrivate of NULL,
leading to a segfault in keyboard_check_repeat().

This is the case with "antimicro" which sends key events based on the
joystick buttons.

Don't set the checkRepeat handler on the VCK since it cannot possibly work
anyway and it has no effect on the actual checkRepeat intended functionality.

Bugzilla: https://bugzilla.redhat.com/1416244
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-03-02 09:34:44 +10:00
Adam Jackson
27819950e4 kdrive: Remove now-unused linux backend
With Xfbdev gone this has no consumers.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01 17:51:09 -05:00
Adam Jackson
feed7e3f98 xfbdev: Remove
With the shadow framebuffer overallocation bug fixed (ref below), Xorg +
fbdev has tens to hundreds of kilobytes more baseline memory usage than
Xfbdev. That's not nothing, but it's little enough that we should focus
our efforts on the server that actually gets development attention.

https://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev/commit/?id=2c5eba8

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01 17:51:04 -05:00
Adam Jackson
35fbcb3f99 xfake: Remove
We already have Xvfb for a dummy DDX.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01 17:51:02 -05:00
Adam Jackson
3dad57b121 sdksyms: Tighten up the symbols we add to the magic table
The code as written would match anything declared extern. _X_EXPORT is
what we really mean here. That's a macro, so check for what it expands
to and skip if not found.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-01 17:50:16 -05:00
Matthieu Herrb
386fbbe410 Brown bag commit to fix 957e8d (arc4random_buf() support)
- typo in #ifdef check
- also need to add AC_CHECK_FUNCS([arc4random_buf])

Reported-by Eric Engestrom. Thanks

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-03-01 15:05:01 -05:00
Adam Jackson
dc7ceda90f dispatch: Mark swapped dispatch as _X_COLD
This touches everything that ends up in the Xorg binary; the big missing
part is GLX since that's all generated code. Cuts about 14k from the
binary on amd64.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-01 10:16:20 -05:00
Olivier Fourdan
8c9909a992 xwayland: Make sure we have a focus window
During the InitInput() phase, the wayland events get dequeued so we
can possibly end up calling dispatch_pointer_motion_event().

If this occurs before xwl_seat->focus_window is set, it leads to a NULL
pointer derefence and a segfault.

Check for xwl_seat->focus_window in both pointer_handle_frame() and
relative_pointer_handle_relative_motion() prior to calling
dispatch_pointer_motion_event()  like it's done in
pointer_handle_motion().

Bugzilla: https://bugzilla.redhat.com/1410804
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-03-01 13:56:48 +10:00
Adam Jackson
c9cbdada75 vfb: Bump default depth to 24
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-02-28 14:31:14 -05:00
Matthieu Herrb
2855f759b1 auth: remove AuthToIDFunc and associated functions. Not used anymore.
And the current code for MitToId has a use-after-free() issue.

[Also remove the actual implementations - ajax]

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-02-28 14:15:19 -05:00
Matthieu Herrb
957e8db38f Use arc4random_buf(3) if available to generate cookies.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-02-28 14:02:37 -05:00
Matthieu Herrb
d7ac755f0b Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624
Provide the function definition for systems that don't have it.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-02-28 13:59:14 -05:00
Peter Hutterer
1b12249fd6 os: log a bug whenever WriteToClient is called from the input thread
The input thread should generate events, not send them. Make it easier to
find the instances where it's doing so.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2017-02-27 09:25:08 +10:00
Olivier Fourdan
7d7788e0f2 Revert "xwayland: bump wayland-protocols version to 1.7"
This reverts commit 371ff0c969.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-02-23 14:02:36 -05:00
Pekka Paalanen
9f4d308cda xwayland: use _XWAYLAND_ALLOW_COMMITS property
The X11 window manager (XWM) of a Wayland compositor can use the
_XWAYLAND_ALLOW_COMMITS property to control when Xwayland sends
wl_surface.commit requests. If the property is not set, the behaviour
remains what it was.

XWM uses the property to inhibit commits until the window is ready to be
shown. This gives XWM time to set up the window decorations and internal
state before Xwayland does the first commit. XWM can use this to ensure
the first commit carries fully drawn decorations and the window
management state is correct when the window becomes visible.

Setting the property to zero inhibits further commits, and setting it to
non-zero allows commits. Deleting the property allows commits.

When the property is changed from zero to non-zero, there will be a
commit on next block_handler() call provided that some damage has been
recorded.

Without this patch (i.e. with the old behaviour) Xwayland can and will
commit the surface very soon as the application window has been realized
and drawn into.  This races with XWM and may cause visible glitches.

v3:
- introduced a simple setter for xwl_window::allow_commits
- split xwl_window_property_allow_commits() out of
  xwl_property_callback()
- check MakeAtom(_XWAYLAND_ALLOW_COMMITS)

v2:
- use PropertyStateCallback instead of XACE, based on the patch
  "xwayland: Track per-window support for netwm frame sync" by
  Adam Jackson
- check property type is XA_CARDINAL
- drop a useless memcpy()

Weston Bug: https://phabricator.freedesktop.org/T7622
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-23 13:30:30 -05:00
Pekka Paalanen
a6308cea60 xwayland: fix 'buffer' may be used uninitialized warning
Fix the following warning due to --disable-glamor:

  CC       Xwayland-xwayland.o
In file included from /home/pq/local/include/wayland-client.h:40:0,
                 from xwayland.h:35,
                 from xwayland.c:26:
xwayland.c: In function ‘block_handler’:
/home/pq/local/include/wayland-client-protocol.h:3446:2: warning: ‘buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  wl_proxy_marshal((struct wl_proxy *) wl_surface,
  ^
xwayland.c:466:23: note: ‘buffer’ was declared here
     struct wl_buffer *buffer;
                       ^

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2017-02-23 13:30:11 -05:00
Pekka Paalanen
f7b8560f23 xwayland: refactor into xwl_window_post_damage()
Refactor xwl_screen_post_damage() and split the window specific code
into a new function xwl_window_post_damage().

This is a pure refactoring, there are no behavioral changes. An assert
is added to xwl_window_post_damage() to ensure frame callbacks are not
leaked if a future patch changes the call.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2017-02-23 13:30:11 -05:00
Adam Jackson
8e3f9ce6c0 dix: Add a callback chain for window property state change
This will be used by in-server features that need to react to property
changes. The first one will be _XWAYLAND_ALLOW_COMMITS.

Signed-off-by: Adam Jackson <ajax@redhat.com>
[Pekka: add commit message body]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-23 13:30:11 -05:00
Adam Jackson
50bcea8be3 dix: Pass the whole property into deliverPropertyNotifyEvent
Instead of just the atom.  No functional change.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-02-23 13:30:11 -05:00
Mihail Konev
fde5cd7848 tests: Fix guards for ld -wrap
Fixes XQuartz build.

Regressed-in: 23f6dbc96e
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-02-23 13:16:07 -05:00
Dr.-Ing. Dieter Jurzitza
d8161aeb50 glamor: Fix missing declaration in dash vertex shader
Fixes a GLSL compilation error:

Failed to compile VS: 0:13(43): error: `pos' undeclared
0:13(14): error: operands to arithmetic operators must be numeric
0:13(13): error: operands to arithmetic operators must be numeric

Tested-by: Stefan Dirsch <sndirsch@suse.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-02-23 12:57:26 -05:00
Chris Wilson
acdb5bf2de os: Fix iteration over busfaults
Fixes a regression from

commit 41da295eb5
Author: Keith Packard <keithp@keithp.com>
Date:   Sun Nov 3 13:12:40 2013 -0800

    Trap SIGBUS to handle truncated shared memory segments

that causes the SIGBUS handler to fail to chain up correctly and
corrupts nearby memory instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-23 09:20:48 +10:00
Chris Wilson
dcb63deb1b inputthread: Initialise inputThreadInfo->changed before use
==8734== Thread 2 InputThread:
==8734== Conditional jump or move depends on uninitialised value(s)
==8734==    at 0x2FDB05: InputThreadDoWork (inputthread.c:333)
==8734==    by 0x6924423: start_thread (pthread_create.c:333)
==8734==    by 0x6C229BE: clone (clone.S:105)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-23 09:11:13 +10:00
Olivier Fourdan
23d85c5442 os: remove unused define MAX_TIMES_PER
Remove leftover from commit e10ba9e, MAX_TIMES_PER is not used anymore.

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-02-20 15:48:01 +10:00
Adam Jackson
8b170c4447 mi: Add include guards to migc.h
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-02-16 15:10:32 -05:00
Adam Jackson
e161853f38 fb: Remove stray references to fbHasVisualTypes
Removed in 84e8de12.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-02-16 15:10:30 -05:00