summaryrefslogtreecommitdiff
path: root/mi
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01Make XYToWindow a screen functionKeith Packard3-0/+71
This allows DDXen to override the window picking to account for native windows not seen by the X server. The bulk of the picking logic is exposed as a new helper function, miSpriteTrace(). This function completes the sprite trace filled out by the caller, and can be set up to start the search from a given toplevel window. v2: Leave existing XYToWindow API in place for API compatibility Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-29mi: Hush extension initialization (#75870)Adam Jackson1-8/+0
Printing these as ErrorF is fairly obnoxious, since it means the non-hardware servers now spew stuff to the console for entirely routine events. And actually, printing these at all is fairly obnoxious, since a) we're printing a line for every extension, whether it's enabled or not, and b) we're not actually initializing the extension at this point. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-26mi: miPutImage with XYPixmap failed at depth 32 on 64-bit machinesKeith Packard1-1/+1
The X server still has 'unsigned long' in a few places to hold 32 bit values. One of those is in miPutImage where it's holding the temporary planemask for XYPixmap format images. It computed the highest plane in the source image with 1 << (depth - 1). On 64-bit machines, taking that value and storing it in an unsigned long promotes it to a signed 64-bit value (0xffffffff80000000). Then, it loops over that value, shifting one bit right each time, waiting for it to go to zero.. That takes 64 iterations, and ends up with some mystic planemask values *and* walking off the end of the source image data and out into space. A simple cast is all that is required to compute the correct initial plane mask (0x0000000080000000), at which point the loop operates correctly once again. Checking the fbPutImage code, I note that this same bug was fixed in 2006 by Aaron Plattner in commit f39fd4242902eaa862321d39337f429dd14ebacf Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2014-03-25miinitext: introduce LoadExtensionList() to replace over LoadExtension()Emil Velikov1-14/+18
Looping around LoadExtension() meant that ExtensionModuleList was reallocated on every extension. Using LoadExtensionList() we pass an array thus the function can do the reallocation in one go, and then loop and setup the ExtensionModuleList. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> v2: Update ephyr [Keith Packard] v3: Eliminate const warnings in LoadExtensionList [Keith Packard] Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-23miinitext: avoid allocating a sentinel ExtensionModuleEmil Velikov1-3/+2
With all the logic now in place there is no need to allocate a separate ExtensionModule to be used as a sentinel. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-23miinitext: constify staticExtensionsEmil Velikov1-1/+1
The array is readonly and should not be tampered with. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-23miinitext: drop sentinel detection during LoadExtensionEmil Velikov1-3/+0
All the sentinels from the extension lists were removed, thus the only case were this would trigger is when the code is broken badly. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-23miinitext: move AddStaticExtensions() to LoadExtension()Emil Velikov1-4/+4
Separate the function from NewExtensionModule() as the former does only memory reallocation. No functional change. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-10mi: fix printf warning about size_t format specifierPeter Hutterer1-1/+1
mieq.c:290:26: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=] pnprintf supports size_t since 5ea21560dd071ea4ab87430000d087fd5fe1f092 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-01-12Clean up a few function prototypes to not place formals in /**/Keith Packard1-28/+21
This just removes the comment markers from around the formals in several function prototypes near where pointer -> void * changes were made. There are plenty more of these to fix. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-01-12Replace 'pointer' type with 'void *'Keith Packard14-35/+35
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12Clean up warnings in mi.Keith Packard2-5/+2
A coupel of unused variables, and some debug code with mis-matching printf format and variable types. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-14mieq: Bump default queue size to 512Adam Jackson1-1/+1
Based on some bugzilla scraping I did around November 2012. Of xserver bugs in Red Hat bugzilla with an EQ size message in the log, the distribution looked like: String | Matches ------------------------------------- Increasing EQ size to 512 | 460 Increasing EQ size to 1024 | 52 Increasing EQ size to 2048 | 6 Increasing EQ size to 4096 | 0 Most of the "512" ones appear to be mostly harmless, some relatively expensive path in either rendering or resource destruction simply taking too long due to external pressures like paging or CPU contention. So let's raise the initial queue size, both to reduce the number of spurious abrt reports and to drop fewer events in all but the most pathological cases. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11present: Don't try to initialize when building without present supportAdam Jackson1-0/+2
There's a --disable-present, so it'd be nice if it worked. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Keith Packard <keithp@keithp.com>
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 Packard1-0/+1
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-09-10damage: Simplify DamageUnregisterAdam Jackson1-2/+1
You can only register one drawable on a given damage, so there's no reason to require the caller to specify the drawable, the damage is enough. The implementation would do something fairly horrible if you _did_ pass mismatched drawable and damage, so let's avoid the problem entirely. v2: Simplify xf86RotateDestroy even more [anholt] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10mipointer: Remove deprecated miPointerCurrentScreenAdam Jackson2-14/+0
The only remaining use was in some debugging code in DMX. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10dix: FIXES is not optionalAdam Jackson1-5/+0
It's already not optional at configure time, this just makes it so at build time too. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10misprite: Delete some dead private storageAdam Jackson1-7/+0
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10mipointer: Remove EnqueueEvent from miPointerScreenFuncRecAdam Jackson2-8/+0
No DDX overrode this, and we never actually called through that slot anyway. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10mipointer: Flatten calls to mieqSwitchScreenAdam Jackson2-10/+3
No DDX was overriding this. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10mi: Avoid stack smash when drawing dashed linesPeter Harris1-3/+3
X.org Bug 54013 <https://bugs.freedesktop.org/show_bug.cgi?id=54013> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Harris <pharris@opentext.com>
2013-08-06Allow disabling XFree86-DGA, DRI, VidModeExtension extensionsAlan Coopersmith1-1/+1
Code to recognize these in extension enable/disable options was wrapped in #ifdef XorgLoader, but that's not defined when building miinitext.c since the great module merge of 1.13. Change to an #ifdef that is defined. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Robert Hooker <robert.hooker@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-01-09mi: Ensure pointer emulating touch events update the spriteCarlos Garnacho1-1/+5
Different miPointerSpriteFuncRec implementations do a varying business at ultimately calling miPointerUpdateSprite(), this particularly fails when using the plain mi sprite on touch events, where the sprite is just moved/updated on cursor changes. So, ensure miPointerUpdateSprite() is called generically for pointer emulating touch events as with regular motion events. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-19Merge remote-tracking branch 'alanc/master'Keith Packard1-3/+6
2012-12-18EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinelAlan Coopersmith1-3/+6
d785368e0e converted the other miinitext functions to use ARRAY_SIZE, and removed the sentinel, but missed EnableDisableExtensionError so passing an invalid extension name could cause the server to walk off the end off the list looking for a sentinel that wasn't there. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-17mi: rename mipointer's internal event listPeter Hutterer1-9/+9
Avoid name shadowing warnings, change the event list to a more specific name. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-12-17Xi: fill in barrier root x/y after clamping to RandR outputsPeter Hutterer1-1/+17
x/y for barrier events should contain the actual pointer position. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-12-17Pass the event list through to the pointer barrier code to return itPeter Hutterer2-3/+6
Instead of having the pointer barrier code enqueue events separately from GetPointerEvents, pass the event list through and let it add to it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-12-17Add support for XI2.3: Pointer barrier events and releases.Jasper St. Pierre1-0/+4
This adds support for clients that would like to get a notification every time a barrier is hit, and allows clients to temporarily release a barrier so that pointers can go through them, without having to destroy and recreate barriers. Based on work by Chris Halse Rogers <chris.halse.rogers@canonical.com> Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-17barriers: Switch to an explicit hook for barrier constrainmentJasper St. Pierre1-0/+16
Rather than riding on the ConstrainCursorHarder hook, which has several issues, move to an explicit hook, which will help us with some RANDR interaction issues. Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-21Constify argument to LoadExtensionDaniel Stone1-1/+1
Since we never modify it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-05mi: fix shadow warningsYaakov Selkowitz2-7/+3
mibitblt.c: In function 'miGetImage': mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local mibitblt.c:609:17: warning: shadowed declaration is here mispans.c: In function 'miFillUniqueSpanGroup': mispans.c:456:33: warning: declaration of 'i' shadows a previous local mispans.c:382:9: warning: shadowed declaration is here mispans.c:488:17: warning: declaration of 'i' shadows a previous local mispans.c:382:9: warning: shadowed declaration is here Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-04mi: drop two useless conditions in miPointerSetPositionPeter Hutterer1-5/+0
pDev cannot be NULL here since fill_pointer_events is the only caller. And if the screen is NULL, then the device tries to send events before it is fully initialised. That certainly shouldn't happen and would be a bug elsewhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-09-23dix: Delete mibstore.hDaniel Martin2-25/+1
Since Nov 2010 (commit c4c4676) the only purpose of mibstore.h was to define an empty function (miInitializeBackingStore()) for backward compatibility. Time to say goodbye. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23dix: Delete mibstore.cDaniel Martin1-43/+0
The only reference to mibstore.c was removed with commit c4c4676. Remove the file itself too. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-23mi: don't check for core events in miPointerSetPosition (#53568)Peter Hutterer1-1/+1
As of 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d, miPointerSetPosition now returns the screen pointer of the device. This broke floating slave devices, as soon as a motion event was submitted, miPointerSetPosition returned NULL, crashing the server. dev->coreEvents is only false if the device is a floating slave, in which case it has a sprite. X.Org Bug 53568 <http://bugs.freedesktop.org/show_bug.cgi?id=53568> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-24XQuartz: Fix runtime regressions introduced by extension loading changesJeremy Huddleston1-0/+6
* GLX is now loaded * PseudoramiX loading is back in miinitext. It needs to be loaded before RandR. Regression-from: 27a624bee66d2797eacf90317054207dcf248028 Regression-from: 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-10Remove unused setupFunc from extensionsDaniel Stone1-31/+25
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-10Replace NO_HW_ONLY_EXTS with Xorg DDX testDaniel Stone1-1/+1
Turns out the only thing we use NO_HW_ONLY_EXTS for is to check whether or not we're building inside the Xorg DDX. Replace it with an XorgLoader test instead, and remove all its users. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Unify miinitext.cDaniel Stone1-121/+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-10Remove Xorg-specific extensions from non-Xorg miinitextDaniel Stone1-26/+1
miinitext.c had a completely separate codepath for non-Xorg servers, which included tests for Xorg-specific extensions such as XFree86-VidMode, which were external even to the Xorg DDX. So we can just remove them, and the associated #undefs. 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-10Quartz: Move PseudoramiX initialisation to DDXDaniel Stone1-5/+0
As PseudoramiX is a DDX-specific extension, move its loading and initialisation to hw/xquartz. This creates a QuartzExtensionInit() similar in spirit to xf86ExtensionInit. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10Move the remnants of loadext.c to miinitext.cDaniel Stone1-1/+84
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-3/+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 Stone1-19/+15
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>
2012-07-10Add static extensions before those in modulesDaniel Stone1-11/+20
Make sure we add static extensions before anything in a module. This is more or less a no-op at the moment, but will come in handy later when extension dependency sorting is removed. 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-09Move SELinux from extmod to built-inDaniel Stone1-0/+3
Instead of letting it languish in extmod just because we want to configure bits of it from xf86, move XSELinux to the builtin part of Xext, and do its configuration from xf86ExtensionInit. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Xv: Remove excessive module-induced indirectionTomas Carnecky1-2/+2
Xv used to call XvScreenInit and co. through function pointers, as XvScreenInit may have been sitting on the other side of a module boundary from xf86XvScreenInit. Why this was so is a mystery, but make it not so any more. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>