summaryrefslogtreecommitdiff
path: root/hw/xfree86
AgeCommit message (Collapse)AuthorFilesLines
2012-11-05dix: fix redundant redeclaration warnings in dixfontYaakov Selkowitz1-0/+1
These functions are already declared in <X11/fonts/fontproto.h>. Redeclaring them just for _X_EXPORT causes tons of warnings throughout xserver, but they need to be declared somewhere to be picked up by sdksyms.sh. Doing so in a private header limits the warnings to sdksyms.c; fixing those as well would require changes to fontsproto. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-05xfree86: os-support: fix old-style function definition warningsYaakov Selkowitz4-7/+7
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-29xfree86: remove unused variable sigstatePeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-10-19xf86: Fix build against recent Linux kernelThierry Reding1-1/+1
Recent Linux kernels reworked the linux/input.h header file, which is now part of the "user-space API". The include guard therefore has an additional additional _UAPI prefix. Instead of adding another case to the #ifdef, drop any include guard checks and instead always undefine the BUS_* definitions on Linux. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-11Fix compilation of Xorg DDX without XF86VIDMODEJon TURNEY1-1/+2
Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting xf86vmode.c back under the XF86VIDMODE automake conditional it was accidentally taken out of. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2012-10-08xfree86: add xf86UpdateDesktopDimensions()Peter Hutterer3-1/+11
This call is required for external drivers (specifically NVIDIA) that do not share the xfree86 infrastructure to update the desktop dimensions. Without it, the driver would update the ScreenRecs but not update the total dimensions the input code relies on for transformation. This call is a thin wrapper around the already-existing internal call and should be backported to all stable series servers, with the minor ABI bump. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> CC: Andy Ritger <aritger@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2012-10-04Merge remote-tracking branch 'whot/for-keith'Keith Packard2-2/+2
2012-10-04int10: fix pci_device_read_rom usageStephan Schreiber1-1/+2
I noticed that the build-in int10 driver always reports "Unable to retrieve all of segment 0x0C0000." even though the entire BIOS data is retrieved with success. The associated code is in hw/xfree86/int10/generic.c, in the function xf86ExtendedInitInt10(): if (pci_device_read_rom(pInt->dev, vbiosMem) < V_BIOS_SIZE) { xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x0C0000.\n"); } The function pci_device_read_rom() is from libpciaccess; its return value is not a size but an error status code: 0 means success. If pci_device_read_rom() returns 0 for success, the warning is generated. The proposed patch corrects the evaluation of the return value of pci_device_read_rom() and of the supplied BIOS size. Debian bug#686153 Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-10-04Fix additional gcc -Wwrite-strings warning in xf86 ddxJason Gerecke2-2/+2
Commit 09e4b78f missed a case. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-09-24Merge remote-tracking branch 'ajax/server-1.14-abi-churn'Keith Packard5-8/+8
2012-09-23dix: Remove refs to mi backing store from docsDaniel Martin1-20/+0
Remove any reference to mibstore.h and miInitializeBackingStore() from the documentation. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23dix: Remove #includes of mibstore.hDaniel Martin1-1/+0
Remove more backing store leftovers. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-20dix: 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-09-20Merge remote-tracking branch 'ajax/ioperm'Keith Packard6-93/+67
2012-09-20xfree86: Bump video ABI to 14Adam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES)Adam Jackson5-54/+17
This is a really awkward interface, since we're calling it well before the driver knows what device it's going to drive. Drivers with both KMS and UMS support therefore don't know whether to say they need I/O port access or not, and have to assume they do. With this change we now call it only to query whether port access might be needed; we don't use that to determine whether to call a driver's probe function or not, instead we call them unconditionally. If the driver doesn't check whether port access was enabled, they might crash ungracefully. To accomodate this, we move xorgHWAccess to be explicitly intentionally exported (sigh xf86Priv.h) so that drivers can check that before they attempt port access. v2: Move initial xf86EnableIO() nearer the logic that determines whether to call it, suggested by Simon Farnsworth. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20linux: Make failure to iopl non-fatalAdam Jackson1-5/+2
We load the driver list, then enable I/O, then call driver probe based on whether I/O enable succeeded. That's bad, because the loaded security policy might forbid port access. We happen to treat that as fatal for some reason, which means even drivers that don't need I/O access (like kms and fbdev) don't get the chance to run. Facepalm. How about we just make that non-fatal instead, that sounds like a much better plan. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20linux: Refactor xf86{En,Dis}ableIOAdam Jackson1-34/+48
Pull platform methods into their own sections for legibility, and rewrite the ifdefs to be more concise. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-19xf86: fix multi-seat video device support. (v2)Dave Airlie2-0/+7
If we are not seat 0 the following apply: don't probe any bus other than platform don't probe any drivers other than platform assume the first platform device we match on the bus is the primary GPU. This just adds checks in the correct places to ensure this, and with this X can now start on a secondary seat for an output device. v2: fix Seat0 macros Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-19xf86: fix compat output selection for no output GPUsKeith Packard1-1/+2
This should work properly with dynamic outputs. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-19xf86/platform: scan pci after probing devicesDave Airlie1-1/+2
This solves a race if we are trying to dynamically power off secondary GPUs. Its not the greatest fix ever but it probably as good as we can do for now. The GPU probing causes the devices to be powered up, then when we scan the PCI bus we get the correct information from the kernel, rather than a bunch of 0xff due to the device being powered off. drop gratuitous '&'. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-17dri2: invalidate drawable after sharing pixmapDave Airlie1-32/+42
After we share the pixmap, the backing storage may have changed, and we need to invalidate and buffers pointing at it. This fixes GL compositors and prime windows lacking contents initially. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04xf86: call enter/leave VT for gpu screens as wellDave Airlie1-0/+11
Otherwise we can't do fast user switch properly for multiple GPUs. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04xf86/crtc: don't free config->nameDave Airlie1-2/+0
This is set by pre_init not screen init, so if we free it here and then recycle the server, we lose all the providers. I think we need to wrap FreeScreen here to do this properly, will investigate for 1.14 most likely, safer to just leak this on server exit for now. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-17xfree86: Bump extension ABI to 7.0Aaron Plattner1-1/+1
Commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 added an array of DevPrivateSetRec structures in the middle of the ScreenRec, which throws off extension modules trying to call things like pScreen->DestroyPixmap. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-14Kludge -- Call RandR screen before cleaning up xf86 crtcsKeith Packard1-4/+7
The core RandR screen cleanup now involves cleaning up any GPU screen associations, and those call down into DDX to clean up the driver. If the pointers from the xf86 structures back to the core randr structures are set to NULL at that point, bad things happen. This patch "knows" that the core RandR close screen is underneath the xf86 randr close screen function, and so makes sure it gets called first. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-06Merge remote-tracking branch 'airlied/for-keithp'Keith Packard1-1/+7
2012-08-07dri2: fix master pixmap free and reset pointerDave Airlie1-1/+2
These are two minor changes, one to reset the pointer to NULL, after freeing the pixmaps, one to make sure we use the right API for the master pixmap, though I doubt it'll ever really matter. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-07dri2: free slave pixmap on app exitDave Airlie1-0/+5
When the drawable disappears we need to free the prime master/slave combos. This fixes a leak after a prime app is run. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-06Fix up formatting of initializers for arrays of structsAlan Coopersmith8-230/+205
The indenter seems to have gotten confused by initializing arrays of structs with the struct defined inline - for predefined structs it did a better job, so match that. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-08-06xfree86: When xf86CrtcCloseScreen is called, the randr CRTCs are goneKeith Packard1-3/+0
The RandR CRTC structures are freed when their resource IDs are destroyed during server shut down, which is before the screen is closed. Calling back into RandR with stale pointers just segfaults the server. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Knut Petersen <knut_petersen@t-online.de>
2012-08-06xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabledRui Matos1-4/+34
Panning is at odds with CRTC cursor confinement. This disables CRTC cursor confinement as long as panning is enabled. Fixes regression introduced in 56c90e29f04727c903bd0f084d23bf44eb1a0a11. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Rui Matos <tiagomatos@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06randr: Fix up yet another corner case in preferred mode selectionAdam Jackson1-2/+6
Let's say - purely for the sake of argument, mind you - that you had a server GPU with anemic memory bandwidth, and you walked up to it and plugged in a monitor that was 1920x1080 because that's what happened to be on the crash cart. Say the memory bandwidth is such that anything larger than 1280x1024 gets filtered away. Now you're in trouble, because the established timings section includes a 720x400 mode because that's what DOS 80x25 is, and that happens to just about match the physical aspect ratio. Instead let's reuse the logic from the existing aspect-match path: pick the larger mode of either the physical aspect ratio or 4:3. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-25glx: drop GLX_LIBS from X server and workaround sdksyms.Dave Airlie1-0/+1
We've had reports of two copies of the GLX bits, one in the server and one in libglx.so causing problems, I didn't understand why the X server needed a copy so drop it, however then we have to fix a missing GlxExtensionInit that comes from sdksyms, so work around it by moving that one declaration into a header that sdksyms doesn't scan. Thanks to Jon Turney for debugging the actual problem. (copyright header from extinit.h that seems most appropriate put on top). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52402 Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-25doc: Drop XAA references from xorg.conf man pageAdam Jackson1-69/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-25xfree86: Drop some dead XAA decls from SDK headersAdam Jackson1-43/+0
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-16Use C99 designated initializers in DRI2GetParam repliesAlan Coopersmith1-4/+5
DRI2GetParam was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-16xf86: Re-export extension disable flagsAaron Plattner1-4/+4
These flags were unexported by commit a1d41e311c21eb6627caa0d168e070ceaf90806f, which moved the declarations around and lost the _X_EXPORT attributes in the process. Since drivers need these and it's late in the release cycle, just re-export them for now. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-12xf86: include xf86platformBus.h in xf86AutoConfig.cDave Airlie1-0/+1
This fixes an implicit declaration, xf86AutoConfig.c:202:5: error: implicit declaration of function 'xf86PlatformMatchDriver' [-Werror=implicit-function-declaration] xf86AutoConfig.c:202:5: warning: nested extern declaration of 'xf86PlatformMatchDriver' [-Wnested-externs] Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-12dri2: Add DRI2CreateDrawable2.Michel Dänzer2-2/+20
Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the DRI2 drawable reference to the base drawable. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-12sdksyms: Fix build with --disable-xvDaniel Stone1-0/+2
I hate this [redacted] script. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-11xfree86: Strip dangling pointers from desiredModeMaarten Lankhorst4-4/+21
Based on the original patch by Chris Wilson, which was a better fix than mine. We stash a copy of the desiredMode on the crtc so that we can restore it after a vt switch. This copy is a simple memcpy and so also stashes a references to the pointers contained within the desiredMode. Those pointers are freed the next time the outputs are probed and mode list rebuilt, resulting in us chasing those dangling pointers on the next mode switch. ==22787== Invalid read of size 1 ==22787== at 0x40293C2: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x668F875: strdup (strdup.c:42) ==22787== by 0x5DBA00: XNFstrdup (utils.c:1124) ==22787== by 0x4D72ED: xf86DuplicateMode (xf86Modes.c:209) ==22787== by 0x4CA848: xf86CrtcSetModeTransform (xf86Crtc.c:276) ==22787== by 0x4D05B4: xf86SetDesiredModes (xf86Crtc.c:2677) ==22787== by 0xA7479D0: sna_create_screen_resources (sna_driver.c:220) ==22787== by 0x4CB914: xf86CrtcCreateScreenResources (xf86Crtc.c:725) ==22787== by 0x425498: main (main.c:216) ==22787== Address 0x72c60e0 is 0 bytes inside a block of size 9 free'd ==22787== at 0x4027AAE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x4A547E: xf86DeleteMode (xf86Mode.c:1984) ==22787== by 0x4CD84F: xf86ProbeOutputModes (xf86Crtc.c:1578) ==22787== by 0x4DC405: xf86RandR12GetInfo12 (xf86RandR12.c:1537) ==22787== by 0x518119: RRGetInfo (rrinfo.c:202) ==22787== by 0x51D997: rrGetScreenResources (rrscreen.c:335) ==22787== by 0x51E0D0: ProcRRGetScreenResources (rrscreen.c:475) ==22787== by 0x513852: ProcRRDispatch (randr.c:493) ==22787== by 0x4346DB: Dispatch (dispatch.c:439) ==22787== by 0x4256E4: main (main.c:287) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36108 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Merge branch 'local-fixes'Keith Packard1-2/+4
2012-07-10XFree86: os-support: Remove unused xf86MakeNewMappingDaniel Stone2-15/+0
No drivers used this, so it got unexported, and now it's so unused it got culled during the link. Take the poor function out behind the shed and put it out of its misery. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Remove XAADaniel Stone52-24266/+28
Commit 0c6987df in June 2008 disabled XAA offscreen pixmaps per default, as they were broken, leaving XAA only able to accelerate operations directly on the screen pixmap and nowhere else, eliminating acceleration for basically every modern toolkit, and any composited environment. So, it hasn't worked for over four years. No-one's even come close to fixing it. RIP. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2012-07-10Remove unused setupFunc from extensionsDaniel Stone3-11/+5
setupFunc was used as an early callback for half-modular extensions such as Xv, XvMC and DGA to set up hooks between the core server and the modular component. Now we've rid ourselves of that, we can also bin setupFunc. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Unify miinitext.cDaniel Stone1-1/+1
Rather than having a non-Xorg and an Xorg-specific path which basically just duplicated each other for no reason, we could ... just have one. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Move the remnants of loadext.c to miinitext.cDaniel Stone3-104/+0
There was nothing XFree86-specific or loader-specific about this, aside from using xf86MsgVerb instead of ErrorF. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Loader: Move ExtensionModule types to DIXDaniel Stone1-11/+1
In preparation for gutting loadext.c, move the ExtensionModule struct to the DIX, and unexport ExtensionModuleList (why, why, why, why was this ever exported in the first place, tbqh). Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Loader: Remove extension initialisation sortingDaniel Stone5-354/+0
Extensions could previously declare initialisation dependencies on other extensions, which would then get nicely sorted by the loader. We only had one user for this, GLX, which had one pointless (Composite) and one possibly useful dependency (DBE). As DBE is now a built-in, it will always be sorted by GLX, so we no longer have any users for it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>