Commit Graph

4643 Commits

Author SHA1 Message Date
Chris Wilson b0dfd8223a sna: Flush the batch before blocking if the GPU is idle
If we have work pending for the GPU and we believe it is idle, just
submit the batch in order to improve GPU/CPU concurrency and reduce
latency.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-13 08:33:23 +01:00
Chris Wilson 6924fc525d sna: Fix off-by-one in computation of width for inplace trapezoids
This lead to the dropping of the last pixel for small area trapezoids,
such as the right hand outline of buttons under ClearLooks.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48320
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-11 14:05:35 +01:00
Chris Wilson a58a543e84 sna: handle vmap creation failures gracefully
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 13:07:08 +01:00
Chris Wilson 9af651fdf9 sna: Include some DBG for segment drawing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 11:20:41 +01:00
Chris Wilson 3aa98289e3 sna: Correct adjustment of LineCap for rectilinear segments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 10:53:42 +01:00
Chris Wilson ad69316ab1 sna: Include a small amount of timer-slack to avoid very short sleeps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 10:03:49 +01:00
Chris Wilson 29d1d409b2 sna: Avoid doubling the final step of poly lines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-10 09:54:53 +01:00
Chris Wilson a83d90ee61 sna: Avoid randomly changing domains of active bo
After attaching the bo to the scanout, mark it as retired in order to
update its domains so that the assertion during retirement later is
correct.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49526
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-09 20:36:24 +01:00
Chris Wilson d5200510b8 sna: Respect the error terms when reversing the PolyLine DDA
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-09 19:25:20 +01:00
Chris Wilson a3d37fb29f sna: Force remapping for IO transfer
Should fix regression from fcccc5528 (sna: Improve handling of inplace
IO for large transfers) whereby it was aborting the transfer it we need
to remap the buffer for the upload.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49546
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 15:47:14 +01:00
Chris Wilson 2a9a93e448 sna: Only avoid ring switching for indirect uploads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 15:12:51 +01:00
Chris Wilson 613902b60e sna: Fix off-by-one in checking available execbuffer slots
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 14:30:46 +01:00
Chris Wilson 663e387b35 sna: Only submit a batch to the scanout if it is not already busy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 14:30:46 +01:00
Chris Wilson cd7a56b731 sna: Throttle independently of scanout updates
As we are now throttling to relieve GTT pressure, it is a benefit to
consistently throttle before blocking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 14:30:46 +01:00
Chris Wilson 2372176f73 sna: Throttle execution when searching for inactive buffers
If we have some active buffers that we may reuse and old outstanding
requests, throttling before retiring should prevent the CPU from running
away from the GPU and hogging the entire GTT and RAM.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 14:30:46 +01:00
Chris Wilson 4df2287497 sna: Rate-limit and shrink bo usage if we hit system resource limits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 14:30:46 +01:00
Chris Wilson ca4d2296e6 sna: Expand batch buffers
As batch buffers are compacted to fit into the smallest bo, the only
cost is the larger static array allocation (and presumably cache
misses).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 14:30:46 +01:00
Chris Wilson 9281b80644 sna/gen[345]: Clear used vertices when discarding unmappable vbo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-08 10:52:44 +01:00
Chris Wilson a6ee376e93 sna: Use the correct invocation of kgem_bo_destroy() for sanity-checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-07 21:22:28 +01:00
Chris Wilson c89c7e9a04 sna: Update select timeout when installing a timer in the block handler
The block handler is run after the timers are queried for their
expiration and so if we install a timer in the block hander, we must
set the timeout ourselves.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-07 21:22:28 +01:00
Chris Wilson 4ba366ead3 sna: Manually execute the timer as TimerForce does not run an inactive timer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-07 09:04:57 +01:00
Chris Wilson 2c801c45db sna: Replace timerfd with OsTimer
As timerfd is linux-specific, and OsTimer an OS-agnostic abraction,
replace the former with the later. Arguably this has slightly better
performance characteristics in select-bound loops.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-06 21:55:04 +01:00
Chris Wilson 74d2707de4 sna: Remove short-circuiting for large font fallbacks
Unlike the fallback for an unhandled depth, we need to ensure that the
pixmaps are mapped to the CPU before calling the fb routines.

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49558
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-06 21:53:25 +01:00
Chris Wilson c5b6741d37 sna/gen2+: Fix typo for computing redirected extents for render copy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-06 12:51:23 +01:00
Chris Wilson 771090f25d sna: Add a pair of asserts to track down a NULL pointer dereference
Looks like the assumption for the location of the data is invalid,
allocation failure, perhaps?

References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-06 12:51:23 +01:00
Chris Wilson d376a960df sna/dri: Only track a single pending flip across all pipes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-06 12:51:23 +01:00
Chris Wilson 450592f989 sna: Cache the framebuffer id
Also fixup a weakness of only tracking scanout with a single bit, as we
used to clear it forcibly after every flip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-06 12:51:23 +01:00
Chris Wilson 29d035279b sna/dri: pageflip unref debugging
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-04 09:34:36 +01:00
Chris Wilson 079b491ced sna: Ensure drawables are clipped against the pixmap before migration
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 23:52:17 +01:00
Chris Wilson 1a5f8599b1 sna: Compile fix for fresh assertion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 23:21:48 +01:00
Chris Wilson 61cac5c265 sna: Maintain a reference to the chain of proxies
Rather than attempt to flatten the chain to the last link, we may need
to hold a reference to the intermediate links in case of batch buffer
submission.

Fixes http://tnsp.org/~ccr/intel-gfx/test.html

Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 22:40:52 +01:00
Chris Wilson dea5d429f7 sna: Remove extraneous SCANOUT flags
These are now fixed by obeying a minimum alignment restriction.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 22:37:09 +01:00
Chris Wilson 19fd24a4db sna: Fix offset for combining damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 22:37:09 +01:00
Chris Wilson 1376c81dbf sna: Debug option to force particular upload/download paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 22:37:08 +01:00
Chris Wilson f0d464d6b1 sna/dri: Balance flush counting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 22:28:43 +01:00
Chris Wilson d47e98dd64 sna: Minor glyph fallback fixes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 14:48:27 +01:00
Chris Wilson a1f08b8850 sna: Don't discard GPU buffer if we only want to read back for the operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 14:48:27 +01:00
Chris Wilson fcccc5528b sna: Improve handling of inplace IO for large transfers
If the transfer is large enough to obliterate the caches, then it is
preferrable to do it inplace rather than upload a proxy texture and
queue a blit. This helps prevent an inconsistency where one layer
believes the operation should be done inplace only for the IO layer to
perform an indirect upload.

Testing show no significant impact upon the cairo-traces, but it does
prevent x11perf -shmput from exploding.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 14:48:27 +01:00
Chris Wilson 53568e8e49 sna/gen7: Fix debug printing of primitives
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 14:48:26 +01:00
Chris Wilson 01c26a44fd sna: Avoid reducing damage for synchronisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-03 14:48:26 +01:00
Chris Wilson f4c34e9ab3 sna: Bring back the minimum alignment for G33
The underlying cause is still not fixed. It should be possible to use
the much laxer alignment for single-stream linear. Still no idea how I
fail to convince the GPU to drop the depth buffer.

Reported-by: Matti Hamalainen <ccr@tnsp.org>
References: https://bugs.freedesktop.org/show_bug.cgi?id=49391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-02 19:21:20 +01:00
Chris Wilson 10b4a9bb5f sna: Always try to operate inplace if we an LLC gpu bo 2012-05-02 19:20:46 +01:00
Chris Wilson dd80fb00bf sna: Fallback for glyphs too large for XY_TEXT_IMMEDIATE
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-02 11:31:58 +01:00
Chris Wilson 7e09babb3e sna: Only attempt to reuse exported scanout buffers
Yet more mesa w/a.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-01 12:37:45 +01:00
Chris Wilson b4b32e7a01 sna: Fast-path unclipped glyphs
Avoid the redundant computation of the glyph intersection with the
drawable bounding box.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-01 11:15:00 +01:00
Chris Wilson ffdf9aca12 legacy/i810: hwmc additionally depends upon building DRI
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-29 21:59:52 +01:00
Chris Wilson a206a1eee1 sna: Tune relocation array size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28 14:19:48 +01:00
Chris Wilson 4f1908c651 sna: PolyPoint only uses the gc->fgPixel
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28 14:19:48 +01:00
Chris Wilson 8453034c7d sna/gen6: Allow ring switching at the start of a batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28 14:19:48 +01:00
Chris Wilson 93ad779389 sna: Tweak semaphores-enabled heuristic
The kernel module now defaults to -1, confusing the test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28 14:19:48 +01:00