summaryrefslogtreecommitdiff
path: root/src/sna/sna_blt.c
AgeCommit message (Collapse)Author
2012-12-13sna: Fix up BLT overwrite detection to use target_handleChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-08sna: Flush upon change of target if GPU is idleChris Wilson
The aim is to improve GPU concurrency by keeping it busy. The possible complication is that we incur more overhead due to small batches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-30sna/gen6+: Only apply the BLT w/a for self-copiesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-30Convert generation counter to octalChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-27sna/blt: Avoid clobbering common state before converting to a BLTChris Wilson
In case we need to continue on with the render operation, we need to preserve the existing state. Reported-by: Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=57601 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-25sna: Transform a simple repeat pattern into range of the BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-31sna: Set a valid box when checking for GPU bo for BLT composite opsChris Wilson
Reported-by: Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=47597 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-19sna: Clear the damage along with the BO when forcing the stall for inplace BLTChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56180 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna: Check that we have sufficient space for a copy when replacing a fillChris Wilson
Reported-by: Timo Kamph <timo@kamph.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55700 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna: Check that for batch overflows after advancing a BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-23sna: Check against op->dst.bo rather than priv->cpu_bo for composite uploadChris Wilson
In this case, we may also be handling an unattached pixmap, so avoid the deferences of the sna_pixmap unless we are sure it will exist. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-23sna: Check that the CPU bo exists before declaring it is busy along uploadChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55251 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-22sna: Force the stall before trying to upload into a busy CPU boChris Wilson
Under the circumstances where we can not instead stream the write into the GPU bo, we need to use the busy CPU bo. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54978 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna: Fix analysis of source extents for BLT compositeChris Wilson
After we have computed the source offset vector for the transformed source bo, we need to use that with respect to the destination rectangle to verify that the source sample is wholly within bounds. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna: Fix BLT composite offsetChris Wilson
Reported-by: Jiri Slaby <jirislaby@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54868 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna: Avoid corrupting the CPU bo when compositing fallback data through BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-26sna: Add some DBG to BLT composite substitute to show if redirection is usedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20sna: Correct ordering of calls to memcpy for BLT cpu composite pathsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20sna: Avoid migrating the BLT composite src to the GPU if the dst is notChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-20sna: Remove unneeded source bo unref after __sna_render_pixmap_bo()Chris Wilson
As __sna_render_pixmap_bo() deliberately does not reference its returned bo, we need to avoid unreferencing it else we cause explosions later. Fixes regression from commit a13781d19defc97af6a279c11a85e33ef825020e Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Aug 19 09:45:12 2012 +0100 sna: Enable BLT composite functions to target CPU buffers Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-19sna: Enable BLT composite functions to target CPU buffersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18sna: Avoid forcing an upload for an unblittable bo unless on a fallback pathChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-18sna: Silence a couple of recent compiler warningsChris Wilson
sna_accel.c: In function 'sna_poly_fill_rect_extents': sna_accel.c:11438:11: warning: unused variable 'v' [-Wunused-variable] sna_blt.c: In function 'sna_blt_composite__convert': sna_blt.c:1712:3: warning: format '%s' expects a matching 'char *' argument [-Wformat] sna_blt.c:1738:3: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'CARD32' [-Wformat] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-16sna: Remember alpha-fixup for BLT uploadChris Wilson
Still dubious whether this is truly beneficial... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-11sna/gen6+: Try to use the BLT to avoid TLB missesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-10sna: Reset BLT state after copy-boxesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21sna: Refresh experimental userptr vmap supportChris Wilson
Bring the code uptodate with both kernel interface changes and internal adjustments following the creation of CPU buffers with set-cacheing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21sna: Micro-optimise copying boxes with the blitterChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16sna: Share the pixmap migration decision with the BLT composite routinesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna: Aim for consistency and use stdbool except for core X APIsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-09sna: Simplify the DBG incarnationChris Wilson
It was only ever used in conjunction with HAS_DEBUG_FULL. For debug purposes it is as easy to redefine DBG locally. By simplifying the DBG macro we can create it consistently and so reduce the number of compiler warnings. Long term, this has to be dynamic. Sigh. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-08sna: Fixup fb wrapperChris Wilson
To accommodate changes in the Xserver and avoid breakage; would have been much easier had the fb been exported in the first place.
2012-06-19sna: Assert expected return valuesChris Wilson
Keep the semantic analyser happy by consuming the expected return value with an assert. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-17sna: Fix the blt composite op with no-opsChris Wilson
When returning early because the operation is a no-op, we still need to fill in the function pointers to prevent a later NULL dereference. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-13sna: ConstificationZdenek Kabelac
Adding preserving const modifiers to decrease amount of const warnings Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-13sna: Fix operator preference around a | b & c | dChris Wilson
Tell the compiler what we really mean is a | (b & (c | d)) Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-13Lots of trivial semantic fixesChris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-04sna: Exclude consideration of tiling flags from overwriting BLT commandsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28sna: Micro-optimise common case of checking a single fenced boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-03sna/gen3: Convert the clear-color from picture->format to a8r8g8b8Chris Wilson
The shaders treat colours as an argb value, however the clear color is stored in the pixmap's native format (a8, r5g6b5, x8r8g8b8 etc). So before using the value of the clear color as a solid we need to convert it into the a8r8g8b8 format. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48204 Reported-by: Paul Neumann <paul104x@yahoo.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47308 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-13sna: Reduce OVER with a clear pixmap to a BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-11sna: Make the maximum BLT pitch assertions consistentChris Wilson
The maximum permissibly BLT pitch value is 32767, so make the assertions match... Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47206 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-10sna: Feed fallback mono trapezoids through the mono rasteriserChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-02sna: Prevent backing pixmaps being created laterChris Wilson
We used to allow the backing pixmap to be created later in order to accommodate ShmPixmaps and ShmPutImage. However, they are now correctly handled upfront if we choose to accelerate those paths, and so all choice over whether to attach to a pixmap are made during creation and are invariant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-01sna: Revamp vmap supportChris Wilson
Dust off the kernel patches and update to reflect the changes made to support LLC CPU bo, in particular to support the unsynchronized shadow buffers. However, due to the forced synchronisation required for strict client coherency we prefer not to use the vmap for shared pixmaps unless we are already busy (i.e. sync afterwards rather than before in the hope that we can squash a few operations into one). Being able to block the reply to the client until the request is actually complete and so avoid the sync remains a dream. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-27sna/gen2; Initialise channel.is-opaque for fillsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22sna/blt: Avoid clobbering the composite state if we fail to setup the BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-04sna: Apply redirection for the render copy into large pixmapsChris Wilson
If the pixmap is larger than the pipeline, but the operation extents fit within the pipeline, we may be able to create a proxy target to transform the operation into one that fits within the constraints of the render pipeline. This fixes the infinite recursion hit with partially displayed extremely large images. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-31sna/gen5: Always prefer to emit solid fills using the BLTChris Wilson
As the BLT is far, far faster than using a shader. Improves cairo-demos/chart from 6 to 13 fps. Reported-by: Michael Larabel <Michael@phoronix.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-29sna: Add a tiled fallback for large BLT copiesChris Wilson
If we are attempting to copy between two large bo, larger than we can fit into the aperture, break the copy into smaller steps and use an intermediatory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>