summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-03-03hw/xwin: Just generate the WGL wrappers we needJon TURNEY1-31/+14
Just generate the WGL wrappers we need, rather than for everything in wgl.xml This avoids generating a lot of unused wrappers, and also avoids compilation requiring a wglext.h at least as new as wgl.xml Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-03hw/xwin: Fix implicit-function-declaration warning in XwinExtensionInit() ↵Yaakov Selkowitz1-1/+4
when compiled with XWIN_GLX_WINDOWS defined InitOutput.c: In function ‘XwinExtensionInit’: InitOutput.c:170:9: error: implicit declaration of function ‘glxWinPushNativeProvider’ [-Werror=implicit-function-declaration] glxWinPushNativeProvider(); ^ InitOutput.c:170:9: warning: nested extern declaration of ‘glxWinPushNativeProvider’ [-Wnested-externs] Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-03xf86OpenSerial: Add support server managed fdsHans de Goede1-1/+5
Try to get a server managed fd from the Options before trying to open the device node ourselves. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03systemd-logind: Add delayed input device probingHans de Goede3-4/+49
With systemd-logind we cannot probe input devices while switched away, so if we're switched away, put the pInfo on a list, and probe everything on that list on VT-Enter. This is using an array grown by re-alloc, rather than a xorg_list since creating a new data-type to store a pInfo + list-entry just for this seems overkill. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03systemd-logind: Hookup systemd-logind integrationHans de Goede3-6/+59
This commits makes the changes necessary outside of the systemd-logind core to make the server use systemd-logind managed fds for input devices and drm nodes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03systemd-logind: Add systemd-logind "core"Hans de Goede5-1/+541
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 Goede2-0/+15
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 Goede4-9/+15
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 Goede2-0/+24
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 Goede2-22/+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-03-03xf86Xinput: Modify API for server-managed fd supportHans de Goede3-1/+14
With systemd-logind support, the xserver, rather than the drivers will be responsible for opening/closing the fd for input devices. This commit adds a new capabilities field to the InputDriverRec and a XI86_DRV_CAP_SERVER_FD flag for drivers to indicate that they support server managed fds. This commit adds a new XI86_SERVER_FD flag to indicate to drivers when the server is managing the fd and they should not open/close it. Note that even if drivers declare they support server managed fds there is no guarantee they will actually get them. Since this changes the input driver ABI, this commit bumps it. systemd-logind tracks devices by their chardev major + minor numbers, since we are breaking ABI anyways also add major and minor fields for easy storage / retrieval of these. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03linux: xf86OpenConsole: Don't detach from controlling tty when it is our vtHans de Goede1-1/+18
Detaching from our controlling tty makes little sense when it is the same as the vt we're asked to run on. So automatically assume -keeptty in this case. This is useful to do because when not running as root the server can only make various VT related ioctls when it does not detach from the tty. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03linux: xf86OpenConsole remove root-rights check for keeptty optionHans de Goede1-6/+0
There is no reason why keeptty cannot be used without root-rights. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-14XQuartz: pointer -> void *Jeremy Huddleston Sequoia1-4/+4
Fix build regression from 60014a4a98ff924ae7f6840781f768c1cc93bbab Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-02-09Merge remote-tracking branch 'whot/for-keith'Keith Packard6-50/+50
2014-02-10xfree86: use xnfstrdup in the Xorg -configure codePeter Hutterer1-21/+21
Just for consistency, I'm pretty sure the code is generally not happy for malloc failures anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-07ephyr: Repaint entire screen when colormap is updatedKeith Packard1-0/+15
Any time the colormap is changed, the entire screen needs to be repainted to match. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-02-07xfree86: Fix a compiler warning on 64-bit.Eric Anholt1-1/+1
asm/mtrr.h makes this an unsigned long on 32, but a u64 on 64. Cast it to a long to win. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-05xfree86: unconstify driver in the XF86ConfInputClassRecPeter Hutterer1-1/+1
No const value is ever assigned to it, let's not pretend it's const. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-05xfree86: unconstify another stringPeter Hutterer2-3/+3
Only Xorg -configure uses a hardcoded value here, so let's not change the rest of the server for that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-05xfree86: un-constify inp_driver/inp_identifierPeter Hutterer2-6/+6
The only place this isn't allocated is during Xorg -configure where we just statically assing "mouse"/"kbd" and the identifiers for it. Everywhere else it's strdup'd and then free'd already. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-05xfree86: device name and driver are not const charPeter Hutterer1-2/+2
Allocated in one place, freed in another. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-04Revert "xfree86/common: handle string constants in xf86Xinput configuration"Peter Hutterer1-2/+2
This reverts commit 22592855e90d23013ba7f9e945d567725cb44bf3. What warning was this supposed to fix? Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04Revert "xfree86/parser: make strings in xf86MatchGroup const"Peter Hutterer2-13/+13
This reverts commit f71de60355cc76810657f40c7b5461af86b34bf7. What warnings? 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 Hutterer1-8/+8
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-30edid: Add quirk for Sony Vaio Pro 13Arun Raghavan1-0/+5
The detailed timings are for a 15.6" display when max image size correctly reports 13.3". Signed-off-by: Arun Raghavan <arun@accosted.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-29xf86Events: add Enable/DisableInputDeviceForVTSwitch functionsHans de Goede2-24/+32
Factor this code out into functions so that it can be re-used for the systemd-logind device pause/resume paths. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29xf86Events: refactor xf86VTLeave error handlingHans de Goede1-48/+46
Use kernel goto style error handling for xf86VTSwitchAway() failure. This makes it much easier to read the straight path. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29xf86Events: split xf86VTSwitch into xf86VTLeave and xf86VTEnter functionsHans de Goede2-130/+145
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29dbus-core: Make dbus-core no longer mutually exclusive with udevHans de Goede1-0/+5
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-29xfree86: Keep a non-seat0 X server from touching VTs (#71258)Laércio de Sousa1-1/+2
Updated patch following Hans de Goede's advice. If -seat option is passed with a value different from seat0, X server won't call xf86OpenConsole(). This is needed to avoid any race condition between seat0 and non-seat0 X servers. If a non-seat0 X server opens a given VT before a seat0 one which expects to open the same VT, one can get an inactive systemd-logind graphical session for seat0. This patch was first tested in a multiseat setup with multiple video cards and works quite well. I suppose it can also make things like DontVTSwitch and -sharevts meaningless for non-seat0 seats, so it may fix bug #69477, too. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71258 https://bugs.freedesktop.org/show_bug.cgi?id=69477 (maybe) See also: http://lists.x.org/archives/xorg-devel/2013-October/038391.html https://bugzilla.redhat.com/show_bug.cgi?id=1018196 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-01-29xf86DeleteScreen: move check for NULL pScrn before first dereferenceAlan Coopersmith1-3/+4
Flagged by cppcheck 1.62: [hw/xfree86/common/xf86Helper.c:220] -> [hw/xfree86/common/xf86Helper.c:231]: (warning) Possible null pointer dereference: pScrn - otherwise it is redundant to check it against null. 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-01-29Link libvgahw with $(PCIACCESS_LIBS) as wellAlan Coopersmith1-0/+1
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-01-22kdrive/ephyr: Remove extra 'i' variable in ProcXF86DRIGetDrawableInfoKeith Packard1-1/+0
Just re-use the top-level one Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22hw/xnest: Eliminate shadowed namesKeith Packard4-17/+17
Just rename stuff; nothing fancy here. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22hw/vfb: Rename screenInfo parameter to screen_infoKeith Packard1-9/+9
Avoid shadowing the global screenInfo value. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22kdrive: Fix -Wshadow errorsKeith Packard2-4/+4
Just rename stuff to avoid conflicts. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22xfree86: Fix -Wshadow warningsKeith Packard27-427/+408
Just rename variables to eliminate -Wshadow warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22Ignore a couple of format-nonliteral warningsKeith Packard1-0/+1
These are generated in code which uses sprintf as a convenient way to construct strings from various pieces. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22Merge remote-tracking branch 'whot/for-keith'Keith Packard1-1/+26
2014-01-22Merge remote-tracking branch 'dlespiau/20131216-4k'Keith Packard3-45/+105
2014-01-12XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu ↵Jeremy Huddleston Sequoia1-0/+9
in AppleWMSetWindowMenu Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenuJeremy Huddleston Sequoia1-0/+7
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Silence a clang static analysis warning about a memory leakJeremy Huddleston Sequoia1-0/+3
It seems the alanyzer can't comprehend dixSetPrivate(). quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo' return quartzProcs->AddScreen(index, pScreen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Silence a clang static analysis warning about a possible memory ↵Jeremy Huddleston Sequoia1-0/+4
leak on exit stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv' asl_log(aslc, NULL, ASL_LEVEL_ERR, ^~~~~~~ stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp' asl_log(aslc, NULL, ASL_LEVEL_ERR, ^~~~~~~ 2 warnings generated. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Validate length in appledri before swappingJeremy Huddleston Sequoia1-0/+6
Avoids potential memory corruption from bad requests Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requestsJeremy Huddleston Sequoia1-0/+4
Return an error to the caller rather than crashing the server on invalid screens. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Simplify hook_run to quiet static analyzerJeremy Huddleston Sequoia1-21/+6
x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value (*fun[i])(arg, data[i]); ^~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Mark applicationWillTerminate: noreturnJeremy Huddleston Sequoia1-1/+1
X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn' [-Wmissing-noreturn,Semantic Issue] { ^ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12XQuartz: Fix get_proc_address signatureJeremy Huddleston Sequoia1-2/+2
indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type 'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue] __glXsetGetProcAddress(&get_proc_address); ^~~~~~~~~~~~~~~~~ ../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue] void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); ^ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>