summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2014-06-02Merge remote-tracking branch 'jturney/master'Keith Packard1-0/+3
2014-06-02xtensa: add support for xtensa architectureMax Filippov1-0/+14
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02Fix overflow checking extension versionsRobert Ancell1-7/+11
The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is usedJon TURNEY1-0/+3
Commit f37a46913489397d8628ffe578c8d4ed50b6ca72 removed this from xwin-config.h.in for some reason, but it is used. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-05-22ARC: Add support for ARC architectureAlexey Brodkin1-0/+13
Xorg server could be built for and run on Synopsys DesignWare ARC cores. These changes are required for successful building and execution of the server. Both little-endian and big-endian flavors of ARC cores are supported. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Egbert Eich <eich@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-05systemd-logind: let the logind code decided whether to close an fdPeter Hutterer1-2/+2
We can only request one fd per device from systemd-logind. If a fd is re-used by the same device, releasing the fd from one device doesn't mean we can close it. The systemd code knows when it's really released, so let it close the fd. Test case: xorg.conf section for an input device with hotplugging enabled. evdev detects the duplicate and closes the hotplugged device, which closes the fd. The other instance of evdev thinks the fd is still valid so now you're playing a double lottery. First, which client(s) will get the evdev fd? Second, which requests will be picked up by evdev and which ones will be picked up by the client? You'll never know, but the fun is in finding out. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-04-23Add a command line argument for disabling indirect GLX.Eric Anholt1-0/+1
The attack surface for indirect GLX is huge, and it's of no use to most people (if you get an indirect GL context, you're better served by a immediate X error than actually trying to use an indirect GL context and finding out that it doesn't support doing anything you want, slowly). This flag gives you a chance to disable indirect GLX in environments where you just don't need it. I put in both the '+' and '-' arguments right now, so that it's easy to patch the value to change the default policy. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-23glx: Move the GLX variable caching what GL context is current to dix.Eric Anholt1-0/+2
GLX is trying to track whether the context it wants is current, to avoid the glFlush() (and the rest of the overhead) that occurs on all MakeCurrent calls. However, its cache can be incorrect now that glamor exists. This is a step toward getting glamor to coordinate with GLX. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-04-03Add pScreen->NameWindowPixmap hookDaniel Stone1-0/+3
This hook allows drivers to be notified when a pixmap gains a new ID. (ABI break.) Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-03Merge remote-tracking branch 'krh/xwayland-for-keithp'Keith Packard2-0/+5
2014-04-03Merge remote-tracking branch 'whot/for-keith'Keith Packard2-4/+10
2014-04-03xf86LogInit: log to XDG_DATA_HOME when not running as rootHans de Goede1-0/+6
When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to log to the default /var/log/... when it is not running as root. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-01Make XYToWindow a screen functionKeith Packard2-0/+5
This allows DDXen to override the window picking to account for native windows not seen by the X server. The bulk of the picking logic is exposed as a new helper function, miSpriteTrace(). This function completes the sprite trace filled out by the caller, and can be set up to start the search from a given toplevel window. v2: Leave existing XYToWindow API in place for API compatibility Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-01configure: Change DEFAULT_LOGPREFIX to really be a filename prefixHans de Goede2-4/+4
Rather then a full path prefix, this is a preparation patch for adding support for logging to another location when not running as root. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-27Handle -displayfd and an explicit display number sensiblyJon TURNEY1-0/+1
Handle -displayfd and an explicit display number sensibly, e.g. use the explicitly specified display number, and write it to the displayfd v2: displayfd might be 0, so use -1 as invalid value v3: Rebase for addition of NoListenAll flag Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-25Merge remote-tracking branch 'whot/for-keith'Keith Packard3-3/+7
2014-03-25miinitext: introduce LoadExtensionList() to replace over LoadExtension()Emil Velikov1-1/+2
Looping around LoadExtension() meant that ExtensionModuleList was reallocated on every extension. Using LoadExtensionList() we pass an array thus the function can do the reallocation in one go, and then loop and setup the ExtensionModuleList. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> v2: Update ephyr [Keith Packard] v3: Eliminate const warnings in LoadExtensionList [Keith Packard] Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-25xkb: Restore XkbCopyDeviceKeymapAdam Jackson1-0/+3
Removed in d35a02a767017f13db4bd4742eef49293d5a30ea, tigervnc 1.2.80 and xf86-video-nested need it for now. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-25os: Add AddClientOnOpenFD() to create a new client for an file descriptorKristian Høgsberg1-0/+2
When the Xwayland server is socket-activated, we need to connect and initialize the window manager before the activating client gets to proceed with connecting. We do this by passing a socket file descriptor for the window manager connection to the Xwayland server, which then uses this new function to set it up as an X client. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-22Add necessary headers for major()/minor() on Solaris to xf86Xinput.cAlan Coopersmith1-0/+3
Without these, after commit fdb4ec86c29d85c, it fails to build on Solaris, with errors of: xf86Xinput.c: In function 'xf86stat': xf86Xinput.c:816:5: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration] xf86Xinput.c:817:5: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22Merge remote-tracking branch 'jwrdecoede/for-keith'Keith Packard3-3/+9
2014-03-20os: Add a mechanism to prevent creating any listen socketsKristian Høgsberg1-0/+1
A socket-activated server will receive its listening sockets from the parent process and should not create its own sockets. This patch introduces a NoListen flag that can be set by a DDX to prevent the server from creating the sockets. When NoListen is enabled, we also disable the server lock checking, since the parent process is responsible for checking the lock before picking the display name and creating the sockets. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-20os: Always compile ListenOnOpenFD() and export itKristian Høgsberg1-3/+1
This function was written to allow the X server to inherit the listen socket from launchd on OS X. The code is not specific to OS X though and will be useful for on-demand launched Xwayland servers. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-19xkb: add XkbLoadKeymapFromStringKristian Høgsberg2-0/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-12config_odev*: Use XNF alloc functionsHans de Goede1-0/+3
config_odev* functions are called in code-paths were we already use XNF* functions in other places, so which are not oom safe already. Besides that oom is something which should simply never happen, so aborting when it does is as good a response as any other. While switching to XNF functions also fixup an unchecked strdup case. Note the function prototypes are kept unchanged, as they are part of the server ABI. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12Xorg: Add a suid root wrapperHans de Goede2-3/+6
With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? The function of this wrapper is to see if a system still needs root-rights, if it does not (it supports kms and the kms drivers are properly loaded), then it will immediately drop all elevated rights before executing the real Xorg binary. If it finds (some) cards which don't support kms, or no cards at all, then it will execute the Xorg server with elevated rights so that ie the nvidia binary driver and the vesa driver can keep working normally. To make it possible for security concious users who don't need the root rights to completely remove the wrapper, Xorg is started in a 3 step process when the wrapper is enabled during build time: 1) A simple shell script which checks if the wrapper is there, if it is it executes the wrapper, if not it directly executes the real Xorg binary 2) The wrapper gets executed, does its checks, normally drops all elevated rights and then executes the real Xorg binary 3) The real Xorg binary does its thing This allows distributions to put the wrapper binary in a separate package, and will allow users to remove this package. IE the plan with Fedora is to make "legacy" drivers depend on the wrapper pkg, and since our default install contains some legacy drivers it will be part of the default install, but users can later yum remove it (which will also automatically remove the legacy driver packages as those won't work without it anyways). The wrapper is loosely modelled after the existing Debian Xwrapper, it uses the same config-file + config-file format, and also allows restricting Xserver execution (through the wrapper) to console users only. There also is a new needs_root_rights config file directive, which can be used to override the auto-detection the wrapper does. Hopefully this will allow Debian to replace their own wrapper with this upstream one. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12xkb: Repurpose XkbCopyDeviceKeymap to apply a given keymap to a deviceRui Matos1-2/+2
This will also make it useful for cases when we have a new keymap to apply to a device but don't have a source device. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12xkb: Factor out a function to copy a keymap's controls onto anotherRui Matos1-0/+3
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-11xkb: push locked modifier state down to attached slave devicesPeter Hutterer1-0/+4
Whenever the master changes, push the locked modifier state to the attached slave devices, then update the indicators. This way, when NumLock or CapsLock are hit on any device, the LED will light up on all devices. Likewise, a new keyboard attached to a master device will light up with the correct indicators. The indicators are handled per-keyboard, depending on the layout, i.e. if one keyboard has grp_led:num set, the NumLock LED won't light up on that keyboard. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-09xserver: fix build since system-logind.hDave Airlie1-2/+2
on tinderbox and irc Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-07Merge remote-tracking branch 'jwrdecoede/for-keith'Keith Packard4-2/+77
2014-03-05xorg: Build a glamor_egl module.Eric Anholt1-0/+3
This is not exposing the API we want long term, but it should get existing DDX drivers up and running while we massage the API into shape. v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use version 0.5.1 (the point it was forked from the external repo). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-03systemd-logind: Add systemd-logind "core"Hans de Goede3-0/+49
This commits add the bulk of the systemd-logind integration code, but does not hook it up yet other then calling its init and fini functions, which don't do that much. Note the configure bits check for udev since systemd-logind use will only be supported in combination with udev. Besides that it only checks for dbus since all communication with systemd-logind is happening over dbus, so no further libs are needed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03hotplug: Extend OdevAttributes for server-managed fd supportHans de Goede1-0/+10
With systemd-logind support, the xserver, rather than the drivers will be responsible for opening/closing the fd for drm nodes. This commit adds a fd member to OdevAttributes to store the fd to pass it along to the driver. systemd-logind tracks devices by their chardev major + minor numbers, so also add OdevAttributes to store the major and minor. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2014-03-03OdevAttribute: Remove unowned flag from OdevAttributes headHans de Goede1-1/+0
The OdevAttributes struct should just be a head of the attributes list, and not contain various unrelated flags. Instead add a flags field to struct xf86_platform_device and use that. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2014-03-03OdevAttribute: Add support for integer attributesHans de Goede1-1/+15
Add a couple of new functions for dealing with storing integer values into OdevAttributes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03OdevAttribute: Add config_odev_get_attribute helperHans de Goede1-0/+3
Add a config_odev_get_attribute helper, and replace the diy looping over all the attributes done in various places with calls to this helper. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-09Delete stray ; in struct _DeviceChangedEventAlan Coopersmith1-1/+1
Caused Solaris Studio cc to complain in every file which included it: "../include/eventstr.h", line 179: warning: syntax error: empty member declaration Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-05include: make the various button array lengths more obviousPeter Hutterer1-2/+2
No functional changes, just making a better case for why MAP_LENGTH is 256. "But can't we remove MAP_LENGTH then?" I hear you say? "Why, yes. Go for it!" Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-02-04input: un-constify dev->namePeter Hutterer1-1/+1
Fallout from fecc7eb1cf66db64728ee2d68cd9443df7e70879, and reverts most of the rest of that patch. The device name is allocated and may even change during PreInit. The const warnings came from the test codes, the correct fix here is to fix the test code. touch.c: In function ‘touch_init’: touch.c:254:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] dev.name = "test device"; Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04Revert "os: xstrtokenize takes and returns const char * now"Peter Hutterer1-1/+1
This reverts commit d0339a5c66846c9f14e3b584e34688520a0916ab. seriously, what the fuck? Are we making xstrdup() return a const char now too? Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04input: un-constify InputAttributesPeter Hutterer1-6/+6
Introduced in fecc7eb1cf66db64728ee2d68cd9443df7e70879 and reverts most of that but it's helpfully mixed with other stuff. InputAttributes are not const, they're strdup'd everywhere but the test code and freed properly. Revert the const char changes and fix the test up instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04xkb: add a call to init an XkbRMLVOSet from const charsPeter Hutterer2-5/+13
Just forcing everything to const char* is not helpful, compiler warnings are supposed to warn about broken code. Forcing everything to const when it clearly isn't less than ideal. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-01-29dbus-core: Make dbus-core no longer mutually exclusive with udevHans de Goede3-3/+59
With systemd-logind the dbus-core will be used for more then just config, so it should be possible to build it even when using a non dbus dependent config backend. This patch also removes the config_ prefix from the dbus-core symbols. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29config: drop the dbus APIPeter Hutterer1-3/+0
This API has been disabled by default since 1.4, the first release it came in. There a no known users of it and even its direct replacement (HAL) has been superseeded by udev on supported platforms since 1.8. This code is untested, probably hasn't been compiled in years and should not be shipped. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29configure.ac: enable systemd socket activation in libxtransŁukasz Stelmach1-0/+3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-27Merge remote-tracking branch 'anholt/glamor-reformat'Keith Packard1-0/+3
Conflicts: Makefile.am Conflict caused by adding PSEUDORAMIX and GLAMOR directory defines in separate branches
2014-01-27Add _XITYPEDEF_POINTER to dix-config.hKeith Packard1-0/+3
Just like the pointer type from Xdefs.h, the Pointer type from XIproto.h collides with local declarations of variables using the same name. XIproto.h can use _XITYPEDEF_POINTER to avoid declaring the unnecessary pointer type. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-27glamor: Hook the module back up to the build.Eric Anholt1-0/+3
For now we're just building an uninstalled library. The extra EGL stubs are required so that we can get the DIX building and usable without pulling in the xf86 DDX code in glamor_egl.c. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-01-23dix: Praise clients which haven't run for a while, rather than idle clientsKeith Packard1-1/+0
A client which is ready, but hasn't run for a while, should receive the same benefit as one which has simply been idle for a while. Use the smart_stop_tick to see how long it has been since a client has run instead of smart_check_tick, which got reset each time a client was ready, even if it didn't get to run. Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Chris Wilson <chris@chris-wilson.co.uk>