summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-05-11Merge remote-tracking branch 'airlied/for-keithp'Keith Packard14-56/+577
2015-05-11modesetting: Fix software cursor fallbackAdel Gadllah1-2/+2
The code in drmmode_set_cursor does not properly handle the case where drmModeSetCursor2 returns any other error than EINVAL and silently fails to set a cursor. So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable the cursor2 usage on EINVAL. References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725 Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-11xwayland: Implement smooth scrollingDima Ryazanov2-41/+16
We don't even need to simulate button clicks; it's done automatically. This also fixes scrolling in Qt5 apps. Signed-off-by: Dima Ryazanov <dima@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-11dix: Do not allow device transform to be set on valuatorless devicesJason Gerecke1-0/+3
If a device does not have any valuators, it makes no sense to set the device transformation. Return a BadMatch error to let the caller know that they're trying something stupid. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-11dix/events: Set currentTime to the given time stamp in NoticeTimeRui Matos1-0/+1
The refactoring in commit efc1035ca958f2c9d266338a308518a0834b1773 removed the actual update of currentTime. Signed-off-by: Rui Matos <tiagomatos@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-11Merge remote-tracking branch 'jturney/mingw-build-fixes'Keith Packard4-2/+12
2015-04-27modesetting: add tile property support (v2.1)Dave Airlie2-0/+43
This adds tiling support to the server modesetting driver, it retrieves the tile info from the kernel and translates it into the server format and exposes the property. v2.1: fix resetting tile property (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27modesetting: add dynamic connector hotplug support (MST) (v3)Dave Airlie1-16/+197
This is ported from the same code in the ati and intel drivers, It uses the same option name as nvidia and the other DDXes to disable tearing down outputs as it is hard to avoid racing with clients. v2: address two issues with DeleteUnusedDP12 enabled, reported by Daniel Martin, a) check we have a mode_output before destroying it b) only delete *unused* displays (thanks Aaron for clarifying) so we check if the output has a crtc and if it does we don't delete it. v3: drop the option to delete unused displays, just encode behaviour into the randr spec. Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27modesetting: stop caching mode resourcesDave Airlie2-18/+19
There is no need to cache the mode resources and with dynamic connectors for mst support we don't want to. So first clean that up before adding dynamic connector support. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27xf86Crtc/monitors: create initial monitors for tiled outputsDave Airlie3-3/+78
This creates an automatic monitor for a tiled monitor at startup. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27xf86Crtc: setup tiled monitors correctly in right ofDave Airlie1-0/+61
This puts the tiles of the monitor in the right place at X server startup. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27xf86Crtc: right-of placement by default.Adam Jackson2-8/+74
Change the X server default to do right-of placement at startup. This gives an option to allow drivers to override this placement, which has been used for server drivers where both heads are not in the same physical place. Been in Fedora for a few years, but for tiled monitors we really want something along these lines. This is an ABI break. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27xfree86: attempt to autoconfig gpu slave devices (v3)Dave Airlie1-5/+26
This allows us to skip the screen section, the first Device section will get assigned to the screen, any remaining ones will get assigned to the GPUDevice sections for the screen. v2: fix the skipping unsuitable screen logic (Aaron) v3: fix segfault if not conf file (me, 5s after sending v2) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-27xserver: add xorg.conf support for gpu devices. (v2.1)Dave Airlie8-13/+86
This allows gpu devices to be specified in xorg.conf Screen sections. Section "Device" Driver "intel" Identifier "intel0" Option "AccelMethod" "uxa" EndSection Section "Device" Driver "modesetting" Identifier "usb0" EndSection Section "Screen" Identifier "screen" Device "intel0" GPUDevice "usb0" EndSection This should allow for easier tweaking of driver options which currently mess up the GPU device discovery process. v2: add error handling for more than 4 devices, (Emil) fixup CONF_ defines to consistency add MAX_GPUDEVICES define (yes there is two defines, this is consistent with everywhere else). remove braces around slp (Mark Kettenis) man page fixups (Aaron) v2.1: fixup whitespace (Aaron) Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-22os/utils.c: Fix prototype for Win32TempDir()Colin Harrison1-1/+1
xorg/xserver/os/utils.c: In function ‘Win32TempDir’: xorg/xserver/os/utils.c:1643:1: warning: old-style function definition [-Wold-style-definition] Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-04-22os/utils.c: Don't try to build os_move_fd() for WIN32Colin Harrison1-0/+2
Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-04-22hw/xnest: Fix build for MinGWJon TURNEY1-0/+4
Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid type clashes caused by the unwrapped windows.h that includes. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-04-22hw/xwin/winclipboard: Link xwinclip with -lpthreadJon TURNEY1-1/+1
Link xwinclip with -lpthread to fix build for MinGW Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-04-22os/xdmcp.c: Include Xtrans.h when building for WIN32Colin Harrison1-0/+4
Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup() xserver/os/xdmcp.c: In function ‘get_addr_by_name’: xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration] Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-04-21Remove empty stub of $host_cpu case statement in configure.acAlan Coopersmith1-5/+0
Left behind when commit 5c12399b6c3a8d moved the xorg_bus_* settings elsewhere. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
2015-04-21Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86Alan Coopersmith1-1/+1
Needed when using a compiler that defaults to 64-bit output when configure is checking for $host_cpu. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
2015-04-21Convert hw/dmx to new *allocarray functionsAlan Coopersmith16-59/+51
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert hw/kdrive to new *allocarray functionsAlan Coopersmith6-14/+14
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert hw/xnest & hw/vfb to new *allocarray functionsAlan Coopersmith6-22/+18
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert hw/xfree86 to new *allocarray functionsAlan Coopersmith26-107/+111
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert glamor & glx to new *allocarray functionsAlan Coopersmith8-21/+19
v2: fixup whitespace Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-04-21Convert mi & miext to new *allocarray functionsAlan Coopersmith18-71/+66
v2: remove now useless parentheses Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert exa & fb to new *allocarray functionsAlan Coopersmith5-10/+10
v2: fixup whitespace Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-04-21Convert XKB to new *allocarray functionsAlan Coopersmith8-93/+96
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Daniel Stone <daniels@collabora.com>
2015-04-21Convert top level extensions to new *allocarray functionsAlan Coopersmith34-122/+111
v2: remove now useless parentheses Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert dix/* to new *allocarray functionsAlan Coopersmith13-76/+71
v2: remove now useless parentheses Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Convert os/* to new *allocarray functionsAlan Coopersmith2-7/+8
v2: remove now useless parentheses Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Add no-fail equivalents of allocarray & reallocarrayAlan Coopersmith2-0/+19
v2: Remove extra 's' from comment Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Add xallocarray() helper macroAlan Coopersmith1-0/+2
Uses reallocarray to perform integer overflow detection when allocating an array, using NULL as the previous pointer to force a new allocation. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Import reallocarray() from OpenBSDAlan Coopersmith5-2/+58
Wrapper for realloc() that checks for overflow when multiplying arguments together, so we don't have to add overflow checks to every single call. For documentation on usage, see: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Matt Turner <mattst88@gmail.com>
2015-04-21Add XNFcallocarray() to allow xnfcalloc() to check for overflowAlan Coopersmith4-6/+24
The xnfcalloc() macro took two arguments but simply multiplied them together without checking for overflow and defeating any overflow checking that calloc() might have done. Let's not do that. The original XNFcalloc() function is left for now to preserve driver ABI, but is marked as deprecated so it can be removed in a future round of ABI break/cleanup. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Let calloc handle multiplicationAlan Coopersmith7-13/+11
It's going to multiply anyway, so if we have non-constant values, might as well let it do the multiplication instead of adding another multiply, and good versions of calloc will check for & avoid overflow in the process. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Remove remaining doc references to Xalloc, Xrealloc, and XfreeAlan Coopersmith1-6/+3
Functions were removed in commit cad9b053d52f62432 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21Remove apSolaris.shar (old "aperture" kernel driver for Solaris)Alan Coopersmith2-808/+1
Modern Solaris releases provide this functionality in the OS via the xsvc driver. Since the move to libpciaccess, nothing in Xorg uses this aperture driver any more. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-04-17systemd-logind: don't second guess D-Bus default timeoutRay Strode1-8/+6
At the moment, the X server uses a non-default timeout for D-Bus messages to systemd-logind. The only timeouts normally used with D-Bus are: 1) Infinite 2) Default Anything else is just as arbitrary as Default, and so rarely makes sense to use instead of Default. Put another way, there's little reason to be fault tolerant against a local root running daemon (logind), that in some configurations, the X server already depends on for proper functionality. This commit changes systemd-logind to just use the default timeouts. Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347 Signed-off-by: Ray Strode <rstrode@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-04-17systemd-logind: filter out non-signal messages from message filterRay Strode1-0/+3
It's possible to receive a message reply in the message filter if a previous message call timed out locally before the reply arrived. The message_filter function only handles signals, at the moment, and does not properly handle message replies. This commit changes the message_filter function to filter out all non-signal messages, including spurious message replies. Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347 Signed-off-by: Ray Strode <rstrode@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-04-13mi: Partial pie-slice filled arcs may need more space for spansKeith Packard1-0/+5
The mi filled arc code estimates that a filled arc will produce no more spans than the arc is tall. This is true for most arcs except for pie-slice arcs strictly between 180 and 360 degrees where the missing portion of the arc faces up or down such that we get two spans on some scanlines. For those, we need to reserve room for another height/2 spans. This patch just does it for all partial pie-sliced arcs to make the test easier to understand; it's just over-allocating a bit of memory, so that's safe. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-04-13Re-enable non serverfd input devices immediately on vtenterHans de Goede1-3/+4
Non serverfd input devices will never get a systemd-logind dbus resume signal, causing them to never get re-enabled. This commit changes xf86VTEnter() to enable them immediately, fixing this. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-03-31Require randrproto version 1.5.0 or newerKeith Packard1-1/+1
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-03-31xfree86: Add GPU screens even if there are no active GDevsAaron Plattner1-3/+11
xf86platformProbeDev creates GPU screens for any platform devices that were not matched by a GDev in the loop above, but only if there was at least one device. This means that it's impossible to configure a device as a GPU screen if there is only one platform device that matches that driver. Instead, create a GPU screen (if possible) for any platform device that was not claimed by the GDev loop. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-31xfree86: Fix xf86_check_platform_slot's handling of PCIAaron Plattner1-2/+4
If a PCI entity is found, xf86_check_platform_slot performs a device ID check against the xf86_platform_device passed in. However, it just returns immediately without checking the rest of the entities first. This leads to this situation happening: 1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI 2. The intel driver creates entity 1 for its platform device, opening /dev/dri/card0 3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device, which calls doPlatformProbe, which calls xf86_check_platform_slot. 4. xf86_check_platform_slot compares the Intel platform device against the NVIDIA PCI entity. Since they don't have the same device ID, it returns TRUE. 5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity for the Intel one. Fix this by only returning FALSE if the PCI ID matches, and continuing the loop otherwise. In the scenario above, this allows it to continue on to find the Intel platform device that matches the second entity. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-31Merge remote-tracking branch 'airlied/for-keithp'Keith Packard10-101/+936
2015-03-31Fix XQuartz buildJon Turney2-0/+5
Fix XQuartz build since commit e036cbfc "Make PseudoramiXExtensionInit() prototype more generally available" Add #include "nonsdk_extinit.h" to xprScreen.c Add #include "nonsdk_extinit.h" to miinitext.c under INXQUARTZ to provide declarations used under INXQUARTZ Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-03-31randr: Use Monitor list for XineramaKeith Packard1-98/+20
This replaces the CRTC-based Xinerama implementation with one which uses Monitors instead, allowing clients to manipulate the Xinerama configuration through the RandR Monitor list. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-03-31randr: Add Monitor support (v1.1)Keith Packard7-1/+839
Store the user-defined monitors in the RandR screen private. Generate a list of monitors from both the user-defined ones and from any outputs not mentioned in one of the user-defined monitors. This list covers both the outputs in the main screen as well as any slaves. v1.1: airlied: fix up primary skipping bug, fix wrong height initialiser add get_active flag from updated protocol. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>