Commit Graph

3874 Commits

Author SHA1 Message Date
Chris Wilson fc224e2f8c sna: Clean up some debug messages for 64bit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 20:20:55 +01:00
Chris Wilson f4346e5d25 sna/blt: Use SCANLINE_BLT for multiple fill boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 20:20:49 +01:00
Chris Wilson d7fb98efdc sna: The initial aperture check for a set of bo is unlikely to fail
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 19:36:08 +01:00
Chris Wilson 3c8e1c5c4c sna: Reset the ring flag upon idling
We track the last ring used when active so as to avoid stalling between
batches. Once the GPU has retired all the pending requests, we can use
whichever ring is preferrable for the next operation without any danger
of stalling upon submission.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 19:36:08 +01:00
Chris Wilson 594c5f86bb sna: Don't rewrite the solid colour cache if it hasn't changed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 16:26:38 +01:00
Chris Wilson 5515f75647 sna: Enlarge the minimum pixmap size to migrate for Render
This is to workaround a ping-pong issue involving small icons. The
horrible sequence of operations appears to use a tiled FillRect to copy
from the scanout onto to a temporary pixmap, which causes us to
readback from the scanout. We are destined to hit the fallback path there
anyway until we implement stippling...

References: https://bugs.freedesktop.org/show_bug.cgi?id=41718
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 13:49:55 +01:00
Chris Wilson 87ba33bc0b sna/damage: Avoid reducing the damage for simple tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 13:11:24 +01:00
Chris Wilson 63aa84ef57 sna/gen6: Apply the unknown blitter death workaround
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 13:11:24 +01:00
Chris Wilson 25f2d18194 sna: Compute region extents in place to eliminate redundant stack space
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 13:11:24 +01:00
Chris Wilson 1a43b2a46a sna: Use the unlikely wedged() throughout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 13:11:24 +01:00
Chris Wilson 7a9c76e181 sna: Micro-optimise fill-spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-19 13:11:24 +01:00
Chris Wilson 0b83abfb2b sna/gen6: Don't modify composite arguments whilst checking for BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 14:43:37 +01:00
Chris Wilson ae7bd2bf70 sna/blt: Move the conditional out of the fill-many hotpath
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 13:35:10 +01:00
Chris Wilson 86f99379ee sna/gen4: Add fill-one
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 13:35:10 +01:00
Chris Wilson 26c082dbd3 sna/gen6: Precompute floats_per_rect
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 13:35:10 +01:00
Chris Wilson c69a7989b3 sna/gen5: Add fill-one implementation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 13:35:09 +01:00
Chris Wilson 26a1918290 sna/gen6: Try continuing with the BLT if the last batch was also BLT
In the vain hope of reducing switching between rings and introducing
stalls between batches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 13:35:09 +01:00
Chris Wilson 4b1398f26d sna/gen6: Micro-optimise gen6_rectangle_begin
We can only emit state between primitives, ergo we need only check for
state updates if we've finished the vbo or are starting a new operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 10:29:33 +01:00
Chris Wilson b2d842df5e sna/gen2: Precompute floats-per-rect
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 10:29:33 +01:00
Chris Wilson 729f1ec786 sna/gen2: Prefer to use the BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 10:29:33 +01:00
Chris Wilson adef3a56cd sna/gen3: Prefer to use the BLT where possible for composite ops
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 10:29:33 +01:00
Chris Wilson f40e6ab50b sna/gen3: Prefer to use the BLT to clear the scratch glyph pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-18 10:29:33 +01:00
Chris Wilson 941e3504e0 sna: Some more debug output for request/bo retirement
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 21:25:17 +01:00
Chris Wilson 1d82fe3e52 sna: Only retire the flush handler if nothing was submitted within the period
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 21:25:16 +01:00
Chris Wilson 7758e33340 sna/gen3: Use immediates for black/white solid sources
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 21:25:16 +01:00
Chris Wilson 29ca1a3922 sna/gen3: More removal of memset(0)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 17:59:53 +01:00
Chris Wilson 88bc108788 sna/gen5: Rearrange the BLT->RENDER workaround
So that we can simply use the pending DRAWRECT as the non-pipelined
flush required following use of a BLT command.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 16:44:59 +01:00
Chris Wilson 18aed47ba3 sna: Fast path common colour conversions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 16:41:14 +01:00
Chris Wilson a3466c8b69 sna/accel: Implement a simpler path for CopyArea between the same pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 16:10:31 +01:00
Chris Wilson 8afa05191a sna: Improve debug output for mi/fb fallbacks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 16:08:17 +01:00
Chris Wilson 2b118658d5 sna/gen3: Remove memset(0) from fill_boxes
And initialise only the state used for the operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 16:08:17 +01:00
Chris Wilson f1bb4ebfd8 sna/damage: Clear damage->all when subtracting
I missed clearing the all-damaged flag on the subtract fast paths,
causing us to disregard further GPU damage and losing track of render
coherency.

Reported-by: Roman Jarosz <kedgedev@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41769
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 14:24:04 +01:00
Chris Wilson 46f97127c2 snb,ivb: Workaround unknown blitter death
The first workaround was a performance killing MI_FLUSH_DW after every
op. This workaround appears to be a stable compromise instead, only
requiring a redundant command after every BLT command with little
impact on throughput.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27892
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39524
Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 13:09:17 +01:00
Chris Wilson 71bf291e56 sna/gen3: Micro-optimise gen3_rectangle_begin()
We only need to emit the vbo description either at the beginning of a
new op (when the state may have changed) or after finishing a full vbo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 12:53:19 +01:00
Chris Wilson a032feb253 sna/gen3: Store floats_per_rect alongside floats_per_vertex
Moves a multiply out of the hot path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 12:41:21 +01:00
Chris Wilson 2cbe79b85b sna/gen3: Improve reduction of render operator to blt
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 11:57:07 +01:00
Chris Wilson 606e18bd36 configure: Add a check for pixman version
As SNA requires a fairly recent release and calls directly into pixman.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 10:50:33 +01:00
Chris Wilson 17acaf8e23 sna: Defer CPU fallback if fb calls into mi
If the fb routine does not access the pixel data directly, but instead
calls into an mi routine, we can defer the readback and possibly avoid
it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-17 00:58:02 +01:00
Chris Wilson c348b69f66 sna: Prefer to accelerate non-RENDER operations if already using the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson 6fdc9e3fd3 sna: Simplify busy tracking by trusting the bo->gpu flag
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson 30dff81cd6 sna/accel: Upload source to GPU for !copy CopyAreas
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson eefa925e3d sna/accel: Fall-forward for handling a non-copy CopyArea to a dst gpu bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson 01f41e624b sna/gen2: Eliminate redundant diffuse and rectlist emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson d9e3dbffcb sna/gen2: Fix fill-one-box
Lets only have one special gen2 value for the source channel pixel
colour and so remove the confusion and misrendering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson b89592b16e sna/gen7: Add missing tail to 3DSTATE_SBE
I was a few NULs short of the declared amount.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:14 +01:00
Chris Wilson 33f17b996d Remove a couple of trivial compile warnings for unused variables
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 12:01:34 +01:00
Chris Wilson e5e27528ff sna/blt: Add a pair of operator reductions for opaque fills
Extend the coverage of the BLT for a couple more composite operations,
though they be relatively infrequent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 11:51:44 +01:00
Chris Wilson 3f5289b299 sna/trapezoids: Fallback if the composite operation is not supported
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 11:31:46 +01:00
Chris Wilson 3d79264ef8 sna/tiling: Hook up composite_box
Now used for spans and so triggering death by NULL function pointer on
older chipsets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 11:31:00 +01:00
Chris Wilson f5f3135e3c sna: Ensure that the scanout is flushed before we sleep
So that we do not see any delayed rendering on i965+.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 10:40:39 +01:00