Commit Graph

3855 Commits

Author SHA1 Message Date
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
Chris Wilson 020d84d2d0 sna/accel: Fix sense of nothing-to-do due to clipping
A missing not due to a hasty conversion from an assert.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 22:32:00 +01:00
Chris Wilson b7fd6906c4 sna/accel: Actually apply the clip to the glyph extents
References: https://bugs.freedesktop.org/show_bug.cgi?id=41718
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:52:14 +01:00
Chris Wilson eb5f86b781 sna/accel: Correctly offset the damage intersection for glyph runs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:52:10 +01:00
Chris Wilson a4766026ad sna/accel: Check for reloc overflow when adding a new glyph run
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:32:30 +01:00
Chris Wilson b10850af41 sna/blt: Check for reloc overflow when initialising solid fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:09:25 +01:00
Chris Wilson d5242565ef sna/gen2: Trim some surplus state commands
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-12 23:28:57 +01:00
Chris Wilson 7c50205323 Remove vestigial includes from DRI1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-12 20:36:53 +01:00
Chris Wilson b6b3bb9b5e sna: compare against the right array of cache buckets
Fortunately harmless today as there are the same number of
inactive/active buckets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 17:14:18 +01:00
Chris Wilson 1f70095837 sna: And free the clip after creation for PolySegments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 16:06:31 +01:00
Chris Wilson 92f4d978c8 sna: More micro-optimisation of messing around with clip regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 15:52:13 +01:00
Chris Wilson 57151f6547 sna: Micro-optimise checking for singular clip boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 15:23:17 +01:00
Chris Wilson 823a4272c5 sna/gen3: Avoid RENDER/BLT context switch for fill boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:51:41 +01:00
Chris Wilson 887361de17 sna: Enable single fill fast path for PolySegment
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:51:25 +01:00
Chris Wilson 721cf30e9e sna/accel: If the data is already on the GPU, use it for the source
Fixes regression from 1ec6a0e277 (sna: Move the source to the GPU
if it is reused).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:29:28 +01:00
Chris Wilson 15a4410cec sna: use correct insertion point for sorting partials
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:28:30 +01:00
Chris Wilson a9b53c4877 sna: Mark the spans render functions as fastcall
This reduces the amount of dancing required to call into the span
functions as we can pass the arguments in both the integer and floating
point registers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 10:56:51 +01:00
Chris Wilson 208fa8e6b8 sna/trapezoid: Perform the NULL check for damage in the caller
Save the function call overhead in the common case.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 10:56:38 +01:00
Chris Wilson 5050fead0e sna/gen3: avoid applying zero offset to common spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 10:54:53 +01:00
Daniel Vetter d0184b5909 snb: implement PIPE_CONTROL workaround
Sandybdrige requires an elaborate dance to flush caches without
hanging the gpu. See public docs Vol2Part1 1.7.4.1 PIPE_CONTROL
or the corrensponding code in mesa/kernel.

This (together with the corresponding patch for the kernel) seems to
fix the hangs in cairo-perf-traces I'm seeing on my snb machine.

v2: Incorporate review from Chris Wilson. For paranoia keep all three
PIPE_CONTROL cmds in the same batchbuffer to avoid upsetting the gpu.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-11 09:54:17 +02:00