summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-31miext/damage: Partial revert of "Only wrap into the GC ops chain if there's ↵Jeremy Huddleston Sequoia1-4/+1
a listener (v3)" Fixes regression from: 4dc2a76740d921c824a4d8193f39dd373475f02a http://lists.x.org/archives/xorg-devel/2013-May/036241.html https://trac.macports.org/ticket/38993 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31Merge remote-tracking branch 'keithp/dri3'Keith Packard50-59/+3968
2013-10-31glx: Lie about GLX_Y_INVERTED_EXTAdam Jackson1-1/+2
Well, that was lame. The problem with reporting y inversion honestly is that libGL asks the driver _its_ opinion of Y inversion, which it just fabricates from whole cloth. So then when libGL goes to compare the driver's idea of fbconfigs with that of the server - a fairly dumb idea to begin with - nothing matches, and direct rendering fails, and sadness. So until the DRI drivers are fixed we should just continue to lie about Y inversion. GLX_DONT_CARE is what libGL would make up for that attribute if we hadn't sent it, so just send that instead. Signed-off-by: Adam Jackson <ajax@redhat.com> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31present: Add Present extensionKeith Packard18-6/+2432
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 Packard26-32/+1255
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-31Add support for MIT-SHM AttachFd requestKeith Packard4-3/+167
This passes a file descriptor from the client to the server, which is then mmap'd Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Add interfaces to get FDs from clients over the socketKeith Packard3-0/+31
This adds two interfaces: void SetReqFds(ClientPtr client, int req_fds) Marks the number of file descriptors expected for this request. Call this before any request processing so that any un-retrieved file descriptors will be closed automatically. int ReadFdFromClient(ClientPtr client) Reads the next queued file descriptor from the connection. If this request is not expecting any more file descriptors, or if there are no more file descriptors available from the connection, then this will return -1. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31misync: Don't smash custom screen sync functionsKeith Packard1-1/+1
There was a check to avoid smashing custom functions, but the sense was backwards causing it to always smash them, and also not set them otherwise. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31os: Add GetTimeInMicrosKeith Packard2-0/+28
64-bit higher resolution current time value. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Add swapll to byte swap 64-bit datatypesKeith Packard1-0/+29
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Add a RegionDuplicate functionKeith Packard2-0/+17
This allocates a new region structure and copies a source region into it in a single API rather than forcing the caller to do both steps themselves. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Clean up a couple of warnings in os/Keith Packard2-1/+3
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Xext: Move MIT-SHM 'ShmDesc' to shmint.hKeith Packard3-21/+10
This data structure is required to use shared memory objects in any extension. That includes the Xv extension, which (before this patch) duplicated the definition of this structure in its own code. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-01os: use a constant for backtrace array sizePeter Hutterer1-2/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-11-01configure: remove a commentPeter Hutterer1-1/+1
94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so this comment is outdated. since no-one noticed and it's easier to just grep than update file references, remove the comment. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
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-31dri: Fix GLX_Y_INVERTED_EXT fbconfig attributeAdam Jackson1-0/+1
We're Y-inverted from GL's coordinates, so this is correct. gnome-shell doesn't seem to check this - somewhat reasonable since the only server that answered the other way around was Xglx - but kwin does, and upside-down hilarity ensues. Tested-by: maelcum on #xorg-devel Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.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: deliver Output and Crtc events of attached output providers.Michal Srb1-0/+24
Consider all attached output providers when looking for changed outputs and crtcs. 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-30randr: send RRResourceChangeNotify eventMichal Srb5-0/+54
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-30randr: send RRProviderChangeNotify eventMichal Srb3-0/+65
Send RRProviderChangeNotify event when a provider becomes output source or offload sink. 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 Packard4-9/+10
2013-10-30config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILESGaetan Nadon1-1/+2
Fix Automake warning: AC_OUTPUT should be used without arguments. www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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 Packard10-13/+119
2013-10-29glx: convert to direct GL dispatch (v2)Adam Jackson39-41224/+3257
We now expect to be linked against something that provides the GL API, instead of manually grubbing about in the DRI driver's dispatch table. Since the GLX we expose calls GL functions that are meant to be looked up dynamically, also add a way to thunk through to GetProcAddress. This includes a refresh of the generated sources, which requires a correspondingly new Mesa. The GetProcAddress stubs are at the moment merely enough to make this link against Mesa 9.2, but should really be provided for everything not in the OpenGL 1.2 ABI. v2: Explicitly hide the GetProcAddress stubs so we can't conflict with libGL symbols; fix leading tab/space issues [anholt] Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29glx: Remove DRI1 AIGLX (v2)Adam Jackson4-1181/+2
Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and three releases ago. The main reason to have wanted DRI1 AIGLX was to get a GLX compositor working, but DRI1's (lack of) memory management API meant that the cost of a GLX compositor was breaking direct GLX apps, which isn't a great tradeoff. Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose some functionality here, since it and only it has support for NV_texture_rectangle. Since that's required for every extant GLX compositor I know of, I conclude that anybody with a savage, say, would probably not notice AIGLX going away, since they wouldn't be running a GLX compositor in the first place. In the future we'd like to use GL in the server in a more natural way, as just another EGL client, including in the GLX implementation itself. Since there's no EGL implemented for DRI1 drivers, this would already doom AIGLX on DRI1 (short of entirely forking the GLX implementation, which I'm not enthusiastic about). v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt] Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29glx: Simplify glXDestroyContextAdam Jackson1-3/+1
We can just free the resource unconditionally here. ContextGone (which FreeResourceByType will call) already does: cx->idExists = GL_FALSE; if (!cx->currentClient) { __glXFreeContext(cx); } Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29glx: Fix a corner case in DrawableGoneAdam Jackson1-1/+1
Losing the drawable does not change our notion of current client. Since the GL under us doesn't understand having a current context without current drawables (sigh), we do still need to loseCurrent so that we re-bind the context on the next request. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65030 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29glx: Fix memory leak in context garbage collection (v2)Adam Jackson4-24/+35
I broke this, back in: commit a48dadc98a28c969741979b70b7a639f24f4cbbd Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 21 11:59:29 2011 -0400 glx: Reimplement context tags In that, I changed the glx client state to not explicitly track the list of current contexts for the client (since that was what we were deriving tags from). The bug was that I removed the code for same from glxClientCallback without noticing that it had the side effect of effectively de-currenting those contexts, so that ContextGone could free them. So, if you had a client exit with a context still current, the context's memory would leak. Not a huge deal for direct clients, but viciously bad for indirect, since the swrast context state at the bottom of Mesa is like 15M. Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that we have a back-pointer to chase when walking the list of contexts when ClientStateGone happens. v2: Explicitly call __glXFreeContext on the ClientStateGone path. Our current context might be one we got from EXT_import_context and whose creating client has since died. Without the explicit call, the creating client's FreeClientResources would not free the context because it's still current, and the using client's FreeClientResources would not free the context because it's not an XID it created. This matches the logic from a48dadc. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29glx: Only take a Pixmap reference if creating the GLXPixmap succeededAdam Jackson1-1/+2
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29Xi: fix logic error when calculating emulated motion eventsPeter Hutterer1-1/+1
gcc -Wlogical-op exevents.c: In function 'DeliverEmulatedMotionEvent': exevents.c:1480:13: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] The relevant snippet of exevents.c: 1479 if (ti->listeners[0].type != LISTENER_POINTER_REGULAR || 1480 ti->listeners[0].type != LISTENER_POINTER_GRAB) 1481 return; This condition was always true, causing dropped motion events. Reported-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-10-24glx: Enable GLX_ARB_fbconfig_float for DRI2 driversDaniel Czarnowski3-0/+17
v2 (idr): Maintain sort order of extension list. Fixed rebase error (comment header for initializeExtensions was in front of __glXDRIinvalidateBuffers). Re-write commit message. Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-10-24glx: Handle float config types in glxConvertConfigsDaniel Czarnowski3-5/+43
Replaces old use of floatMode attribute with new, extended range of values in __DRI_ATTRIB_RENDER_TYPE. Also adds new conditions, where the float modes support requires it. Enables support for not only float configs, but packed float configs as well. v2 (idr): Whitespace and formatting fixes. Refactor render type vs. pbuffer checking to a separate function that includes a quote from the spec. Re-write commit message. Fix compiler warnings: glxdricommon.c: In function 'glxConvertConfigs': glxdricommon.c:212:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] glxdricommon.c:212:35: note: expected 'unsigned int *' but argument is of type 'int *' glxdricommon.c:230:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] glxdricommon.c:230:35: note: expected 'unsigned int *' but argument is of type 'int *' Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-10-24glx: Correctly set render type enumDaniel Czarnowski2-8/+41
The type specified is bits, but the context wants an enum. v2 (idr): Fix various whitespace and formatting problems. Rename convFBconfRenderTypeBits2CtxRenderType to renderTypeBitsToRenderTypeEnum. Re-write commit message. Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-10-24glx: Allow float renderType in glXCreateContextAttribsARBDaniel Czarnowski2-0/+18
This enables GLX_RGBA_FLOAT_TYPE_ARB and GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT as valid renderType parameters to glXCreateContextAttribsARB. v2 (idr) : Use C-style comments and fix word wrapping. Re-write commit message. Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-10-23glx: Add support for the new DRI loader entrypoint.Eric Anholt1-2/+22
This is going to be exposed (and not the old entrypoint) for some DRI drivers once the megadrivers series lands, and the plan is to eventually transition all drivers to that. Hopefully this is unobtrusive enough to merge to stable X servers so that they can be compatible with new Mesa versions. v2: typo fix in the comment Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-21unbreak KdEnableInputStrake1-5/+6
pi = ki = 0 here, so not follow them. Signed-off-by: Strake <strake888@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-18Update to version 1.14.99.3xorg-server-1.14.99.3Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-18Merge commit '2523a445a09a75a8baf642608d099a5e12d5437f'Keith Packard9-63/+158
This is merging the commits along Peter's for-keith branch, without also merging in the spurious merge at the top of that branch.
2013-10-18Merge branch 'xsync-transition-bug-59644' into for-keithPeter Hutterer9-63/+158
2013-10-18sync: split updating and triggering a counter upPeter Hutterer1-2/+11
Now that the brackets are always the nearest change points (regardless of transition) we need to update the counters whenever we check for any updates. Otherwise we end up with a situation where counter->value is out of date and an alarm doesn't trigger because we're still using the value from last time something actually triggered. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-10-18sync: always set the brackets (#59644)Peter Hutterer1-0/+20
The current code sets bracket_greater to the first trigger after the current value, and bracket_less to the last trigger before the current value. For example, the idle timer with three negative and three positive transitions would set this: nt1 nt2 nt3 |--------|------|--|------- idle --|---|--|-----> t pt1 pt2 pt3 bracket_less == nt2 bracket_greater == pt2 This is an optimization so we can skip code paths in the block/wakeup handlers if the current value doesn't meet any of the trigger requirements. Those handlers largely do a if (bracket_less is less than current value && bracket_greater is greater than current value) return, nothing to do However, unless the bracket values are updated at the correct time, the following may happen: nt |--------------|---------- idle ------|--------> t pt In this case, neither bracket is set, we're past the pos transition and not yet at the neg transition. idle may now go past nt, but the brackets are not updated. If idle is then reset to 0, no alarm is triggered for nt. Likewise, idle may now go past pt and no alarm is triggered. Changing an alarm or triggering an alarm will re-calculate the brackets, so this bug is somewhat random. If any other client triggers an alarm when the brackets are wrongly NULL, the recalculation will set them this bug may not appear. This patch changes the behavior, so that the brackets are always the nearest positive or negative transitions to the current counter value. In the example above, nt will trigger a wakeup and a re-calculation of the brackets, so that going past it in the negative direction will then cause the proper alarm triggers. Or, in Keith's words: Timer currently past a positive trigger No bracket values, because no trigger in range Timer moves backwards before the positive trigger Brackets not reset, even though there is now a trigger in range Timer moves forward past the positive trigger Trigger doesn't fire because brackets not set Setting the LT bracket in this case will cause everything to get re-evaluated when the sync value moves backwards before the trigger value. X.Org Bug 59644 <http://bugs.freedesktop.org/show_bug.cgi?id=59644> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-10-18sync: if the idle time was reset, force alarms to trigger (#70476)Peter Hutterer3-7/+69
The time between the idle reset and the IdleTimeWakeupHandler to be called is indeterminate. Clients with an PositiveTransition or NegativeTransition alarm on a low threshold may miss an alarm. Work around this by keeping a reset flag for each device. When the WakeupHandler triggers and the reset flag is set, we force a re-calculation of everything and pretend the current idle time is zero. Immediately after is the next calculation with the real idle time. Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for a threshold of 1 ms. May trigger, may not. X.Org Bug 70476 <http://bugs.freedesktop.org/show_bug.cgi?id=70476> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>