summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-01-13sna: Decouple dirty pixmaps from list if we fail to upload themChris Wilson
Rather than iterate endlessly trying to upload the same pixmap when failing to flush dirty CPU damage, try again on the next flush. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-13sna: Decouple from CPU dirty list after removing all CPU damageChris Wilson
In the paths where we discard CPU damage, we also need to remove it from the dirty list so that we do not iterate over it during flush. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Correct iteration counter for stippled blitsChris Wilson
==7215== Invalid read of size 2 ==7215== at 0x51A72F3: sna_poly_fill_rect_stippled_8x8_blt (sna_accel.c:7340) ==7215== by 0x51A9CDF: sna_poly_fill_rect_stippled_blt (sna_accel.c:8163) ==7215== by 0x51A3878: sna_poly_segment (sna_accel.c:6090) ==7215== by 0x216C02: damagePolySegment (damage.c:1096) ==7215== by 0x13F6E8: ProcPolySegment (dispatch.c:1771) ==7215== by 0x1436B4: Dispatch (dispatch.c:437) ==7215== by 0x131279: main (main.c:287) ==7215== Address 0x6f851e8 is 0 bytes after a block of size 32 alloc'd ==7215== at 0x4825DEC: malloc (vg_replace_malloc.c:261) ==7215== by 0x51A3558: sna_poly_segment (sna_accel.c:6049) ==7215== by 0x216C02: damagePolySegment (damage.c:1096) ==7215== by 0x13F6E8: ProcPolySegment (dispatch.c:1771) ==7215== by 0x1436B4: Dispatch (dispatch.c:437) ==7215== by 0x131279: main (main.c:287) An example being the stippled outline in gimp, the yellow marching ants, would randomly walk over the entire image. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna/dri: Hook up a compile option to switch colour buffers to Y-tilingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Reorder composite-done to destroy mask bo before source boChris Wilson
Just in the unlikely event that we hit the delete-partial-upload path which prefers destroying the last bo first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna/damage: Fix union of extents with dirty damage but no regionChris Wilson
By failing to account for certain paths which would create a damage elt without fully initialisating the damage region (only the damage extents), we would later overwrite the damage extents with only the extents for this operation (rather than the union of this operation with the current damage). This fixes a regression from 098592ca5d, (sna: Remove the independent tracking of elts from boxes). Include the associated damage migration debugging code of the callers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Pass a hint that we may like to perform the fallback in placeChris Wilson
If we do not read back from the destination, we may prefer to utilize a GTT mapping and perform the fallback inplace. For the rare event that we wish to fallback and do not already have a shadow... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Use the GPU bo if it is all damagedChris Wilson
By marking the scratch upload pixmap as damaged in both domains, we confused the texture upload path and made it upload the pixmap a second time. If either bo is all-damaged, use it! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Dump batch contents for debugging before modificationChris Wilson
We need to dump the batch contents before the maps are made by the construction of the batch itself. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Update for removal of backwards compatible miWideDashChris Wilson
miWideDash() no longer calls miZeroLineDash() when called with gc->lineWidth==0, we need to do so ourselves. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Re-enable min-alignment workaround on pre-SNB hwChris Wilson
Confirmed as still being required for both gen3 and gen4. One day I will get single-stream mode working, just not today apparently. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Only shrink a partial buffer if it is no longer used.Chris Wilson
The condition on being able to shrink a buffer is more severe than just whether we are reading from the buffer, but also we cannot swap the handles if the existing handle remains exposed via a proxy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Improve a DBG messageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Prevent 60Hz wakeups if the client stops in mid-renderChris Wilson
Only continue to wake up if the scanout remains active. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Align the partial buffer contents to cachelinesChris Wilson
To enable Daniel's faster pwrite paths. Only one step removed from using whole page alignment... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Replace the open-coded bubble sort of the partial listChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna/video: Fix for changes in damage apiChris Wilson
We can avoid both calls to modify the damage with one simple check. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Don't call RegionIntersect for the trivial PutImageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Disable the min alignment workaroundChris Wilson
Allow all generations to use the minimum alignment of 4 bytes again as it appears to be working for me... Or at least what remains broken seems to be irrespective of this alignment. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Prevent shrinking a partial buffer stolen for a readChris Wilson
If we reuse a partial buffer for a read, we cannot shrink it during upload to the device as we do not track how many bytes we actually need for the read operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Don't drop expired partial bo immediately, wait until dispatchChris Wilson
As the partial bo may be coupled into the execlist, we may as well hang onto the memory to service the next partial buffer request until it expires in the next dispatch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-12sna: Store damage-all in the low bit of the damage pointerChris Wilson
Avoid the function call overhead by inspecting the low bit to see if it is all-damaged already. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna: Choose a stride for the indirect replacementChris Wilson
Don't blithely assume that the incoming bytes are appropriately aligned for the destination buffer. Indeed we may be replacing the destination bo with the shadow bytes out of another,larger, pixmap, in which case we do need to create a stride that is appropriate for the upload an perform the 2D copy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna: Mark upload pixmaps as being wholly GPU damagedChris Wilson
So that subsequent code resists performing CPU operations with them (after they have been populated.) Marking both sides as wholly damaged breaks the rules, but should work out so long as we check whether we can perform the operation within the target damage first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna: Use a minimum alignment of 64Chris Wilson
We should be able to reduce this by disabling dual-stream mode of the GPU (which we want to achieve any way for 2D performance). Artefacts in small uploads demonstrate that we fail to do. References: https://bugs.freedesktop.org/show_bug.cgi?id=44150 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna/gen6: Special case spans with no transformChris Wilson
As the no transform is a special case of affine, we were attempting to deference the NULL transform in order to determine if it was a simple no-rotation matrix. As the operation is extremely simple, add a special case vertex program to speed it up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna: Explicitly retire the bo following a serialisation pointChris Wilson
This is to keep the sanity checks in order, but conceptually should be useful as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna: Mark the bo as no longer in the GPU domain after clearing needs_flushChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna: Add assertions to track requestsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11sna/gen6: Add a vertex program for a simple (affine, no rotation) spansChris Wilson
I long for the day when this code is obsolete... Until then, this gives a nice boost in the fishtank. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Amalgamate small replacements into upload buffersChris Wilson
Similar for the standard io paths, try to reuse an upload buffer for a small replacement pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Check needs-flush status immediately upon destroyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Align the small upload buffers to 2 texels, and the pitch to dwordsChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=44150 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: A partial read buffer is allowed to be in the GPU domainChris Wilson
As we can create the read buffer from an active cached bo, it may already be in the GPU domain by the time we first finish it, so fix the broken assertion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Shrink the partial upload buffers before compacting the batchChris Wilson
So that the relocation entries point into the contiguous surface/batch and can be trivially fixed up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Make the check for a single fill-rectangle clearer before modifying damageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Release the stale GTT mapping after recreating the bo with new tilingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Add reminder about possible future tiling optimisationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Disable the inline xRGB to ARGB upload conversionChris Wilson
As we have to upload the dirty data anyway, setting the alpha-channel to 0xff should be free. Not so for firefox-asteroids on Atom at least. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna/gen[23]: Tile render fill to oversized boChris Wilson
If we are forced to perform a render operation to a bo too large to fit in the pipeline, copy to an intermediate and split the operation into tiles rather than fallback. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Shrink upoads buffersChris Wilson
If we do not fill the whole upload buffer, we may be able to reuse a smaller buffer that is currently bound in the GTT. Ideally, this will keep our RSS trim. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Destroy the counter damage after a reduction-to-allChris Wilson
If, for instance, we reduce the GPU damage to all we know that there can be no CPU damage even though it may still have a region with a list of subtractions. Take advantage of this knowledge and cheaply discard that damage without having to evaluate it. This should prevent a paranoid assertion that there is no cpu damage when discarding the CPU bo for an active pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Replace the free-inactive-gpu-bo with the generic codeChris Wilson
The function was semantically equivalent to moving the pixmap to the CPU for writing, so replace it with a call to the generic function. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Allow for xRGB uploads to replace their target boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-10sna: Rearrange buffer allocation to prefer llc bo over vmapsChris Wilson
If we can create snoopable bo, we prefer to use those as creating a vmap forces a new bo creation increasing GTT pressure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-09sna/gen2: Try to avoid creating a bo for solid coloursChris Wilson
As we try to use the diffuse/specular and only resort to using a texture operation for convenience in the rare case of a solid mask. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-09sna/gen2: Eliminate some switching between logic op and blendChris Wilson
If the new mode can be done either using a logic op or with the blend unit, prefer the currently enabled unit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-09sna/blt: Rearrange to reduce a out-of-bounds copy to a clearChris Wilson
If we asked to use the BLT, try to avoid trigging a context switch for a trivial case where we sample outside of a NONE source and so can reduce the operation to a clear. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-09sna/gen2: Add poor-man's linear gradient supportChris Wilson
Convert the linear gradient to a texture ramp and compute the texture coordinates in the standard manner. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-08sna: mark the cpu bo used for the upload buffer as in CPU domainChris Wilson
For correctness we need to inform GEM of the change of domain for the buffer so that it knows to invalidate any caches when it is next used by the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>