summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-05-23Merge branch 'server-1.14-branch' of ↵Matt Dew3-6/+9
git://people.freedesktop.org/~whot/xserver into server-1.14-branch
2013-05-23Merge commit 'c760fb0154848d47438908ba8b3da2fffc68a460' into server-1.14-branchMatt Dew10-11/+87
2013-05-14ephyr: Fix crash on 24bpp host framebufferDaniel Martin3-6/+9
Use bytes_per_line and bits_per_pixel from the created XImage to fix https://bugzilla.redhat.com/show_bug.cgi?id=518960 Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349)
2013-05-06xfree86: change a log messagePeter Hutterer1-2/+1
This path is technically executed through config/udev, but having two messages in the form "config/udev: Adding drm device" makes it appear as if the udev filters are wrong and it's trying to add the same device twice. In fact, it's only one device, only added once, but a duplicate log message. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 131f883f85b9b734e5e5652f16ba1d3b5f4de12f)
2013-05-06hw/xfree86: Only report SetDesiredModes() failed if at least one modeset failsChris Wilson1-2/+3
commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 8 20:24:32 2013 -0800 hw/xfree86: Require only one working CRTC to start the server. changed the logic to try to set the mode on all connected outputs rather than abort upon the first failure. The return error code was then tweaked such that it reported success if it set a mode on any crtc. However, this confuses the headless case where we never enable any crtcs and also, importantly, never fail to set a crtc. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Also-written-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b)
2013-05-06xf86: don't hotplug output devices while VT switched.Dave Airlie5-5/+70
We don't want to hotplug output devices while we are VT switched, as we get races between multiple X servers on the device open, and drm device master status. This just queues device opens until we return from VT switch. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 22cab8a28a433d03a4e6ba97f9a160271d73cb52)
2013-05-06xf86: use new xf86VTOwner interface in a few placesDave Airlie4-4/+4
This replaces some previous uses of direct xf86Screens[0] accesses. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@gmail.com> (cherry picked from commit 5b359cf6135ca173d8f65cb92926332f07f91efe)
2013-05-06xfree86: add VT owner interfaceDave Airlie2-0/+10
This is just a simple interface to avoid accessing x86Screens[0] directly. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@gmail.com> (cherry picked from commit d61ea1f64db45201c1a2b39c39293c5768d98092)
2013-04-17xf86: fix flush input to work with Linux evdev devices.Dave Airlie1-1/+2
So when we VT switch back and attempt to flush the input devices, we don't succeed because evdev won't return part of an event, since we were only asking for 4 bytes, we'd only get -EINVAL back. This could later cause events to be flushed that we shouldn't have gotten. This is a fix for CVE-2013-1940. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f)
2013-03-05DPMS: include GPU screens in DPMS codeAaron Plattner1-14/+31
Otherwise, displays driven by GPU screens remain on all the time. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-01randr: cleanup provider properlyDave Airlie2-10/+24
So in the cold plug server shutdown case, we reap the resources before we call CloseScreen handlers, so the config->randr_provider is a dangling pointer when the xf86CrtcCloseScreen handler is called, however in the hot screen unplug case, we can't rely on automatically reaped resources, so we need to clean up the provider in the xf86CrtcCloseScreen case. This patch provides a cleanup callback from the randr provider removal into the DDX so it can cleanup properly, this then gets called by the automatic code for cold plug, or if hot unplug it gets called explicitly. Fixes a number of random server crashes on shutdown Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58174 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=891140 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-03-01xf86: actually set the compat output in the failure caseDave Airlie1-2/+4
The previous fix for the previous fix, didn't fully work, If we don't set compat_output we end up doing derferences of arrays with -1, leading to valgrind warnings. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-03-01xfree86/hotplug: cleanup properly if the screen fails to initialiseDave Airlie1-1/+6
Due to another bug, the modesetting/udl driver would fail to init properly on hotplug, when it did the code didn't clean up properly, and on removing the device the server could crash. Found in F18 testing. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2013-02-14XQuartz: Ensure <dix-config.h> is included in capabilities.cJeremy Huddleston Sequoia1-0/+4
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-11xf86: use nt_list_for_each_entry_safe to walk InputHandlers in xf86WakeupAaron Plattner1-2/+2
This is necessary when the input handler deletes itself from the list. Bug found by Maarten Lankhorst, this patch uses the list macros instead of open-coding the fix. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-11xfree86: Man page shouldn't say Device is mandatory anymoreBryce Harrington1-7/+4
man xorg.conf states that the 'Device' identifier is required in the 'Screen' section, yet current xserver defaults properly and boots up fine without it. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=20742 Signed-off-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-11xfree86: Use fbdev/vesa driver on Oaktrail, Medfield, CDV rather than -intelBryce Harrington1-8/+56
Instead of defaulting to -intel for Oaktrail, Medfield, and CDV chips, default to -fbdev. For Poulsbo (only), attempt to use -psb if it's installed, and fallback to fbdev otherwise. All other Intel chips should use -intel. This fixed an issue where -intel would load on these chips and cause a boot failure. Newer -intel drivers avoid the boot hang, but it's still the wrong driver to load, so why take chances. The patch was originally created by Stefan Dirsch for OpenSUSE. We have included it in our stable release (Ubuntu "quantal" 12.10) since December. ref: https://bugzilla.novell.com/show_bug.cgi?id=772279 ref: https://bugs.launchpad.net/ubuntu/+bug/1069031 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60514 Signed-off-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-08Short-cut the input device cleanup process during AbortServer()Peter Hutterer1-1/+1
If we're about to abort, we're already in the signal handler and cannot call down to the default device cleanup routines (which reset, free, alloc, and do a bunch of other things). Add a new DEVICE_ABORT mode to signal a driver's DeviceProc that it must reset the hardware if needed but do nothing else. An actual HW reset is only required for some drivers dealing with the HW directly. This is largely backwards-compatible, hence the input ABI minor bump only. Drivers we care about either return BadValue on a mode that's not DEVICE_{INIT|ON|OFF|CLOSE} or print an error and return BadValue. Exception here is vmmouse, which currently ignores it and would not reset anything. This should be fixed if the reset is required. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-02-08xfree86: bail on misformed acpi strings (#73227)Ted Felix1-3/+6
If acpid sends a string in a format that we can't parse, bail out instead of potentially dereferencing a NULL-pointer. X.Org Bug 73227 <http://bugs.freedesktop.org/show_bug.cgi?id=73227> Signed-off-by: Ted Felix <ted@tedfelix.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-08dmx: don't include dmx-config.h from xdmxconfig (#37502)Peter Hutterer1-3/+0
dmx-config.h is a server header which includes dix-config.h. That again defines a bunch of server-specifics, including setting the size of XID to 32 bit. libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being 16 bytes smaller in xdmxconfig than in the library, causing garbage to be sent to the server. X.Org Bug 37502 <http://bugs.freedesktop.org/show_bug.cgi?id=37502> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-01-20Merge remote-tracking branch 'jturney/xserver-next'Keith Packard9-74/+154
2013-01-20Merge remote-tracking branch 'whot/for-keith'Keith Packard5-10/+16
2013-01-16hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOWJon TURNEY1-32/+27
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is ↵Jon TURNEY1-0/+13
updated correctly Use ITaskBarList interface to ensure that the taskbar notices if the window has changed it's style in a way which affects if the taskbar shows it or not. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Ensure full styling is applied when the window is mappedJon TURNEY1-20/+28
Move styling update code from WM_WM_HINTS_EVENT to a function UpdateStyle(), which is also invoked from WM_WM_MAP3, so everything which needs to be done to style the window happens when it is mapped (Otherwise, the appearance of the window is sensitive to the timing of the notification of the windows appearance hint properties being set relative to window creation. e.g. see [1]) [1] http://sourceware.org/ml/cygwin-xfree/2012-06/msg00004.html Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Make sure that WM_WM_HINTS_EVENT does nothing for override-redirect ↵Jon TURNEY1-0/+6
windows Future work: It looks like this code could be rationalized quite a lot: It might make sense to pull the checking for override-redirect up out of UpdateIcon() and UpdateName() and consolidate WM_WM_MAP2 and WM_WM_MAP3 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Add a new WM_WM_HINTS_EVENT event to update window styleJon TURNEY2-7/+53
Add a new WM_WM_HINTS_EVENT event to update window style if any of the properties which affect window style change Check PropertyNotify events for any of the window properties which we consider to decide on the window style, and update the window style by sending a WM_WM_HINTS_EVENT message to the WM. This allows the styling of the window to change during it's lifetime. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Move reshape code from winUpdateWindowPosition() to the map event ↵Jon TURNEY2-9/+16
handler Move reshape code, which was only used when handling a map event, from winUpdateWindowPosition(), to put it explicitly in the map event handler. Remove 'reshape' parameter from winUpdatePosition(). (Note that there's no handling of the ShapeNotify event to notice when the window shape changes, instead we hook the screen SetShape procedure and reshape the native window then) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Add missing include xwin-config.h to winglobals.hRyan Pavlik1-0/+4
winglobals.h checks if RELOCATE_PROJECTROOT is defined to see if a declaration of g_fLogFileChanged is needed, so must include xwin-config.h Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-11xfree86: don't access the old input handler after freeing itPeter Hutterer1-4/+6
Introduced in 323869f3298cbbfe864af9404a8aed1bf7995d79 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-11xf86: bump input ABI version to 19Dave Airlie1-1/+1
The changes to miPointerSetPosition interface from int->double breaks the SIS driver build, so time to bump this. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-11xfree86: update the device state for all DGA events (#59100)Peter Hutterer1-3/+6
DGA only handles master devices but it does intercept slave device events as well (since the event handlers are per event type, not per device). The DGA code must thus call into UpdateDeviceState to reset the button/key state on the slave device before it discards the remainder of the event. Test case: - Passive GrabModeSync on VCP - Press button - Enable DGA after ButtonPress - AllowEvents(SyncPointer) - Release button The button release is handled by DGAProcessPointerEvent but the device state is never updated, so the slave ends up with the button permanently down. And since the master's button state is the union of the slave states, the master has the button permanently down. X.Org Bug 59100 <http://bugs.freedesktop.org/show_bug.cgi?id=59100> Reported-by: Steven Elliott <selliott4@austin.rr.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-11xfree86: set event->detail for DGA pointer eventsPeter Hutterer1-0/+1
Reported-by: Steven Elliott <selliott4@austin.rr.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-01-11Fix two typos "requires an string value"Peter Hutterer2-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-10hw/xwin: Fix MinGW build of winSetAppModelID.cJon TURNEY1-0/+1
Add missing #include <pthread.h> In file included from /jhbuild/checkout/xorg/xserver/hw/xwin/winSetAppUserModelID.c:31:0: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:140:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:141:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:142:11: error: expected declaration specifiers or ‘...’ before ‘pthread_mutex_t’ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-10hw/xwin: Process one Windows message per wakeup, rather than all of them.Jon TURNEY2-18/+18
De-queuing Windows messages and X events happens in the same thread of execution. Draining the windows message queue can lead to the X event queue overflowing if lots of those windows messages cause X events (e.g. if a keyboard macro program has just dumped thousands of keypresses into the Windows message queue). See the mailing list thread [1] for more details. Processing one Windows message per wakeup, rather than all of them gives the X server a chance to do stuff as well after each message. [1] http://cygwin.com/ml/cygwin-xfree/2010-01/msg00056.html Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-10hw/xwin: Fix some comments in winkeybd.cJon TURNEY1-4/+4
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-10hw/xwin: Bring the X screen window to the front on a single left-click on ↵Jon TURNEY1-1/+1
the tray icon Bring the X screen window to the front on a single left click on the tray icon, like the comment says we do Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-08hw/xfree86: Require only one working CRTC to start the server.Keith Packard1-4/+11
Instead of requiring every mode set to complete successfully, start up as long as at least one CRTC is working. This avoids failures when one or more CRTCs can't start due to mode setting conflicts. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-12-19Merge remote-tracking branch 'jeremyhu/master'Keith Packard3-147/+88
2012-12-19Merge remote-tracking branch 'yselkowitz/master'Keith Packard39-247/+247
I checked this patch with diff -w to check that it only affected whitespace.
2012-12-18XQuartz: Don't add the 15bit visual any moreJeremy Huddleston Sequoia2-7/+14
Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18XQuartz: Revert some unfortunate auto-indenting mishaps with our ↵Jeremy Huddleston Sequoia1-140/+74
super-nested for-loops Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18hw/dmx: fix build without GLXRob Clark1-1/+1
Fixes this compile break that showed up on arm recently: dmxinit.c:746:26: error: 'glxSupported' undeclared (first use in this function) dmxinit.c:746:26: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-12-17xfree86: print message to the log when zapping the serverPeter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-12-12Revert "xf86: Fix non-PCI configuration-less setups"Dave Airlie1-8/+0
This reverts commit 76d9c62eb2be2010a19bf36285012d086cdd180b. This breaks multi-GPU setups here, so lets drop it for now. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-12dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5Dave Airlie1-2/+5
This commit regresses dri1 since it moves the drmSetServerInfo from being called at module load time to extension init time. However DRIScreenInit relies on this being called before it gets control. This patches moves the call into DRIScreenInit and seems to work here. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-05Fix formatting of address operatorsYaakov Selkowitz39-247/+247
The formatter confused address operators preceded by casts with bitwise-and expressions, placing spaces on either side of both. That syntax isn't used by ordinary address operators, however, so fix them for consistency. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-29hw/dmx: add update_desktop_dimensions() callSybren van Elderen1-0/+2
The Xdmx server did not update the desktop dimensions when computing screen origins. Signed-off-by: Sybren van Elderen <sowmestno@msn.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-28Merge remote-tracking branch 'jturney/mingw-patches'Keith Packard4-2/+8