Commit Graph

6349 Commits

Author SHA1 Message Date
Chris Wilson dc643ef753 sna: Apply read-only synchronization hints for move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 12:27:55 +00:00
Chris Wilson 18035a21e1 sna: Remove the confusion of the pixmap->undamaged
This was to track a pixmap that had been used for migration (i.e had in
the past been used for mixed rendering). It is no longer used so remove
it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 12:10:35 +00:00
Chris Wilson 46141d277f sna: Consider fill style for XPolyRectangle
The rectangle outline is not always solid...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 10:16:07 +00:00
Chris Wilson d5c8d38afa sna: Refactor to remove a goto from sna_put_zpixmap_blt()
The complexity of the function has been moved to move-to-cpu so we can
take further advantage of the simplified logic in put_zpixmap to clean
up the code by removing an unwanted goto.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 10:10:54 +00:00
Colin Walters 9552438caa autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:18:27 -05:00
Adam Jackson 87d773249a configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:18:23 -05:00
Chris Wilson dbf1cfec9c 2.20.18 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 12:20:48 +00:00
Chris Wilson 47caffc50b sna: Restrict upload buffers to reduce sampler TLB misses
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 11:10:03 +00:00
Chris Wilson ab36300a22 sna: Correct DBG to refer to the actual tiling mode forced
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:30:10 +00:00
Chris Wilson a6ecb6d31d sna: Discard the batch if we are discarding the only buffer in it
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:30:10 +00:00
Chris Wilson 26db2438e3 sna: Fix computation of large object sizes to prevent overflow
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:00:21 +00:00
Chris Wilson 54c1d97d5a sna: Add DBG for when we add the inplace hint
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:00:04 +00:00
Chris Wilson 588c5aa6bc sna: Revert use of a separate CAN_CREATE_SMALL flag
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 08:15:42 +00:00
Chris Wilson af85ffdec7 sna: Avoid serialising on an move-to-cpu for an async operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 23:02:18 +00:00
Chris Wilson d70be85dc7 sna: Assert that we never try to mix INPLACE / ASYNC hints for move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:09 +00:00
Chris Wilson 1287c3a24c sna: Specialise sna_get_image_blt for clears to avoid sync readback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson da4972eec5 sna/trapezoids: Avoid the multiply for an opaque source
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson 7f968c8c99 sna: Add DBG to use_shm_bo()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson af63fab504 sna: Hint that a copy from a SHM bo will likely be the last in a batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson 1be4364092 sna: Pass the async hint for the upload into the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson 2113f7f440 sna: Free the SHM pixmaps after b266ae6f6f
Since b266ae6f6f protected the static allocations from being reaped in
the normal course of events, we need to penetrate those defenses in
order to finally free the SHM mappings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 09:33:03 +00:00
Chris Wilson 441c481630 sna: Mark uploads with async hints when appropriate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 01:26:19 +00:00
Chris Wilson 6abd442279 sna: Avoid allocating an active CPU bo unnecessarily
If we will not write back the GPU damage to the bo as we intend to
overwrite it for the next operation, we can forgo allocating the active
CPU bo and skip the synchronisation overhead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 00:18:42 +00:00
Chris Wilson f235c74cd6 sna: Tweak considering of last-cpu placement for inplace regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-14 17:02:48 +00:00
Chris Wilson 70c5e41b51 sna: Limit temporary userptr uploads to large busy targets or LLC machines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-14 17:02:42 +00:00
Chris Wilson cf860da1c7 sna: Apply PutImage optimisations to move-to-cpu
We can replace the custom heuristics for PutImage by applying them to
the common path, where hopefully they are equally valid.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-14 17:02:42 +00:00
Chris Wilson e4ad447781 sna: Use userptr to accelerate GetImage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-14 15:04:56 +00:00
Chris Wilson 3cc04a8e24 sna: Initialize src_bo to detect allocation failure
sna_accel.c: In function 'sna_put_image':
sna_accel.c:3730:18: warning: 'src_bo' may be used uninitialized in this
function [-Wmaybe-uninitialized]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 17:34:03 +00:00
Chris Wilson 3f04b0b98d sna: Check size against aperture before attempting to perform the GTT mapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 17:33:28 +00:00
Chris Wilson 7a7db06c62 sna: Add a compile flag for measuring impact of userptr uploads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 14:14:05 +00:00
Chris Wilson bcc212dc7a sna: Use the pixmap size (not drawable) to determine replacement
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 14:14:05 +00:00
Chris Wilson 32f43f618d sna: Allow large image uploads to utilize temporary mappings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 14:14:05 +00:00
Chris Wilson bf2b2e2f91 sna: Allow creation of a CPU map for pixmaps if needed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 14:14:00 +00:00
Chris Wilson b266ae6f6f sna: Relax limitation on not mapping GPU bo with shadow pointers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 14:13:55 +00:00
Chris Wilson a2d8216143 sna: Correct a few assertions after enabling read-only mappings
As these do not flush the active state if we have read-read mappings, we
need to be careful with our asserts concerning the busy flag.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 10:17:33 +00:00
Chris Wilson ab01fd696e sna: Experiment with a CPU mapping for certain fallbacks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-12 17:04:54 +00:00
Chris Wilson 03d392cd1d sna: Tweak max object sizes to take account of aperture restrictions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-12 08:51:52 +00:00
Chris Wilson d111c464bf sna: After a size check, double check the batch before flushing
As we may fail the size check with an empty batch and a pair of large
bo, we need to check before submitting that batch in order to not run
afoul of our internal sanity checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-12 08:18:04 +00:00
Chris Wilson ec77a07b41 sna/dri: Prefer to preserve the ring of the destination bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11 15:59:37 +00:00
Chris Wilson 42f1026e11 sna: Reorder struct kgem_bo to move related data into the same cacheline
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11 15:59:37 +00:00
Chris Wilson aead71051e sna: Disable memcpy_to_tiled_x() uploads on 32-bit systems
It's far too slow due to the register starved instruction set producing
attrocious code and the extra overhead in the kernel for managing memory
mappings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11 15:59:37 +00:00
Chris Wilson 220970b1a4 sna: Also prefer to use the GPU for uploads into a tiled bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11 15:59:33 +00:00
Chris Wilson 672e59851c sna: Prefer userptr if copying to a tiled bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11 12:57:22 +00:00
Chris Wilson 441ef916ae intel: Throttle harder
Filling the rings is a very unpleasant user experience, so cap the
number of batches we allow to be inflight at any one time.

Interestingly, as also found with SNA, throttling can improve
performance by reducing RSS. However, typically throughput is improved
(at the expense of latency) by oversubscribing work to the GPU and a
10-20% slowdown is commonplace for cairo-traces. Notably, x11perf is
less affected and in particular application level benchmarks show no
change.

Note that this exposes another bug in libdrm-intel 2.4.40 on gen2/3.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-11 12:56:08 +00:00
Chris Wilson a37d56f338 sna: Use some surplus bits to back our temporary pixman_image_t
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10 16:28:24 +00:00
Chris Wilson 09ea1f4402 sna: Prefer to use the GPU for copies from SHM onto tiled destinations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10 16:26:24 +00:00
Chris Wilson c63147a3c3 sna: Allow CPU bo to copy to GPU bo if the device is idle.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10 15:19:36 +00:00
Chris Wilson 2933e75958 sna: Ignore the last pixmap cpu setting if overwritting all damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10 15:19:36 +00:00
Chris Wilson 934ea64f7f sna: With a GPU bo and a shm source, do not fall all the way back
The normal source upload into GPU bo knows a few more tricks that we may
want to apply first before copying into the shadow of the GPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10 15:19:36 +00:00
Chris Wilson 8a8edfe407 sna: Make sure all outputs are disabled if no CompatOutput is defined
If we have to fallback and the configuration is wonky, make sure that
all known outputs are disabled as we takeover the console.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10 03:34:04 +00:00