summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-09-21randr: Add Border property supportrandrAaron Plattner7-16/+229
Add helpers to RandR to allow the DDX (or rather the driver loaded by the DDX, for xfree86) to specify how many dimensions of adjustments it supports. Check for this property and adjust the CRTC raster size accordingly when computing the transformed framebuffer size read. This implements the properties described in http://lists.x.org/archives/xorg-devel/2011-August/024163.html Use these properties to adjust the effective size of the mode during modesets and when the shadow code is enabled. Save the current effective border and mode dimesions in the xf86CrtcRec for driver use. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-21xfree86/modes: Make cursor position transform a helper functionAaron Plattner2-26/+39
When the driver can handle the crtc transform in hardware, it sets crtc->driverIsPerformingTransform, which turns off both the shadow layer and the cursor's position-transforming code. However, some drivers actually do require the cursor position to still be transformed in these cases. Move the cursor position transform into a helper function that can be called by such drivers. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2011-09-21xfree86/modes: Let the driver handle the transformAaron Plattner3-71/+107
If a driver can use hardware to handle the crtc transform, then there's no need for the server's shadow layer to do it. Add a crtc flag that lets the driver indicate that it is handling the transform. If it's set, consider the transformed size of the screen but don't actually enable the shadow layer. Also stop adjusting the cursor image and position. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2011-09-21Merge remote-tracking branch 'mattst88/for-keith'Keith Packard121-4203/+3244
2011-09-21Merge remote-tracking branch 'alanc/master'Keith Packard12-532/+610
2011-09-21Merge remote-tracking branch 'jamey/reviewed'Keith Packard41-242/+99
2011-09-21xkb: add missing swaps for xkbGetDeviceInfoReplyPeter Harris1-0/+3
Caught during review of e095369bf. Signed-off-by: Peter Harris <pharris@opentext.com> Reviewed-by-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Use __builtin_constant_p to determine if we can use lswaplMatt Turner1-2/+13
If the address of the swapped memory location is known at compile time, we can check its alignment at no runtime cost and use lswapl instead. text data bss dec hex filename before: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg after: 1864396 52136 78040 1994572 1e6f4c hw/xfree86/Xorg bswap instructions: 131 -> 308 (used in lswapl) rol instructions: 943 -> 1174 (used in lswaps) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Use lswap{l,s} in cpswap{l,s}Matt Turner1-8/+6
Should be safe since cpswap isn't used on pointers. text data bss dec hex filename before: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg after: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg bswap instructions: 5 -> 131 (used in lswapl) rol instructions: 811 -> 943 (used in lswaps) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Make lswap{l,s} inline functionsMatt Turner1-6/+12
text data bss dec hex filename before: 1875668 52136 78040 2005844 1e9b54 hw/xfree86/Xorg after: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Add type checking to swap macrosMatt Turner1-0/+16
The original macros are retained (instead of replacing them with inline functions) because of implicit type promotion. That is, an int16 passed to an inline function taking int32 would be implicitly promoted to int32 without a warning. Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Introduce swap_uint{16,32} functions, used in swap{l,s}Matt Turner1-10/+20
Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Cast char* buffers to swap functionsMatt Turner3-11/+11
Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Use correct swap{l,s} (or none at all for CARD8)Matt Turner9-25/+13
Swapping the wrong size was never caught because swap{l,s} are macros. It's clear in the case of Xext/xres.c, that the author believed client_major/minor to be CARD16 from looking at the code in the first hunk. v2: dmx.c fixes from Keith. Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21fb: Rename wfbTriangles and wfbTrapezoidsAaron Plattner1-0/+2
These symbols were not renamed when they were added to libfb: # nm -D libwfb.so | grep ' fb' 0000000000028d00 T fbTrapezoids 0000000000028d60 T fbTriangles This causes corruption and/or crashes on wfb-ful drivers like nvidia: Program received signal SIGABRT, Aborted. 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in ../nptl/sysdeps/unix/sysv/linux/raise.c (gdb) bt #0 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007fd67f3a3680 in *__GI_abort () at abort.c:92 #2 0x00007fd67f3995b1 in *__GI___assert_fail (assertion=0x7fd679ecb804 "key->initialized", file=<optimized out>, line=116, function=0x7fd679ecbbc0 "dixGetPrivateAddr") at assert.c:81 #3 0x00007fd679ec55b6 in ?? () from /usr/lib/xorg/modules/libfb.so #4 0x00007fd679eca9ef in ?? () from /usr/lib/xorg/modules/libfb.so #5 0x00007fd679ecae20 in fbTriangles () from /usr/lib/xorg/modules/libfb.so #6 0x00007fd67a58fc55 in ?? () from /usr/lib/xorg/modules/drivers/nvidia_drv.so #7 0x00000000004f38d1 in ?? () #8 0x0000000000437ae9 in ?? () #9 0x0000000000426eaa in ?? () #10 0x00007fd67f38cead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff99860d78) at libc-start.c:228 #11 0x000000000042719d in _start () Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21Use internal temp variable for swap macrosMatt Turner115-4140/+3164
Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Silence printf format warnings in helper_exec.cMatt Turner1-16/+16
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Replace Fabs() macro with fabs() functionMatt Turner4-8/+5
gcc generates better code with fabs() anyway. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21Remove unnecessary #undefs of [f]abs and old commentsMatt Turner2-12/+0
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21devbook.am: maintenance update from docbook.amGaetan Nadon1-26/+19
The developer docs are generated from a subset of docbook.am which is sometimes updated. The one difference for xserver is the embedded css style in the HEAD element. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21docbook.am: embed css styles inside the HTML HEAD elementGaetan Nadon1-2/+0
Rather than referring to the external xorg.css stylesheet, embed the content of the file in the html output produced. This is accomplished by using version 1.10 of xorg-xhtml.xsl. This makes the whole html docs tree much more relocatable. In addition, it eliminates xorg.css as a runtime file which makes xorg-sgml-doctools a build time only package. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21docbook.am: global maintenance update - entities, images and olinkingGaetan Nadon1-54/+62
Adding support in libX11 for html chunking caused a reorg of docbook.am as well as the xorg-sgml-doctools masterdb for olinking. The parameter img.src.path is added for pdf images. A searchpath to the root builddir is added for local entities, if present. This feature was initiated by xserver module and made available to all. The docbook.am makefile hides all the details and is identical for all 22 modules having DocBook documentation. It is included by a thin Makefile.am which requires no docbook knowledge. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21DRI2: Allow DDX to validate swap_limit changesPauli Nieminen2-1/+25
DDX can now implement validation for swap_limit changes to prevent configurations that are not support in driver. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> CC: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-09-21DRI2: Expose API to set drawable swap limit.Pauli Nieminen2-0/+24
This allows ddx to set swap_limit if there is more than one back buffer for drawable. Setting swap_limit has to also check if change affects a client that is blocked. This can be used to implement N-buffering in driver with minimal logic in allocation and selecting next back. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21DRI2: Add ReuseBufferNotify hookPauli Nieminen2-1/+23
ReuseBufferNotify hook is called whenever old buffer is reused in DRI2 code. Driver can use this hook to rewrite the buffer name if hardware requires shared buffers. Shared buffer might be some hardware limited resources like framebuffer that is preallocated in boot. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21print DisplayMode type bitsvdb@picaros.org1-7/+48
Dear, A patch I posted on xorg-devel was reviewed and is ready for inclusion in xserver. Would you be willing to apply the patch so that it finds its way into the master branch ? Thank you, Servaas Vandenberghe. http://lists.x.org/archives/xorg-devel/2011-August/024769.html http://lists.x.org/archives/xorg-devel/2011-August/024777.html This patch adds printing of the DisplayMode type bits to xf86PrintModeline(). It helps to trace the modeline origin and to understand the initial configured modeline. Reviewed-by: Alex Deucher <alexander.deucher at amd.com> Signed-off-by: Servaas Vandenberghe Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21Merge remote-tracking branch 'kibi/master'Keith Packard2-6/+2
2011-09-21xfree86: Bump extension ABI version to 6.0Aaron Plattner1-1/+1
The video driver ABI was bumped to 11.0 in commit 0de7cec90738a7a5020150309866bb0e23b6f479 because of a change to the size of ATOM in commit 51f353d0a0d116af16d7d9590cadef6c56328746. This also affects extension modules, so the extension ABI version should have been bumped too. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-20Space & style cleanup of hw/xfree86/i2c/fi1236.cAlan Coopersmith1-466/+536
Fortunately, the massive decrease in the cost of whitespace in the past decade has allowed us to be much more generous with it, and much more consistent in its application, even for code like this that clearly no one has ever tried to read. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-09-20Cross-reference cvt(1) & gtf(1) man pagesAlan Coopersmith2-4/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-20Remove unused ClientStateAuthenticatingAlan Coopersmith2-15/+5
Appears to be leftover from the Kerberos code deleted in 2007 (commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e). Nothing left ever set clientState to ClientStateAuthenticating Skipped over 1 to preserve existing enum numbering. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-19Fix pixmap double-frees on error paths.Jamey Sharp2-6/+1
If AddResource fails, it will automatically free the object that was passed to it by calling the appropriate deleteFunc; and of course FreeResource also calls the deleteFunc. In both cases it's wrong to call the destroy hook manually. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2011-09-19Eliminate MAXSCREENS-sized CursorScreenKey array.Jamey Sharp8-15/+15
Use new per-screen privates API instead. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-19Revert "Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state"Jamey Sharp2-22/+2
This reverts commit bc0c56c407117d1545e20d21f7d30eb3472d618b since we're breaking ABI anyway. Conflicts: ChangeLog dix/colormap.c dix/pixmap.c dix/window.c include/pixmapstr.h Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2011-09-19Remove unused ClientStateCheckingSecurity & ClientStateCheckedSecurityAlan Coopersmith2-6/+3
Appear to be leftovers from the XC-QUERY-SECURITY code deleted in 2007 (commit 375864cb74cced40ae688078b1f7750998972535). Nothing left ever set clientState to ClientStateCheckingSecurity. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-19sun_init.c: Implement novtswitch & sharevts for SolarisAlan Coopersmith1-3/+13
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: John Martin <john.m.martin@oracle.com>
2011-09-19Replace XmuSnprintf with snprintf.Jamey Sharp9-32/+31
Alan Coopersmith explains: XmuSnprintf() can be replaced by snprintf() now. (It was a implementation X provided for it's libraries to use in the days before all platforms we cared about had snprintf in libc.) Reported-by: walter harms <wharms@bfs.de> Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-18xnest: Delete unused nClipRects GC-private field.Jamey Sharp2-4/+0
This field was never read at any time in the git history. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-18XineramaInitData ignores its argument. Quit passing one.Jamey Sharp3-8/+8
Also fix up XineramaInitData's caller, XineramaReinitData. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-18dmx: Fix some "no previous prototype" warnings by making functions static.Jamey Sharp3-43/+39
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
2011-09-18dmx: Fix a non-constant printf format string warning.Jamey Sharp1-2/+2
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-16sun_init.c: Move vt switches to a switch_to helper function like lnx_init.cAlan Coopersmith1-11/+19
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-16Xorg.man: Add -novtswitch and -sharevts optionsAlan Coopersmith1-0/+7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-16xfree86: move -novtswitch & -sharevts argument handling up to common layerAlan Coopersmith5-30/+28
Stop duplicating in each os-support variant before it gets replicated even further. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
2011-09-16configure.ac: Remove unreachable check for VM86 headers.Jamey Sharp2-10/+0
"configure --with-int10" is not a valid configuration, and the check for sys/vm86.h and sys/io.h is not used. Delete it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-15int10: Delete #if 0'd implementation that's older than our git history.Jamey Sharp1-13/+1
Throughout the xserver git history, the generic portion of the int10 module has always used other methods for reading the video BIOS. For some time now it's been purely libpciaccess based. This commented-out use of xf86ReadBIOS is entirely superfluous. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-09-15Remove PC98 support.Jamey Sharp10-75/+1
Gaetan Nadon wrote: Alan Coopersmith wrote: "I think we recently dropped PC98 support from the X server, so I'd be okay with dropping the documentation now". Let's make them be right, shall we? Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Gaetan Nadon <memsize@videotron.ca> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-15configure.ac: XORG_OS is not used, so delete it.Jamey Sharp1-8/+0
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-15configure.ac: Remove unused XORG_OS_PCI variable.Jamey Sharp1-3/+0
This is the last mention after ccfaf82367c9d057fd8314ce36b47f0a8eb696b6 quit using the variable. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Tiago Vignatti posted an identical patch in June 2010, which I only noticed after getting the above reviews. His patch was: Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2011-09-15x86emu: There is no NO_INLINE implementation of unaligned access here.Jamey Sharp1-2/+0
Patch produced with: unifdef -UNO_INLINE -B This change isn't relevant to the similar code in hw/xfree86/common/compiler.h, because x86emu is expected to someday move out of xserver entirely and so should not depend on any xserver headers. Also, some platforms apparently do have NO_INLINE versions of compiler.h. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Matt Turner <mattst88@gmail.com>