summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2015-03-31xf86Crtc: add tile prop settingDave Airlie2-2/+77
Add support for drivers to set the tiling property. This is used by clients to work out the monitor tiles for DisplayID monitors. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-03-27Merge remote-tracking branch 'anholt/glamor-next'Keith Packard41-1564/+841
2015-03-24glamor: * 1/size is faster than / size in VSKeith Packard4-17/+17
Pass the inverse of the texture size to glamor vertex shaders so that we multiply by that instead of dividing by the size as multiplication is generally faster than division. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-24ephyr: Avoid a segfault with 'DISPLAY= Xephyr -glamor'Jon TURNEY1-1/+1
ephyr_glamor_connect() returns NULL if we failed, but applying xcb_connection_has_error() to NULL is not permitted. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2015-03-24glamor: Fix up indentationAdam Jackson1-7/+7
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-24glamor: Perform texture2D() separately from swizzle.Matt Turner1-12/+14
The texture2D() happens in each branch, so we may as well do it as early as possible and hide some of its latency in the branching instructions. Moving it outside the (uniform) control flow reduces the number of instructions in the fs_source shader from 64 to 46 and in the set_alpha_source shader from 69 to 47 on Haswell. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Add a helper function for the common GL_QUADS fallback pattern.Eric Anholt4-23/+20
We should do better than this with an index buffer, but for now at least make it so that we don't have to copy the same code to new places. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-03-24glamor: Don't optimize out scissor updates in CopyArea.Eric Anholt1-11/+6
This possibly is a minor hit for immediate mode renderers (no difference on copypixin100 on my hsw, n=12), but it gives important information about drawing bounds to a deferred renderer (3.1x improvement in copypixwin100 on vc4). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-03-24glamor: Just set the logic op to what we want at the start of all rendering.Eric Anholt14-49/+27
By dropping the unconditional logic op disable at the end of rendering, this fixes GL errors being thrown in GLES2 contexts (which don't have logic ops). On desktop, this also means a little less overhead per draw call from taking one less trip through the glEnable/glDisable switch statement of doom in Mesa. The exchange here is that we end up taking a trip through it in the XV, Render, and gradient-generation paths. If the glEnable() is actually costly, we should probably cache our logic op state in our screen, since there's no way the GL could make that switch statement as cheap as the caller caching it would be. v2: Don't forget to set the logic op in Xephyr's drawing. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-03-24glamor: Fix build when configured --enable-glamor --disable-xshmfenceJon TURNEY1-0/+2
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>