summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-01-12hw/xfree86: More const declarations for stringsKeith Packard2-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12Just remove dpms functsion from xf86.hKeith Packard1-4/+0
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12Bunch of DMX warning fixesKeith Packard7-34/+15
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12More warning fixes in hw/xfree86Keith Packard3-12/+15
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12xfree86 warning reductionKeith Packard15-77/+56
This gets the easy warnings, mostly constant string problems. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12xfree86/common: Warning fixes. Mostly const string handling.Keith Packard24-74/+88
Also removes DPMS functiosn from Xext/dpmsproc.h Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12hw/xfree86: Lots of constant string supportKeith Packard17-107/+109
Make lots of string pointers 'const char' so that we can use constant strings with them without eliciting warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12hw/xfree86: Make strings in DriverRec and ScrnInfoRec constKeith Packard1-7/+7
This avoids compiler warnings when initializing with string constants. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-12XQuartz: Use asl_log_descriptor to log stdout/stderr of child processesJeremy Huddleston Sequoia1-4/+4
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-12-10hw/xwin/glx: Rewrite WGL wrappers after Xserver conversion to direct GL dispatchJon TURNEY7-395/+643
v1: Rewrite by Marc Haesen of the WGL wrapper function generation script to use Khronos group XML. v2: Remove -dispatchheader option, since dispatch.h doesn't exist anymore, use the private glapi interface to construct the GL dispatch table for the native WGL thunks. v3: Rewrite to generate shims for the OpenGL 1.2.1 (GL 1.2 + GL_ARB_imaging +GL_ARB_multitexture + GL_ARB_texture_compression(?)) functions the server links directly with rather than libGL. These shims dispatch to either the mesa GL DLL, or a thunking DLL containing cdecl-to-stcall wrapper functions for the native GL DLL. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-10ephyr: Fix compilation when ./configure'd with --enable-debugJon TURNEY1-4/+4
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) Fix ephyr compilation when ./configure'd with --enable-debug after commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were not converted to screen->pScreen->myNum. v2: Don't use a trivial local variable which will be unused when ./configure'd with --disable-debug Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-10xquartz/glx: Convert to non-glapi dispatchAdam Jackson1-13/+13
CGL doesn't have anything like glXGetProcAddress, and the old code just called down to dlsym in any case. It's a little mind-warping since dlopening a framework actually loads multiple dylibs, but that's just how OSX rolls. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-12-09xfree86: Prefer fbdev to vesaAdam Jackson2-9/+10
On UEFI machines you'd prefer fbdev to grab efifb instead of vesa trying to initialize and failing in a way we can't unwind from. On BIOS machines this is harmless: either there is an fbdev driver and it'll probably be more capable, or there's not and vesa will kick in anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-12-09composite: Automatically enable backing store support on the screenAdam Jackson1-0/+5
... unless you explicitly disabled it with -bs on the command line, or with the corresponding thing in xorg.conf. v2: Drop a bogus hunk from compChangeWindowAttributes [vsyrjala] v3: s/TRUE/WhenMapped/ [jcristau] Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-12-09bs: Set the screen's bs support level to WhenMappedAdam Jackson1-1/+1
Since we're using RedirectAutomatic to do this, we don't actually preserve contents when unmapped. v2: Don't say WhenMapped if Composite didn't initialize [vsyrjala] Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-12-09dri2: Disable when Xinerama is activeAdam Jackson1-0/+5
Would only work on ScreenRec 0, which means it's broken. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-11-26Xdmx: Initialize DMX extension even if not built with GLX supportAlan Coopersmith1-1/+3
dmxAddExtensions takes an argument to determine if it should just initialize the DMX extension, or both DMX & GLX, but if GLX wasn't compiled in, the entire call was #ifdef'ed out, leaving the DMX extension unavailable. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-23xnest: Ignore GetImage() error in xnestGetImage() (v3)Keith Packard1-1/+0
(I found an amended version of this patch and applied the difference here - keithp) v3: Don't call Xsync before restoring error handler as any errors generated by XGetImage() should be processed when this call returns as suggested by Jamey Sharp <jamey@minilop.net> Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2013-11-14Merge remote-tracking branch 'whot/for-keith'Keith Packard5-8/+19
2013-11-14xfree86: return NULL for compat output if no outputs.Dave Airlie1-0/+3
With outputless GPUs showing up we crash here if there are not outputs try and recover with a bit of grace. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14Stop including inline assembly .il file for Solaris Studio buildsAlan Coopersmith1-11/+0
Since all the inb/outb/etc. use in the X server itself (except for xf86SlowBcopy) has been replaced by calls to libpciaccess, we no longer need to pass inline assembly files to replace the gcc inline assembly from hw/xfree86/common/compiler.h when building Xorg itself. The .il files are still generated and installed in the SDK for the benefit of drivers who may use them. Binary diff of before and after showed that xf86SlowBcopy was the only function changed across the Xorg binary and all modules built in the Xserver build, it just calls the outb() function now instead of having the outb instructions inlined, making it a slightly slower bcopy. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: fix cursor jumps on CursorOffScreen behaviorPeter Hutterer1-4/+4
This patch fixes cursor jumps when there is a grab on the Xephyr window and the pointer moves outside the window. So on two side-by-side 640x480 screens, a coordinate of 0/481 triggers KdCursorOffscreen. If the delta between two screens is 0, they share the same offset for that dimension. When searching for the new screen, the loop always rules out the current screen. So we get to the second screen, trigger the conditions where dy <= 0 and decide that this new screen is the correct one. The result is that whenever KdCursorOffScreen is called, the pointer jumps to the other screen. Change to check for dy < 0 etc. so that the cursor stays on the same screen if there is no other screen at the target location. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to thatPeter Hutterer3-1/+11
A multi-head Xephyr instance has the pointer stuck on one screen because of bad coordinate calculation. The coordinates passed to GetPointerEvents are per-screen, so the cursor gets stuck on the left-most screen by default. Adjust and mark the events as POINTER_DESKTOP, so the DIX can adjust them accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: handle WxH as valid geometry specKeith Packard1-1/+2
If a screen size was specified as WxH, the loop returned early and kdOrigin was never advanced. Thus, screen->origin was always 0 (or whatever was given at the -origin commandline flag). If a screen size was given with a bit depth (WxHxD), kdOrigin would always advance by the current screen, offsetting the next screen. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-14ephyr: xcb_connect returns an error, not NULLPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-12xfree86: Fix build without libpciaccessJeremy Huddleston Sequoia1-1/+4
Regression fix from commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Connor Behan <connor.behan@gmail.com>
2013-11-12Avoid conflicts with Solaris <sys/regset.h> defines that clash with our namesAlan Coopersmith3-1/+30
When building on Solaris with _XOPEN_SOURCE set to a recent XPG release, <stdlib.h> and other core headers start including <sys/regset.h>, which has a bunch of unfortunately named macros such as "CS", "ES", etc. for x86 & x64 registers which clash with existing variable & struct member names in Xorg - so #undef these so they don't interfere with our use. (Yes, have filed a bug against the system headers for exposing these, but this solves the problem for building on existing releases.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-10XQuartz: Don't sleep forever on exit if usleep() returns an errorJeremy Huddleston Sequoia1-1/+1
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-10XQuartz: Update Info.plist copyright yearsJeremy Huddleston Sequoia1-2/+2
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-06ARM64: Add support for aarch64Andreas Schwab2-2/+3
Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-05Link with xshmfence, reference miSyncShmScreenInit in sdksymsKeith Packard1-0/+3
This gets the server to link with xshmfence again, and also ensures that the miSyncShm code is linked into the server with the reference from sdksyms. Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-04hw/xfree86: Link libdri3 only when DRI3 is definedKeith Packard1-1/+6
Don't attempt to link non-existant libraries... Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched ↵Egbert Eich1-7/+9
away A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to crash when xf86SetViewport() which does not check if the hardware is accessible. Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch()Egbert Eich1-9/+22
When enabling/disabling input handlers in xf86VTSwitch() we treat Input- and GeneralHandlers equally. The result is that after a VT switch the masks for EnabledDevices and AllSockets are equal and the distiction between both types is lost. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/modes: Add a sanity check when using screen sizes from EDIDEgbert Eich1-4/+16
EDID sometimes lies about screen sizes. Since the screen size is used by clients to determine the DPI a wrong ration will lead to terrible looking fonts. Add a sanity check for the h/v ratio cutting off at 2.4. This would still accept the cinemascope aspect ratio as valid. Also add message suggesting to add a quirk table entry. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31DDX/DPMS: Call dixSaveScreens() also when screen is turned onEgbert Eich1-1/+8
DMPS calls dixSaveScreens() when turned off but not when turned on. In most cases this is irrelevant as DPMS is done when a key is hit in which case dixSaveScreens() will be called to unblank anyhow. This isn't the case if we use xset (or the DPMS extension directly) to unblank. Check screenIsSaved to make sure the state needs to be changed before calling dixSaveScreens(). Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31ephyr: Ensure stride of private framebuffer is multiple of 4Søren Sandmann Pedersen1-7/+8
The fb layer of X can't deal with strides that are not a multiple of 4, so when Xephyr allocates its own framebuffer it should make sure to align it. This fixes crashes and rendering corruption when Xephyr runs in a depth that is different from the host X server and its screen size is not a multiple of 4 / depth. (This is particularly easy to trigger if you use the -resizeable option). Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Soren Sandmann <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_lineSøren Sandmann Pedersen1-3/+6
When the depth of the Xephyr server matches that of the host X server, Xephyr simply uses the buffer associated with the XImage as its framebuffer. In this case, it is correct to get the bits_per_pixel and bytes_per_line values returned from hostx_screen_init() from the XImage. However, when the depth doesn't match the host, Xephyr uses a private framebuffer that is periodically copied to the XImage. In this case, the returned values of bits_per_pixel and bytes_per_line should be those of the private framebuffer, not those of the XImage. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Soren Sandmann <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideoSøren Sandmann Pedersen1-0/+2
After fc3ab84d the pVideo field in DevToConfig[i] is no longer initialized, so it's always NULL. This causes the duplicate finding algorithm in the beginning of the function to not work anymore as it is based on this field. The symptom of this bug is that X -configure reports Number of created screens does not match number of detected devices. Configuration failed. Server terminated with error (2). Closing log file. rather than producing a working config file. This patch fixes that bug by initializing the field before calling xf86PciConfigureNewDev(). Cc: tvignatti@gmail.com Signed-off-by: Soren Sandmann <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Merge remote-tracking branch 'jeremyhu/master'Keith Packard1-2/+2
2013-10-31present: Add Present extensionKeith Packard1-0/+3
Provides both a software implementation using timers and driver hooks to base everything on vblank intervals. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31dri3: Add DRI3 extensionKeith Packard3-1/+6
Adds DRM compatible fences using futexes. Uses FD passing to get pixmaps from DRM applications. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31XQuartz: Bump bundle version to 2.7.6Jeremy Huddleston Sequoia1-2/+2
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-10-30xfree86: Bump video/input/extension ABIs for 1.15Adam Jackson1-3/+3
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-30kdrive/ephyr: Don't discard one-time driver structure at server resetKeith Packard1-2/+0
KdScreenInfo is constructed at server startup time, and not re-generated at server reset time. Freeing the 'driver' element at reset time means this information is lost, and the server crashes pretty quickly afterwards. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-30randr: send RRResourceChangeNotify eventMichal Srb1-0/+5
Send RRResourceChangeNotify event when provider, output or crtc was created or destroyed. I.e. when the list of resources returned by RRGetScreenResources and RRGetProviders changes. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Michal Srb <msrb@suse.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-29Merge remote-tracking branch 'whot/for-keith'Keith Packard2-7/+7
2013-10-30dmx: queue button events with a flags of 0Peter Hutterer1-2/+1
Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set the flags to 0 so we don't generate any motion on a button event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-10-29xfree86: Find primary entity when bus types are nominally differentConnor Behan1-1/+3
As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as their primary bus type. However, drivers not implementing a platformProbe function will still create entities of type BUS_PCI. We need to account for this when checking for the primary entity. Signed-off-by: Connor Behan <connor.behan@gmail.com> Acked-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-29Merge remote-tracking branch 'idr/glx-float-fbconfig'Keith Packard3-9/+44