Commit Graph

5067 Commits

Author SHA1 Message Date
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 444da84c47 configure: Version bump for 2.19.0 release 2012-04-29 21:49:04 +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
Chris Wilson 986dbdda3b sna: Tweak placement choice for high-overhead operations
Some operations cost more to setup than to transfer data back and forth!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28 14:19:48 +01:00
Chris Wilson daac9a1d03 sna: Micro-optimise common case of checking a single fenced bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-28 14:19:47 +01:00
Chris Wilson 5967d76ca0 sna: Fixup broken assertion
It is valid for the cpu_bo to be NULL, as we may be choosing to free the
large shadow pixel buffer instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-25 17:15:37 +01:00
Chris Wilson 860d3859b5 sna/gen7: Add CS stall before changing WM binding table
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-25 16:14:35 +01:00
Chris Wilson c219283460 sna/gen7: Apply more recent improvements from SNB perf tuning
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-25 16:02:21 +01:00
Chris Wilson a3371613c9 sna: Do not automagically convert GTT mappings on untiled scanout to CPU
The likelihood of an untiled mapping of the scanout is slim, except for
gen3 with large desktops, and there it should never be in the CPU
domain...

The issue is that we may perform an operation "inplace", yet incoherent
with the display engine, and never flush the CPU cache, resulting in
render corruption. In theory at least!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-25 11:17:58 +01:00
Chris Wilson 1abd92cd01 sna: Clear the domain tracking after attaching the bo to scanout
This is basically to make sure we don't continue treating it as CPU
coherent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-25 11:17:58 +01:00
Chris Wilson 8c58c840b1 sna/dri: Always clear the scanout when destroying dri2 buffers
As we may end up holding onto and releasing the Screen pixmap last, we
may also be responsible for flushing the last reference to the scanout.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-23 11:09:37 +01:00