summaryrefslogtreecommitdiff
path: root/hw/xfree86
AgeCommit message (Collapse)AuthorFilesLines
2012-01-25int10: Fix unmapping of the BIOS scratch areaAdam Jackson1-1/+1
342f3eac8460fc48cfad1f1d7be939d671e6e1cd introduced a bug, 'base' is incremented before use. The old code corrected this when unmapping, so the new code should too. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-15xfree86: Don't link libxorgxkb against libdix.laJeremy Huddleston1-1/+0
libdix.a is already provided by XSERVER_LIBS. Including it in libxorgxkb results can result in duplicate symbols landing in the Xorg binary on some configurations (buggy glibtool on darwin). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-15sdksyms.sh: Exit on error rather than building an empty symbol tableJeremy Huddleston1-0/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-01-13xfree86: mention udev in the xorg.conf manpage AutoAddDevices sectionPeter Hutterer1-4/+4
And point out what "hotplugging" means. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-01-12Revert "dix: Pull client-is-local flag up to the ClientRec"Keith Packard4-7/+7
This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96. ABI change pended for 1.13
2012-01-09Always install xaa sdk headersAdam Jackson2-2/+4
Always install XAA SDK headers so drivers still build even with --disable-xaa Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09UnloadSubModule(): accept pointer value '1' and ignore it.Matthieu Herrb1-0/+3
Some driver modules try to unload submodules that are now built-in. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09vgahw: Fix DACDelay() macro to use the driver's vtableAdam Jackson1-4/+4
We don't want to unconditionally use I/O routines here, since if the driver is using mmap'd VGA ports then the I/O handle won't be set up. Tested-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09linux: Use K_OFF VT KB mode over K_RAW if available.Arthur Taylor1-6/+13
Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in which special keys (like Ctrl+C) are not interpreted and input is not buffered. Use of this mode over K_RAW removes the need for a xf86ConsoleHandler to drain the VT input buffer, removing the grief it causes when it goes wrong or is (de)initialized out-of-order. (This also saves a few needless context switches per key event.) If K_OFF is not defined or not understood by the kernel, K_RAW and the previous method is used as a fall-back. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Arthur Taylor <art@ified.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09Merge commit '777bf90abeac37087a3d0538b847742523d5acf2'Keith Packard5-50/+11
2012-01-09Merge remote-tracking branch 'whot/for-keith'Keith Packard1-5/+6
2012-01-09Merge remote-tracking branch 'kibi/master'Keith Packard1-19/+0
2012-01-06xfree86: Remove the pretense of EDID v2 supportAdam Jackson1-43/+4
We don't do anything with EDID v2 blocks besides publish them on the root window. Worse, the check deleted by this patch would attempt to take a checksum of arbitrary memory if the rawData array isn't 256+ bytes long (and, for the monitors mentioned, it probably is only 128). Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-01-06dix: Pull client-is-local flag up to the ClientRecAdam Jackson4-7/+7
Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-01-05xfree86: split warning about missing identifier or input driverPeter Hutterer1-5/+6
Check for identifier first and bail if it's missing (also remove the current identifier check after we've already bailed due to missing identifiers) If a driver is missing, warn but also say that we may have added this device already. I see too many bugreports with incorrectly shortened log files. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-12-31linux/ia64: Fix regression after domain I/O support code removal.Cyril Brulebois1-19/+0
Side effect of aa0bfb0f133481c57762012e8e30c05ffa151423: | CCLD Xorg | sdksyms.o:(.data.rel+0x27d8): undefined reference to `outl' | collect2: ld returned 1 exit status Since the linux/ia64 domain I/O support code got removed in that commit, there's no reason to keep on declaring those functions (inb, inl, inw, outb, outl, outw). Bugzilla: https://bugs.freedesktop.org/43985 Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-12-27Merge remote-tracking branch 'kibi/master'Keith Packard1-1/+1
2011-12-22xorg.conf.man: Fix bad whatis entry.Cyril Brulebois1-1/+1
Debian's QA tool “lintian” reported a bad whatis entry for the xorg.conf(.d) manpages. It comes with the following pointers: For manual pages that document multiple programs, functions, files, or other things, the part before "\-" should list each separated by a comma and a space. […] Refer to the lexgrog(1) manual page, the groff_man(7) manual page, and the groff_mdoc(7) manual page for details. Indeed, the current situation is: $ whatis xorg.conf; whatis xorg.conf.d xorg.conf (5) - (unknown subject) xorg.conf.d (5) - (unknown subject) With this patch: xorg.conf (5) - configuration files for Xorg X server xorg.conf.d (5) - configuration files for Xorg X server Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-12-22Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Peter Hutterer31-173/+258
multitouch Conflicts: configure.ac dix/inpututils.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-19dri2: Invalidate window pixmapsVille Syrjälä3-4/+6
While a redirected window is flipped, its pixmap may still be used as and EGL image and should also get invalidated. When sending invalidate events for a window, also send the events for its pixmap. Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swapKeith Packard1-1/+30
Without this, when a compositing manager unredirects a fullscreen window which uses DRI2 and page flipping, the DRI2 buffer information for the compositing manager's output window (typically the Composite Overlay Window or root window) may become stale, resulting in all kinds of hilarity. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35452 . [Original patch by Michel Dänzer <michel@daenzer.net>] [Tree walk optimized version by Keith Packard <keithp@keithp.com>] Signed-off-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dri2: Always re-generate front buffer information when asked for it.Michel Dänzer1-0/+1
Otherwise we might keep stale cached information, e.g. after the driver performed page flipping. This is part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=35452 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19dri2: Initialize needInvalidate member of DRI2Drawable.Rami Ylimäki1-0/+1
If the client is not behaving correctly and swaps buffers before getting them, Valgrind will complain about uninitialized memory being used in DRI2InvalidateDrawable. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-19xfree86: bump the input ABI for the touch changesPeter Hutterer1-1/+1
New additions to the API: - InitTouchClassDeviceStruct - xf86PostTouchEvent Changes to the ABI: - DeviceIntRec now contains a TouchClassPtr Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-19Add the touch input API stubsDaniel Stone2-0/+27
xf86PostTouchEvent is the driver API to submit touch events to the server. This API doesn't do anything yet though but now we can at least bump the API. For valuators, drivers should use the existing xf86InitValuatorAxisStruct function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-16xserver: check for elevated privileges not uid=0Antoine Martin3-23/+84
This allows us to run the server as a normal user whilst still being able to use the -modulepath, -logfile and -config switches We define a xf86PrivsElevated which will do the checks and cache the result in case it is called more than once. Also renamed the paths #defines to match their new meaning. Original discussion which led to this patch can be found here: http://lists.freedesktop.org/archives/xorg-devel/2011-September/025853.html Signed-off-by: Antoine Martin <antoine@nagafix.co.uk> Tested-by: Michal Suchanek <hramrach at centrum.cz> Reviewed-by: Jamey Sharp <jamey at minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-14Merge remote-tracking branch 'whot/for-keith'Keith Packard1-2/+2
2011-12-12xf86 parser: convert Error to a varargs macro to clear gcc format warningsAlan Coopersmith15-100/+100
Previously it always passed a format string with exactly one argument, using NULL when the format string needed none. Now pass the right number of arguments to clear gcc warnings of 'too many arguments for format'. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Add some printf format attributes suggested by gccAlan Coopersmith4-5/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12xf86Priv.h: Add some noreturn attributes suggested by gccAlan Coopersmith1-4/+2
Both functions call exit() at the end and have no other return path. Also correct comment/heading to reflect commit 6450f6ca7ee0 moving DoShowOptions into xf86Configure.c. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Remove duplicate declaration of xf86ValidateModesFlags in xf86Modes.hAlan Coopersmith1-4/+0
Clears gcc warning in every file that includes xf86Modes.h: xf86Modes.h:102:1: warning: redundant redeclaration of 'xf86ValidateModesFlags' xf86Modes.h:72:1: note: previous declaration of 'xf86ValidateModesFlags' was here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12DoShowOptions: preserve constness of options list as we walk itAlan Coopersmith1-2/+3
Since all we do with the option list is walk down the list printing the names, there's no need to cast away its constness. Clears gcc warning: xf86Configure.c: In function 'DoShowOptions': xf86Configure.c:781:4: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12x86emu: constify debug stringsAlan Coopersmith4-14/+14
Strings are all pointers to literal constants, just used as input to printf calls when debugging is enabled. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Even more correctly free config file namesAlan Coopersmith1-8/+9
If we didn't go into the if (!autoconfig) { } block, the filename, dirname, and sysdirname pointers were never initialized, but we freed them outside the block, leading to potential memory corruption. Move the frees inside the block where they're initialized to avoid this. To avoid similar problems, move the declarations of the variables that are only used in this block inside the block. Regression introduced by commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 Found by gcc warning: xf86Config.c: In function 'xf86HandleConfigFile': xf86Config.c:2303:11: warning: 'filename' may be used uninitialized in this function xf86Config.c:2303:22: warning: 'dirname' may be used uninitialized in this function xf86Config.c:2303:32: warning: 'sysdirname' may be used uninitialized in this function Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2011-12-10xf86RegisterRootWindowProperty is confused about xnfcallocAlan Coopersmith1-8/+3
It will never return NULL, so don't try to handle a NULL condition, since that just confuses programmers and static analyzers. It uses calloc, so all the allocated memory is cleared, so there's no point looping over the memory to manually initialize it NULL. And just because it's annoying, it doesn't need to be the only place in this file to do if (NULL==...) instead of if (... == NULL). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2011-12-10Change GetXI2/XI/CoreType to just take a type argumentPeter Hutterer1-2/+2
Avoids the dummy-event dance if we have an event type and need to get the matching XI2 type. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-08Merge remote-tracking branch 'whot/for-keith'Keith Packard2-1/+5
2011-12-09xfree86: include xorg-config.h from xaalocal.hPeter Hutterer1-0/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-09xfree86: bump the input ABIPeter Hutterer1-1/+1
The last few patches broke the ABI, bump it for convenience. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-07Merge remote-tracking branch 'airlied/reviewed-fixes'Keith Packard2-8/+11
2011-12-07Merge remote-tracking branch 'alanc/master'Keith Packard2-1/+4
2011-12-07hw/xfree86: fix segfault in config parser when config dir is missingKeith Packard1-0/+4
Treat a scandir error from a missing (or unusable) directory return as if it simply returned no files at all, which is what we want. cc: Paulo Zanoni <przanoni@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-06xaa: avoid possible freed pointer reuse in epilogueDave Airlie1-0/+1
If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps avoid this by clearing the flags in to be destroyed pGCPriv. Reported by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-06fbdevhw: iterate over all modes that match a mode. (v3)Adam Jackson1-8/+10
So on RHEL5 anaconda sets an xorg.conf with a fixed 800x600 mode in it, we run radeonfb and fbdev since ati won't work in userspace due to domain issues in the older codebase. On certain pseries blades the built-in KVM can't accept an 800x600-43 mode, it requires the 800x600-60 mode, so we have to have the kernel radeonfb driver reject the 800x600-43 mode when it sees it. However then fbdev doesn't try any of the other 800x600 modes in the modelist, and we end up getting a default 640x480 mode we don't want. This patch changes the mode validation loop to continue on with the other modes that match to find one that works. v2: move code around to avoid extra loop, after comment from Jamey. v3: move loop setup back into loop as per Jeremy's review. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-05LoaderOpen returns either a valid pointer or NULL, so don't check for < 0Alan Coopersmith1-1/+1
Fixes Sun cc warning that was recently elevated to error by the stricter default CFLAGS changes to xorg-macros: "loadmod.c", line 914: improper pointer/integer combination: op "<" Should have been changed when commit ab7f057ce9df4e905b12 changed the LoaderOpen return type from int to void *. Changes log message when file is found but dlopen() fails from: (EE) LoadModule: Module dbe does not have a dbeModuleData data object. (EE) Failed to load module "dbe" (invalid module, 0) to: (EE) Failed to load module "dbe" (loader failed, 7) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-05Fix gcc warnings about redundant declarations of fallback functionsAlan Coopersmith1-0/+3
Ensure ffs, strndup, strlcat, etc. aren't defined by our headers if they're already defined in the system headers. This does export the HAVE_FFS, HAVE_STRNDUP, etc. definitions to drivers, but if you built the Xserver with a libc that had those, and then build the drivers with a less capable libc, you're going to have problems anyway, and this should solve some reported problems with conflicts between our strndup definition and gcc magic for it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-01Remove another if (E != NULL) check around free(E)Matt Turner1-2/+0
I wonder if there are any other patterns we haven't seen yet? Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-24parser: free val.str after xstrtokenizePaulo Zanoni1-0/+9
After we tokenize val.str, we discard it. This is just one example: 6 bytes in 1 blocks are definitely lost in loss record 24 of 652 at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x4D744D: xf86getToken (scan.c:400) by 0x4D75F1: xf86getSubToken (scan.c:462) by 0x4DB060: xf86parseInputClassSection (InputClass.c:145) by 0x4D664C: xf86readConfigFile (read.c:184) by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) by 0x49AA77: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-11-24parser: free val.str after xf86getBoolValuePaulo Zanoni1-0/+6
After we convert the value to a boolean, we discard the string. This is just one example: 3 bytes in 1 blocks are definitely lost in loss record 5 of 657 at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) by 0x4D744D: xf86getToken (scan.c:400) by 0x4D75F1: xf86getSubToken (scan.c:462) by 0x4DB3E0: xf86parseInputClassSection (InputClass.c:189) by 0x4D664C: xf86readConfigFile (read.c:184) by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) by 0x49AA77: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-11-24parser: free scandir's listPaulo Zanoni1-3/+3
v2: move the free()s to the function that calls scandir 80 bytes in 1 blocks are definitely lost in loss record 411 of 631 at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) by 0x4C27927: realloc (vgpreload_memcheck-amd64-linux.so) by 0x696A80D: scandir (scandir.c:108) by 0x4D8828: OpenConfigDir (scan.c:854) by 0x4D8A43: xf86openConfigDirFiles (scan.c:952) by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) by 0x49A9E3: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>