summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
AgeCommit message (Collapse)Author
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>
2013-06-10sna: Move the GTT dirty tracking from the pixmap to the boChris Wilson
This allows us to more accurately track when the GTT is dirty. However, the only danger is that we may prematurely flush the scanout and clear the dirty bit and not preserve the flush timer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-07sna: Track when we write directly to bo through the GTTChris Wilson
In the future, we may need to explicitly flush GTT writes to the scanout, so add the infrastructure to do so now. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21sna/video: Convert to a pure Xv backendChris Wilson
This is to enable feature work which requires access to Client state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21sna: Undo a few more overwritten operations upon a boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17sna: Undo the clone when replacing the DRI pixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17sna: Avoid replacing pinned bo when undoing a cloneChris Wilson
Otherwise we end up cloning the scanout only to leave it dangling if the client copies the from the front-buffer and then writes to it. Reported-by: Nick Bowler <nbowler@draconx.ca> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64675 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-14sna: Basic copy-on-write support for cloning pixmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-17Revert "xgvevent"Chris Wilson
This reverts commit ddd75d6539dcf692cb76747cd63d1f301180f18a. This is a WIP patch, not ready for upstream. The danger of mixing topic branches.
2013-04-16xgveventChris Wilson
2013-04-10sna: Align uploads to start on page boundariesChris Wilson
This reduces the number of loops and restarts required in the kernel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-10sna: Suppress hotplug events whilst VT switched awayChris Wilson
Whilst we are not DRM master, not only is another server in control of the outputs and responding to the udev event, we ourselves cannot change modes and just cause contention upon the DRM device. Instead inform userspace of the change as soon as we are DRM master again and back in control. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-18sna: Skip processing an all-clipped-out glyphChris Wilson
Along the slow path, skip all processing of glyphs that are not visible. This is important as the slow path handles the per-glyph redirection case, which is much more expensive. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Remove the unused output and crtc listsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Supply a fake pipe to run completely headlessChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Track number of pixmaps allocated whilst counting bo leaksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Ignore SSE4a - not an Intel ISA!Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Print detected CPU featuresChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25sna: Detect available instruction sets at runtimeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11sna: Fix inaccurate use of __attribute__((const))Chris Wilson
'const' is only allowed to use the function parameters and not allowed to access global memory - that includes not allowed to deference its arguments... Thanks to Jiri Slaby for spotting my mistake. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11sna/dri: Tighten the assertions that we have one DRI2Buffer per PixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10sna: Backport to squeeze - Xorg-1.6, pixman-0.16, libdrm-2.4.21Chris Wilson
The principle change is to switch to the old Privates API and undo the Region renames. The downside is that this ignores the critical bugfixes made to the xserver since xorg-1.6 - but I assume that whoever wants to run the latest hardware on the old xservers is also backporting those stability fixes... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08sna/gen4: Split the have_render flag in separate prefer_gpu hintsChris Wilson
The idea is to implement more fine-grained checks as we may want different heuristics for desktops with GT1s than for mobile GT2s, etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29sna: Only migrate the sample box if using the BLT engine for a compositeChris Wilson
Modify the presumption that if we are using a core operation on a shadow pixmap, then we are likely to continue migrating that pixmap back and forth. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Begin sketching out a threaded rasteriser for spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Use threads for simple mask generationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Refactor to use a common fbComposite fallbackChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Experiment with a threaded renderer for fallback compositingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20sna: Make DEBUG_SYNC a configure optionChris Wilson
As it is advisable to combined the synchronous rendering debug option with other debugging options, it is more convenient to make it into a configure option: --enable-debug=sync Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17sna: Remove the confusion of the pixmap->undamagedChris Wilson
This was to track a pixmap that had been used for migration (i.e had in the past been used for mixed rendering). It is no longer used so remove it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16sna: Revert use of a separate CAN_CREATE_SMALL flagChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>