summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
AgeCommit message (Collapse)Author
2014-02-22sna: Assert that sigtrap is activeChris Wilson
Curiouser and curiouser. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Handle asynchronous signals from threadsChris Wilson
By killing the threads and leaking their allocations - marginally preferrable to losing the entire Xserver. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-20sna: Query cursor size from the kernelChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-13sna: Extend native rotation support to spritesChris Wilson
The sprite plane can be independently rotated to the CRTC primary plane. To rotate the sprite plane, we just set a property on the plane similar to how we rotate the CRTC, so we can refactor them together to use the same routines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-01sna: Only discard CPU damage for an replacing regionChris Wilson
When considering move-region-to-cpu, we need to take into account that the region may not replace the whole drawable, in which case we cannot simply dispose of an active CPU bo. Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reported-by: Conley Moorhous <conleymoorhous@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74327 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Tidy up pixmap header allocationsChris Wilson
Refactor some more of the common code, and add some debug tracking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-30sna: Constify GCFunc to quieten the compiler.Chris Wilson
We keep a pointer to the old funcs when wrapping, this now needs to be const. sna_accel.c: In function 'sna_gc_move_to_cpu': sna_accel.c:4008:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] sgc->old_funcs = gc->funcs; Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-17sna: Cull the DBG spew to stderrChris Wilson
Reduce the logging verbosity of DBG so that it only appears in the logfile by default - makes debugging much more pleasant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-16sna: Regularly check that the devPrivate.ptr is validChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-11sna/gen8: Initial backend for BroadwellChris Wilson
Should match the functionality of the earlier generations, but untuned. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03sna: More assertions around tracking mapped stateChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25Correct type of uevent_handlerChris Wilson
xf86AddGeneralHandler returns an opaque pointer, not a function pointer. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-22uxa,sna: Prevent bo exchange when pinned for non-DRI2 clientsChris Wilson
With the advent of DRI3 (and previously with Prime and Glamor) we have external clients who rely on the pixmap<->bo mapping being invariant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-21sna: Set supported rotations on virtual outputsChris Wilson
As the virtual outputs are created later, they do not get automatically populated with RR properties and we must do that instantiation ourselves. Reported-by: Kirill Müller <mail@kirill-mueller.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-30sna: Allow limited recursion within sigtrapped routinesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-25sna: Remove stale mappings when replacing GPU boChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=70527 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-25sna/io: Propagate failure to XOR uploadsChris Wilson
Similar to the handling required for the normal upload paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-21sna: Eliminate the synchronous wait from inside TearFreeChris Wilson
Defer the actual wait until the next use of the screen pixmap, and then if needed replace the GPU bo with an alternative back buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-18sna: Tighten pixmap map assertionsChris Wilson
We need to also take account of upload buffers which include an offset to the base map. To do so, we also need to stop conflating the cpu hint with the current mapping flag. References: https://bugs.freedesktop.org/show_bug.cgi?id=70461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-17sna: Assert mapped stateChris Wilson
When mapped, assert that we point to the expected mapping of the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-16sna/glyphs: Fix computation of extents for long stringsChris Wilson
And make sure we consider such overflowing strings for correct clipping against Windows. To offset the cost of doing a full extents check (~10% on aa10text), we introduce an approximate extents query (~1% on aa10text). The disparity should be rare, and should be an overestimate to force redundant clipping. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70541 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-10sna/gen6+: Share the common routines for ring preferrenceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-03intel: Remove dependence upon having PciInfoChris Wilson
After some probing mechanisms, we may end up with a valid device without knowing its PCI address a priori. Having a valid device, we can just query it for the correct device id, and can safely abort any path that requires PCI information that we don't have. (Those paths are not valid under such hosting anyway - if it may be required, we could reconstruct the address.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Catch SIGBUS to prevent X deathChris Wilson
We know that when we access either a CPU or GTT mmap we are vulernable to receiving a SIGBUS. In fact, we can catch these and abort the operation preventing X and all of its clients from randomly dieing. This helps for instance if you try and use a 1GiB frontbuffer on a 2GiB machine... For complete protection, we also need to catch signals for all GTT maps, such as VBO and staging buffers. (TBD) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-19sna: Do not change DPMS mode on unconnected outputsChris Wilson
The operation is in theory redundant, and in the case of Haswell where we have multiple outputs aliasing to the same encoder, actually harmful. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-18intel: Compile fixes for base install of SLED11.sp3Chris Wilson
Highlights of that distribution include xorg-xserver-1.6.5, kernel 3.0.76 and gcc-4.3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-17intel: Make the option to control VSync and PageFlip explictChris Wilson
Too often our implementation of vsync or pageflip is buggy, or for some other reason it is desired by the user to disable those code paths. Make it possible once again by restoring the Options for the user to control. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-10sna: Disable use of Y-tiling for gen4Chris Wilson
This problematic GPU still seems to like to fallover when faced with Y-tiling. It was reserved only for use with glyphs, but even that occasionally runs into trouble, so disable all selection of Y-tiling for our own use. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1222203 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-07sna: Split get_drawable_deltas()Chris Wilson
In some cases we know we only have a window, and so may skip a conditional. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-07Revert "sna: Add XMir support"Chris Wilson
This reverts commit 42d94356f65972eb7fb8991234a4e9388c4c2031. Ordered-by: The Management.
2013-09-06sna: Listen to ACPI events for power state notificationsChris Wilson
When on-battery, we would prefer to use more power efficient operations. For example, the BCS is far more economical to more data around with, but it doesn't have quite the same throughput as the hungry RCS. (Not that there is any reason why, the BCS is supposed to run at full memory speed, unfortunately that is main memory speed and not the caches...) Note: that X already listens to acpid for video switch notifications, it would be useful if we could extend that interface to emit power notifications as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-04sna: Add XMir supportChris Wilson
With lots of updates by Christopher James Halse Rogers as he updated the XMir API - but now supposedly frozen! "<RAOF> ickle: I think the xmir api should be pretty much stable now, barring people coming up with more awesome ways of doing things." Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-04sna: Fix sna_pixmap_move_area_to_gpu() to return the sna_pixmapChris Wilson
Like it's sibling sna_pixmap_move_to_gpu(), it helps to know the private sna_pixmap after the operation rather than just a boolean success/fail result, and make it more robust in the process. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-31sna: Expand the array of fake outputs if the last is usedChris Wilson
Always maintain one spare so that we can reconfigure for any number of desired outputs on the fly. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-30sna: Protect against unattached pixmaps when peeking inside for a GPU boChris Wilson
Prevent a NULL dereference for the small system pixmaps. Introduced with commit f22d7f68b8b1bd5caf5ae831fca63eb1e6957520 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Aug 28 14:24:33 2013 +0100 sna/gen6+: Improve ring stickyness for BLT composite ops Reported-by: Sami Farin <hvtaifwkbgefbaei@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68728 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-30sna: Allow user specification of number of VirtualHeadsChris Wilson
Previously, we instantiated a fake output in case we had a machine with no output. (For certain server-class products.) The Bumblee project were also doing something very similar in order to fake an extended desktop on the Intel igfx and copy portions onto a discrete GPU. (The preferred method for doing this upstream is through the use of PRIME). As the code is very similar, we can support both use-cases simultaneously. This adds the option: Section "Device" Driver "intel" Option "VirtualHeads" "<count>" EndSection to allow the user to specify an additional set of fake outputs, which can then be controlled using xrandr. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25sna: Add a few more checks for a hosted Xserver before walking CRTC listsChris Wilson
If we are hosted, we do not own the CRTC configuration, and deferencing the private data structures believing them to be ours, only leads to disaster. Based on patches by Christopher James Halse Rogers. Reported-by: Christopher James Halse Rogers <raof@ubuntu.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-18sna/gen6+: Tweak semaphore avoidance for composite operationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-16sna/video: Expose an attribute to keep the overlay always on topChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-14sna: Rename sna_pixmap_get_bo()Chris Wilson
Mark how dangerous this function is by giving it a __ prefix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-10sna/glyphs: Micro-optimise glyph drawingChris Wilson
When you don't have many cycles to play with, every one counts. Here we make sure we cache negative lookups for large glyphs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-09intel: Disable incompatible features whilst hostedChris Wilson
Start adding the infrastructure to disable direct hardware access if X is being run under a system compositor (aka "hosted"). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-08Micro-optimise box intersectionsRaul Fernandes
We can shave a few instructions off the routine by incrementally performing the "is-empty" check as soon as we compute the intersection in each dimension.
2013-08-01sna/dri: Disable TripleBuffering by default for compositorsChris Wilson
Ideally, the method of swapping is something that the applications have control over, along with how to synchronise to the vertical refresh. Whilst triple buffering is good to reduce jitter for games (at the cost of an extra frame of latency, usually considered a good tradeoff), it prevents the applications from accurately controlling the presentation of animations. One vocal critique is Owen Taylor, who demands accurate swap control for smooth animations in gnome-shell. For example, http://blog.fishsoup.net/2012/11/28/avoiding-jitter-in-composited-frame-display/ In lieu of application control, just apply a quirk for the compositor. Everyone else will just have to wait for DRI3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19sna: Return true from get_drawable_deltas() if the pixmap is offsetChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-11sna: Remove the duplicated open-coding of SetScreenPixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-02sna: Simplify validation of active CRTCsChris Wilson
Atter a modeset or KMS takeover, we do a quick readback of the kernel state in order to verify that it matches our expectations. If we find that a foreign framebuffer is attached, or no mode if set on the output, we then turn off that connection and release any resources associated with that pipe. This patch tries to reduce the number of superfluous requests to turn off a connection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-01sna: Experiment with cpu mappings for migrationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-30sna: Store the path used to open the device and pass to DRIChris Wilson
Avoid having to search the device tree once again in order to simply recover the path we used to open the device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-21sna: Determine swizzling once during initialisation and choose memcpy_to_tiled_xChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>