summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
AgeCommit message (Collapse)Author
2014-06-11sna: Ignore setting read-only for temporary userptr mapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Prefer to operate inplace on the GPU rather than stall on the CPUChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Discard TearFree damage before checking for an overwriting uploadChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Silence compiler warnings for discarding const Region pointsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Mark the GPU as all damaged when discarding CPU bo during uploadsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09sna/dri2: Allow TearFree flipping to individual CRTCChris Wilson
Baby step. We first take advantage of TearFree to allow us to redirect a single CRTC to the DRI2 frontbuffer and so allow a fullscreen game covering a single monitor to avoid expensive blits when running in a multi-monitor setup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-06sna: Auto-retire upload proxiesChris Wilson
This was disabled in commit 9f4f855ba37966fb91d31e9081d03cf72affb154 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon May 26 07:06:18 2014 +0100 sna: Implicit release of upload buffers considered bad as retiring the buffers during the command setup could free one of the earlier bo used in the command. But discarding the snooped bo could still be advantageous. So restore the automatic discard of upload proxies, but make sure we only do between operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matti Hämäläinen <ccr@tnsp.org>
2014-06-06sna: Only allow the inplace copy to replace a complete overwritten GPU boChris Wilson
And double check after recreating the new GPU bo that is still mappable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-06sna: Rearrange scanout_flush checking to avoid potential crashChris Wilson
With a shadow, we may never attach a GPU bo to the frontbuffer, so be careful when checking the scanout not to dereference that NULL pointer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-05sna: Curry parameters to sna_damage_all()Chris Wilson
It is far easily to pass the PixmapPtr into the function and have it pluck out the width and height than do so in all callers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-05sna: Mark CPU as all damaged when discarding a busy GPU boChris Wilson
When we discard a GPU bo, we need to make sure that the remaining content is marked as only accessible via the CPU shadow pointer. Regression from commit 65301412ecf2d55ab55a2d7faeaa048d4ee8b1d0 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sat May 17 20:59:38 2014 +0100 sna: Discard active GPU buffers before uploading into them Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79517 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-05sna/dri2: Enable immediate buffer exchangesChris Wilson
The primary benefit of this is avoid the extra blit when using a compositor and instead propagate the compositor flip on the frontbuffer to the scanout, or equivalently allows a fullscreen game to flip onto the scanout without intervention by TearFree. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-03sna: Replace the bo for tiled uploads if not suitable and being replacedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-03sna: Allow replacements to cancel operations between both bo under a PixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-03sna: Discard unwanted damage when promoting to a full CPU migrationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Fix early return in download using the GPUChris Wilson
In commit 961139f5878572ebea268a0bbf47caf05af9093f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri May 30 09:45:15 2014 +0100 sna: Use manual detiling for downloads the code for deciding when to use the GPU was refactored into a new function that also performed the transfer, but failed to notice the early return. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Add support for DRI3Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-30sna: Use manual detiling for downloadsChris Wilson
If we can CPU mmap the GPU bo, prefer to do so for migration to the CPU as this saves an extra serialisation step. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-26sna: Implicit release of upload buffers considered badChris Wilson
Currently upload buffers are automatically decoupled when the buffer is retired. As retiring can happen during command setup after we have selected which bo to render with, this can free the bo we plan to use. Which is bad. Instead of making the release of upload buffers automatic, we manually check whether the buffer is idle before use as a source to consider scrapping it and replacing it with a real GPU bo. This is likely to keep upload buffers alive for longer (limiting reuse between Pixmaps but making reuse of the buffer within a Pixmap more likely) which is both good and bad. (Good - may improve the content cache, bad - may increase the amount of memory used by upload buffers for arbitrary long periods.) Reported-by: Matti Hämäläinen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79238 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-18sna: Discard active GPU buffers before uploading into themChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-18sna: Do not mark an upload as a potential replace if the dst is pinnedChris Wilson
This saves us from trying to optimise for an operation that cannot happen as we cannot replace the destination buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-16sna: Handle driver failures more gracefullyChris Wilson
Avoid busy-spinning waiting for the cache to expire after a failure. Try to free up any overdue expiration, then if we still fail, we free the entire cache. Currently, it would spin over the expiration until all items were overdue and then freed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14sna: Rename DRI2 files, functions and variablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14sna: Avoid promoting SHM Pixmaps for DRIChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-06sna: Discard the TearFree damage when doing a full CPU migrationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-01sna: Refactor migration DBG codeChris Wilson
And add a new DBG option to disable partial-cpu migrations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-30sna: Be more lenient and allow tiled uploads to replace CPU buffersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-29sna: Discard TearFree damage on partial migrationChris Wilson
If we are overwriting part of the framebuffer, we know we do not need to read that portion back from the scanout. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-29sna: Preserve cpu hint for compatible mmapping of the GPU boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-28sna: Assert against underflows in BLT command lengthsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-24sna: Tweak use inplace CPU maps for writingChris Wilson
Allow us to write into a GPU bo without any pending CPU damage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-24sna: INPLACE has early exits in move-to-cpuChris Wilson
We can update the priv->cpu flag more accurately by accounting for the early exits for the INPLACE accessors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-24sna: Be more selective of reusing bo for inplace uploads on !LLCChris Wilson
On older architectures, we can only do the inplace upload into a GPU bo into a new unused bo (that is still in the GPU domain). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-15sna: Discard TearFree readback when overdrawingChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-11sna: Restrict WHOLE hint to PutImage on a complete PixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-09sna: Handle clipped PutImage uploads more carefullyChris Wilson
If the upload is clipped, we do not want to apply the WHOLE migration hints. References: https://bugs.freedesktop.org/show_bug.cgi?id=77178 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-09sna: Tweak application of WHOLE hint for uploadsChris Wilson
This help with the continuing saga of commit 1de1104064b5898cbed37e836901694a381c1266 [2.99.911] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Feb 21 22:43:04 2014 +0000 sna: Use a hint to do whole image uploads inplace References: https://bugs.freedesktop.org/show_bug.cgi?id=77178 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-09sna: Add some DBG for whole CPU pixmap migrationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-08sna: Refactor 3 similar CPU migration promotion checks into oneChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=77178 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-07sna: Avoid double application of pixel widening for degenerate linesChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=77074 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-05sna: Avoid discarding damage when applying WHOLE hint to pixmap migrationChris Wilson
Once again, we must be careful when promoting from a region to whole pixmap migration that we do not discard required damage. Fixes regression from commit 27ac9f574f65cbd535751c925e9b2e2d7c8a6b3a [2.99.911] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Feb 27 08:33:52 2014 +0000 sna: Avoid promoting region-to-whole migration and discarding damage Reported-by: gedgon@gmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77063 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-31sna: Fix predicate inversion for assertionChris Wilson
The assertion was checking that the invalid condition was true, rather than that it never happened. Oops. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-31sna: Use a cheaper check for a replacement operationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-31sna: Discard damage tracking for operations to the whole pixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-31sna: Promote to the GPU operations that cover the whole pixmapChris Wilson
If the pixmap is already partially on the GPU, and the next operation touches the entire pixmap, promote that operation back to the whole GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-31sna: Regularly check that damage does exceed the pixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-27sna: Tighten detection of GCs that translate to solid fillsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-19sna: Assert after applying clipping that the draw rectangle is wholly containedChris Wilson
Otherwise we ignore the purpose of applying the clip! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14sna: Ensure we flush SHM pixmaps if rendering to a GPU shadowChris Wilson
Normally, we try to render into the CPU bo of a SHM pixmap. However, under the right circumstances we may try to do a series of rendering into the GPU bo and then copy it back to the CPU bo. In that case, we need to be sure to mark the pixmap as requiring the flush. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-11sna: Avoid using the wrong pitch for comparing replacement sizesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>