Permalink
Commits on Sep 26, 2016
  1. fb: Revert fb changes that broke XQuartz

    jeremyhu committed May 31, 2014
        http://bugs.freedesktop.org/show_bug.cgi?id=26124
    
    Revert "Use new pixman_glyph_cache_t API that will be in pixman 0.28.0"
    Revert "fb: Fix origin of source picture in fbGlyphs"
    Revert "fb: Publish fbGlyphs and fbUnrealizeGlyph"
    
    This reverts commit 9cbcb5b.
    This reverts commit 983e303.
    This reverts commit 3c2c59e.
  2. fb: Revert fb changes that broke XQuartz

    jeremyhu committed Feb 13, 2010
    http://bugs.freedesktop.org/show_bug.cgi?id=26124
    
    Revert "Fix source pictures getting random transforms after 2d6a8f6."
    Revert "fb: Adjust transform or composite coordinates for pixman operations"
    
    http://bugs.freedesktop.org/26124
    
    This reverts commit a72c65e.
    This reverts commit a6bd5d2.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
  3. Use old miTrapezoids and miTriangles routines

    jeremyhu committed Nov 2, 2013
    Reverts commits:
        788ccb9
        566f193
    
    http://xquartz.macosforge.org/trac/ticket/525
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
  4. Workaround the GC clipping problem in miPaintWindow and add some debu…

    jeremyhu committed Apr 30, 2010
    …gging output.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
  5. Revert "dix: Restore PaintWindow screen hook"

    jeremyhu committed Dec 26, 2015
    This reverts commit cbd3cfb.
  6. sdksyms.sh: Use CPPFLAGS, not CFLAGS

    jeremyhu committed Jan 13, 2012
    CFLAGS can include flags which are not useful to the preprocessor
    or can even cause it to fail.  This fixes a build issue on darwin
    when building for more than one architecture.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
  7. glx: Initialize glx even if there are currently no screens attached

    jeremyhu committed Sep 11, 2016
    Failure to do so causes an overvlow in glxClientCallback
    
    Application Specific Information:
    X.Org X Server 1.18.99.1 Build Date: 20160911
    =================================================================
    ==52118==ERROR: AddressSanitizer: SEGV on unknown address 0x000102b27b80 (pc 0x000103433245 bp 0x70000de67c20 sp 0x70000de67c00 T6)
        #0 0x103433244 in __asan::asan_free(void*, __sanitizer::BufferedStackTrace*, __asan::AllocType) (libclang_rt.asan_osx_dynamic.dylib+0x3244)
        #1 0x10347aeee in wrap_free (libclang_rt.asan_osx_dynamic.dylib+0x4aeee)
        #2 0x102e6a5ed in glxClientCallback glxext.c:301
        #3 0x102b672a3 in _CallCallbacks dixutils.c:737
        #4 0x102b2f0c6 in CallCallbacks callback.h:83
        #5 0x102b5c15a in NextAvailableClient dispatch.c:3562
        #6 0x102d7060c in AllocNewConnection connection.c:777
        #7 0x102d71355 in EstablishNewConnections connection.c:863
        #8 0x102b662f0 in ProcessWorkQueue dixutils.c:523
        #9 0x102d52a7f in WaitForSomething WaitFor.c:175
        #10 0x102b204f6 in Dispatch dispatch.c:411
        #11 0x102b61e01 in dix_main main.c:301
        #12 0x10254c42a in server_thread quartzStartup.c:66
        #13 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
        #14 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
        #15 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 42a41fa)
  8. randr: Initialize RandR even if there are currently no screens attached

    jeremyhu committed Sep 11, 2016
    Failure to do so causes an overvlow in RRClientCallback().
    
    =================================================================
    ==41262==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000103ccfbc8 at pc 0x0001034f32b9 bp 0x7000035a94c0 sp 0x7000035a94b8
    WRITE of size 4 at 0x000103ccfbc8 thread T6
        #0 0x1034f32b8 in RRClientCallback randr.c:72
        #1 0x1038c75e3 in _CallCallbacks dixutils.c:737
        #2 0x10388f406 in CallCallbacks callback.h:83
        #3 0x1038bc49a in NextAvailableClient dispatch.c:3562
        #4 0x103ad094c in AllocNewConnection connection.c:777
        #5 0x103ad1695 in EstablishNewConnections connection.c:863
        #6 0x1038c6630 in ProcessWorkQueue dixutils.c:523
        #7 0x103ab2dbf in WaitForSomething WaitFor.c:175
        #8 0x103880836 in Dispatch dispatch.c:411
        #9 0x1038c2141 in dix_main main.c:301
        #10 0x1032ac75a in server_thread quartzStartup.c:66
        #11 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
        #12 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
        #13 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 7d901d6)
  9. os/connection: Improve abstraction for launchd secure sockets

    jeremyhu committed Sep 11, 2016
    This changes away from hard-coding the /tmp/launch-* path to now
    supporting a generic <absolute path to unix socket>[.<screen>]
    format for $DISPLAY.
    
    cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    CC: Adam Jackson <ajax@kemper.freedesktop.org>
    (cherry picked from commit bf2bb51)
  10. XQuartz: pbproxy shouldn't need to wait for server initialization.

    jeremyhu committed Sep 19, 2016
    Just block on the socket like every other client does.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 8bc4727)
  11. XQuartz: Remove X11ApplicationFatalError

    jeremyhu committed Sep 19, 2016
    AppKit handles crashes on app launch with their own dialog now, so we shouldn't need to do this ourselves.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 81493d3)
  12. XQuartz: Don't respond to SIGALRM on the AppKit thread

    jeremyhu committed Sep 19, 2016
    ==================
    WARNING: ThreadSanitizer: data race (pid=69627)
      Write of size 8 at 0x00010dae73f8 by main thread (mutexes: write M262):
        #0 SmartScheduleTimer utils.c:1245 (X11.bin+0x0001004b21f9)
        #1 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, bool, int, my_siginfo_t*, void*) <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000279f6)
        #2 __CFRunLoopRun <null>:77 (CoreFoundation+0x000000087e17)
        #3 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
        #4 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
        #5 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
        #6 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
        #7 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
        #8 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
        #9 start <null>:29 (libdyld.dylib+0x000000005254)
    
      Previous read of size 8 at 0x00010dae73f8 by thread T7:
        [failed to restore the stack]
    
      Location is global 'SmartScheduleTime' at 0x00010dae73f8 (X11.bin+0x0001005b03f8)
    
      Mutex M262 (0x7d300000bd10) created at:
        #0 pthread_mutex_init <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3)
        #1 __CFRunLoopCreate <null>:77 (CoreFoundation+0x000000054e63)
        #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
        #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
        #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
        #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
        #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
        #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
        #8 start <null>:29 (libdyld.dylib+0x000000005254)
    
      Thread T7 (tid=4051693, running) created by main thread at:
        #0 pthread_create <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490)
        #1 create_thread quartzStartup.c:78 (X11.bin+0x0001000398dd)
        #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039813)
        #3 X11ApplicationMain X11Application.m:1286 (X11.bin+0x00010001c804)
        #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
        #5 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
        #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
        #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
        #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
        #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
        #10 start <null>:29 (libdyld.dylib+0x000000005254)
    
    SUMMARY: ThreadSanitizer: data race utils.c:1245 in SmartScheduleTimer
    ==================
    ==================
    WARNING: ThreadSanitizer: signal handler spoils errno (pid=69627)
        #0 SmartScheduleTimer utils.c:1244 (X11.bin+0x0001004b21a0)
        #1 __CFRunLoopRun <null>:77 (CoreFoundation+0x000000087e17)
        #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
        #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
        #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
        #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
        #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
        #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
        #8 start <null>:29 (libdyld.dylib+0x000000005254)
    
    SUMMARY: ThreadSanitizer: signal handler spoils errno utils.c:1244 in SmartScheduleTimer
    ==================
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 9153ec8)
  13. dix: Make InitCoreDevices() failures more verbose.

    jeremyhu committed Sep 19, 2016
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit d0c5d20)
  14. Xext/shm: Fix usage of F_GETFD to match standard

    jeremyhu committed Sep 12, 2016
    flags = fcntl(fd, F_GETFD) is compliant.
    
    fcntl(fd, F_GETFD, &flags) is non-compliant (Linux extension?)
    
    cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit a5769de)
Commits on Sep 16, 2016
  1. XQuartz: Cleanup CPPFLAGS that are no longer necessary on darwin

    jeremyhu committed Sep 11, 2016
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 4f4ecd0)
  2. XQuartz: Fix the issue where the h key could be come "stuck" after hi…

    jeremyhu committed May 29, 2016
    …ding XQuartz with cmd-h
    
    The issue was that we set a flag to ignore the k key's up event when sent
    the cmd-h down event, but because the cmd-h keycode hides XQuartz, we
    became !_x_active by the time the event is delivered which caused us to
    go down a differnet codepath rather than getting a chance to ignore it.
    We then incorrectly ignored the next h up key.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=92648
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 33d5952)
Commits on Sep 1, 2016
  1. Allow compile-time selection of a fallback input driver

    whot committed Jun 1, 2016
    A new --with-fallback-input-driver=foo option allows selecting a
    fallback driver for the server if the driver configured for the device
    is not found.  Note that this only applies when the device has a driver
    assigned and that module fails to load, devices without a driver are
    ignored as usual.
    
    This avoids the situation where a configuration assigns e.g. the
    synaptics driver but that driver is not available on the system,
    resulting in a dead device. A fallback driver can at least provides some
    functionality.
    
    This becomes more important as we move towards making other driver true
    leaf nodes that can be installed/uninstalled as requested. Specifically,
    wacom and synaptics, a config that assigns either driver should be
    viable even when the driver itself is not (yet) installed on the system.
    
    It is up to the distributions to make sure that the fallback driver is
    always installed. The fallback driver can be disabled with
    --without-fallback-input-driver and is disabled by default on non-Linux
    systems because we don't have generic drivers on those platforms.
    Default driver on Linux is libinput, evdev is the only other serious
    candidate here.
    
    Sample log output:
    [  3274.421] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event4)
    [  3274.421] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad weird driver"
    [  3274.421] (II) LoadModule: "banana"
    [  3274.422] (WW) Warning, couldn't open module banana
    [  3274.422] (II) UnloadModule: "banana"
    [  3274.422] (II) Unloading banana
    [  3274.422] (EE) Failed to load module "banana" (module does not exist, 0)
    [  3274.422] (EE) No input driver matching `banana'
    [  3274.422] (II) Falling back to input driver `libinput'
    .. server proceeds to assign libinput, init the device, world peace and rainbows
    everywhere, truly what a sight. Shame about the banana though.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit c69bd15)
Commits on Jul 19, 2016
  1. xserver 1.18.4

    nwnk committed Jul 19, 2016
    Signed-off-by: Adam Jackson <ajax@redhat.com>
  2. os: Use strtok instead of xstrtokenize in ComputeLocalClient

    Michel Dänzer authored and nwnk committed Mar 30, 2016
    Fixes leaking the memory pointed to by the members of the array returned
    by xstrtokenize.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit e156c0c)
  3. os: Treat ssh as a non-local client (v4)

    nwnk committed Mar 28, 2016
    By the time we get to ComputeLocalClient, we've already done
    NextAvailableClient → ReserveClientIds → DetermineClientCmd (assuming
    we're built with #define CLIENTIDS), so we can look up the name of the
    client process and refuse to treat ssh's X forwarding as if it were
    local.
    
    v2: (Michel Dänzer)
        * Only match "ssh" itself, not other executable names starting with
          that prefix.
        * Ignore executable path for the match.
    v3: (Michel Dänzer)
        * Use GetClientCmdName (Mark Kettenis)
        * Perform check on Windows as well, but only ignore path on Cygwin
          (Martin Peres, Emil Velikov, Jon Turney)
    v4: (Michel Dänzer)
        * Cut of any colon and whatever comes after it. (Adam Jackson)
        * Add bugzilla reference.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit adefbae)
  4. glamor: Translate solid text background region after clipping

    Michel Dänzer authored and nwnk committed Jul 1, 2016
    Fixes incorrect clipping for redirected windows which don't happen to be
    located at the top left corner of the screen.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96742
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit e8e3675)
  5. xfree86: Fix fallback driver sort order for Xorg -configure (v2)

    nwnk committed Jul 12, 2016
    The intent here was that fallback drivers would be at the end of the
    list in order, but if a fallback driver happened to be at the end of the
    list already that's not what would happen. Rather than open-code
    something smarter, just use qsort.
    
    Note that qsort puts things in ascending order, so somewhat backwardsly
    fallbacks are greater than native drivers, and vesa is greater than
    modesetting.
    
    v2: Use strcmp to compare non-fallback drivers so we get a predictable
    result if your libc's qsort isn't stable (Keith Packard)
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 32a9504)
  6. shm: Also censor images returned by ShmGetImage

    aeikum authored and nwnk committed Jul 6, 2016
    We currently censor images from dix's GetImage, but not from
    ShmGetImage. This is a method to bypass XACE, creating a potential
    leak. We should censor in both methods.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
    (cherry picked from commit 4926845)
  7. xwayland: Update RR state on wl_output.done instead of wl_output.mode

    rtcm authored and nwnk committed Jul 13, 2016
    Otherwise if the geometry changes but the mode doesn't we end up with
    the previous geometry from RR's point of view.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768710
    
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    (cherry picked from commit cf6730c)
  8. dix: Work around non-premultiplied ARGB cursor data

    Michel Dänzer authored and nwnk committed Jun 28, 2016
    Some games incorrectly use non-premultiplied ARGB cursor data, presumably
    because that's what Windows uses. On some hardware (and with SWcursor),
    this breaks areas of the cursor which are supposed to be transparent
    (and presumably also translucent areas, but that's less noticeable).
    
    This change checks for pixels with alpha == 0 and any non-alpha component
    != 0. If any such pixel is found, the data is assumed to be
    non-premultiplied and fixed up by multiplying the RGB components with the
    alpha component.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 401a8d6)
  9. linux: Do not try to open /dev/vc/0, fix error msg when /dev/tty0 ope…

    jwrdegoede authored and nwnk committed Jul 7, 2016
    …n fails
    
    /dev/vc/0 is a devfs thing which is long dead, so stop trying to open
    /dev/vc/0, besides being a (small) code cleanup this will also fix the
    "parse_vt_settings: Cannot open /dev/tty0 (%s)\n" error message to
    display the actual error, rather then the -ENOENT from also trying
    /dev/vc/0.
    
    BugLink: https://patchwork.freedesktop.org/patch/8768/
    Reported-by: Chad Versace <chad.versace@linux.intel.com>
    Suggested-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Reviewed-by: Chad Versace <chad.versace@intel.com>
    (cherry picked from commit 033888e)
  10. modesetting: resubmit dirty rects on EINVAL (v2)

    nwnk committed Jul 18, 2016
    This error code can mean we're submitting more rects at once than the
    driver can handle. If that happens, resubmit one at a time.
    
    v2: Make the rect submit loop more error-proof (Walter Harms)
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Michael Thayer <michael.thayer@oracle.com>
    (cherry picked from commit 4b311d2)
  11. modesetting: Implement 32->24 bpp conversion in shadow update

    airlied authored and nwnk committed Jul 22, 2015
    24bpp front buffers tend to be the least well tested path for client
    rendering.  On the qemu cirrus emulation, and on some Matrox G200 server
    chips, the hardware can't do 32bpp at all.  It's better to just allocate
    a 32bpp shadow and downconvert in the upload hook than expose a funky
    pixmap format to clients.
    
    [ajax: Ported from RHEL and separate modesetting driver, lifted kbpp
    into the drmmode struct, cleaned up commit message, fixed 16bpp]
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlied <airlied@redhat.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    [hdegoede@redhat.com: rebase, also use kbpp for rotate shadow fb]
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    
    (cherry picked from commit 21217d0)
  12. modesetting: Only add main fb if necessary

    jwrdegoede authored and nwnk committed Jun 1, 2016
    If we're doing reverse-prime; or doing rotation the main fb is not used,
    and there is no reason to add it in this case.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 4313122)
  13. Revert "modesetting: Load on GPU-s with 0 outputs"

    nwnk committed Jul 19, 2016
    This reverts commit 713a21c.
Commits on Jul 6, 2016
  1. modesetting: Fix hw cursor check at the first call

    tiwai authored and nwnk committed Feb 16, 2015
    With the previous patch, the modesetting driver can now return whether
    the driver supports hw cursor.  However, it alone doesn't suffice,
    unfortunately. drmmode_load_cursor_argb_check() is called in the
    following chain:
    
      xf86CursorSetCursor()
        -> xf86SetCursor()
           -> xf86DriverLoadCursorARGB()
             -> xf86_load_cursor_argb()
               -> xf86_crtc_load_cursor_argb()
                 -> drmmode_load_cursor_argb_check()
    
    *but* at first with drmmode_crtc->cursor_up = FALSE.  Then the
    function doesn't actually set the cursor but returns TRUE
    unconditionally.  The actual call of drmmode_set_cursor() is done at
    first via the show_cursor callback, and there is no check of sw cursor
    fallback any longer at this place. Since it's called only once per
    cursor setup, so the xserver still thinks as if the hw cursor is
    supported.
    
    This patch is an ad hoc fix to correct the behavior somehow: it does
    call drmmode_set_cursor() at the very first time even if cursor_up is
    FALSE, then quickly hides again.  In that way, whether the hw cursor
    is supported is evaluated in the right place at the right time.
    
    Of course, it might be more elegant if we have a more proper mechanism
    to fall back to sw cursor at any call path.  But it'd need more
    rework, so I leave this workaround as is for now.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit af91647)
  2. modesetting: Use load_cursor_argb_check for sw cursor fallback

    tiwai authored and nwnk committed Feb 16, 2015
    The modesetting driver still has an everlasting bug of invisible
    cursor on cirrus and other KMS drivers where no hardware cursor is
    supported.  This patch is a part of an attempt to address it.
    
    This patch particularly converts the current load_cursor_argb callback
    of modesetting driver to load_cursor_argb_check so that it can return
    whether the driver handles the hw cursor or falls back to the sw
    cursor.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    [hdegoede@redhat.com: Add extra comment suggested by Kenneth]
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    
    (cherry picked from commit 14c21ea)
  3. modesetting: Fix the error check from DRM_IOCTL_MODE_CURSOR2

    tiwai authored and nwnk committed Feb 16, 2015
    The error value isn't always -EINVAL, e.g. the kernel drm core returns
    -ENXIO when the corresponding ops doesn't exist.  Without this fix,
    DRM_IOCTL_MODE_CURSOR2 would be dealt as success even if it
    shouldn't.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 074cf58)
  4. xkb: add a cause to the xkb indicator update after a keymap change

    whot authored and nwnk committed Jun 28, 2016
    Regression introduce by ac164e5 which calls
    XkbUpdateAllDeviceIndicators() with two NULL arguments. A few layers down into
    the stack and we triggered a NULL-pointer dereference. In theory a NULL cause
    is acceptable since we don't actually change modifier state here. Instead of
    updating all places to check for NULL just set the cause to the client
    request and go to the pub.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=96384
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    (cherry picked from commit d135100)
  5. glx: avoid memory leak when using indirect rendering

    gqmelo authored and nwnk committed May 10, 2016
    When multiple processes are using GL with indirect rendering a race
    condition can make drawables refcount never drop to zero.
    
    This situation could happen when there are many X clients using indirect
    GLX:
    
    1 - client1: calls glXMakeCurrent
    
    2 - client2: calls glXMakeCurrent
    This is the first context switch for this client. So old_context_tag=0
    
    3 - client1: calls glXRender
    For the client, its context is already current.
    For the server side lastGLContext points to client2's context.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Guilherme Quentel Melo <gqmelo@gmail.com>
    (cherry picked from commit a134d1e)