Chris Wilson
770a953ff0
uxa/video: Clear all state structures before uploading
...
A regression from eb859f6446 left some of the state uninitialised
before uploading to the GPU leading to undefined behaviour.
Reported-by: Alexey Shumitsky <alexey.shumitsky@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44338
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44252
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 17:22:29 +00:00
Chris Wilson
f1995c684d
uxa: the video destination should be in the render write domain
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 16:26:39 +00:00
Chris Wilson
511146d2e4
sna: Implement inplace trapezoidal addition (for clipmasks)
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:18 +00:00
Chris Wilson
a1f585a3d0
sna: Update pixmap->devKind for GTT mappings
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:18 +00:00
Chris Wilson
343de19ef9
sna: Implement tiled uploads for small stipples larger than patterns
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:18 +00:00
Chris Wilson
fb15cf2294
sna: Make sure the shadow pixmap is suitable for scanout
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:18 +00:00
Chris Wilson
281425551b
sna: Tweak throttling to be run before going idle
...
The goal is to avoid introducing extra latency in the middle of a
command sequence and to delay it until we have to wait for the clients.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:17 +00:00
Chris Wilson
2f5448f132
sna: compare tiling against minimum width for relevancy
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:17 +00:00
Chris Wilson
e82b3d8069
sna: Defer the initial source upload if the GPU bo will be untiled
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-31 15:36:17 +00:00
Chris Wilson
72624b0b5b
sna: Remove redundant use-gpu-bo clause
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-30 08:24:41 +00:00
Chris Wilson
6dc9bbc016
sna: Fix DBG for no intersection with damage
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 22:52:03 +00:00
Chris Wilson
0dc5c0651c
sna: Tune disarming of the scanout flush timer
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 13:49:23 +00:00
Chris Wilson
ccd895c61d
sna: Allow uploading inplace to a freshly created GPU bo
...
If the operation is favoured to be performed using a WC upload, presume
that we will use the uploaded pixmap on the GPU and so prefer to create
a GPU buffer to hold the fresh data.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 12:23:17 +00:00
Chris Wilson
f85a853455
sna: Only update the damage region as necesary for contains-box
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 11:59:57 +00:00
Chris Wilson
f53936407b
sna: Reset the source counter upon dirtying the shadow pixmap
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 11:59:37 +00:00
Chris Wilson
c9f7f10bc5
sna: Be paranoid and check for errors from mmapping the bo
...
Now that the error propagation is actually in place, we may as well use
it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 09:03:21 +00:00
Chris Wilson
98e053503a
uxa: Depend upon DRI2 not DRI
...
The symbols required for building intel_dri.c are checked during
configure under the DRI2 defines.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-29 08:50:53 +00:00
Chris Wilson
58cee9d0de
sna/dri: Update set_bo() for change of bo ownership transfer during page-flip
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 23:18:31 +00:00
Chris Wilson
f9ee02be26
sna: Fix debug message for read-boxes
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 22:52:44 +00:00
Chris Wilson
698bd43e0f
sna: Do not create glyph caches if the gpu is wedged
...
As these will only be created in normal memory and never used.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 21:45:12 +00:00
Chris Wilson
78425a1559
sna: Refactor common code for testing gpu busyness of a pixmap
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 21:38:11 +00:00
Chris Wilson
9105b7e03a
sna: Perform clip mask compositing inplace
...
Avoid the extra composite-in pass for simple clipmask construction.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 15:20:10 +00:00
Chris Wilson
337635ab97
sna: Add some more debugging to find the source of a read-boxes error
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 10:56:57 +00:00
Chris Wilson
3bf81241cb
sna: Skip zero-sized glyphs
...
Similar to the empty glyphs make sure that we just advance by the
character width without drawing anything.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-27 17:09:59 +00:00
Chris Wilson
8fc21328a0
sna: Don't discard empty glyphs, just skip them
...
A space is encoded as a 1x1 blank glyph, but we still need to advance by
its character width and so we cannot simply discard the glyph.
References: https://bugs.freedesktop.org/show_bug.cgi?id=44091id=44091
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-27 15:33:51 +00:00
Chris Wilson
726290ea2a
sna: Rearrange damage for tail-call optimisations
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-27 13:16:34 +00:00
Chris Wilson
04396b6e50
sna: Don't force the creation of a GPU bo if it will be untiled
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-27 09:58:40 +00:00
Chris Wilson
655a96cd5f
sna: Mark the glyph cache as being unpageable
...
In order to prevent it falling foul of the inactive pixmap reaper, we
need to mark the pixmap as pinned.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-26 14:37:37 +00:00
Chris Wilson
2934e778f0
sna: Increase the minimum alignment constraint for g33
...
Still not getting the single-stream mode that I am aiming for!
Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44150
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-26 11:30:39 +00:00
Chris Wilson
f7593a995a
sna: Move the is-mappable check into the callers of region_inplace()
...
As they slightly differ in their requirements.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-25 11:20:40 +00:00
Chris Wilson
aff32e3e08
sna: Tweak damage not to reduce if it will not affect the outcome of reducing to all
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-25 00:36:33 +00:00
Chris Wilson
be21a09fef
sna: Only call move-to-gpu on scanout flush if we have cpu damage to move
...
Reduce the number of redundant calls.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-25 00:28:55 +00:00
Chris Wilson
7b69dc8809
sna: Inline the common portion of sna_get_pixel_from_rgba()
...
The function overhead completely dominates for the common case.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-25 00:21:21 +00:00
Chris Wilson
b117f65520
sna: Jump straight to the fallback copy routines if the dst is not attached
...
Marginally simplify the convoluted logic for choosing the most
appropriate path and help prevent further errors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 21:31:06 +00:00
Chris Wilson
72217790ee
sna: Use shadow if the GPU is busy or not immediately mappable
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 21:31:06 +00:00
Chris Wilson
0be136c21f
sna: use indirect uploads if the bo was last known to be unmappable
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 21:31:06 +00:00
Chris Wilson
e764a52ee8
sna: Encourage large operations to be migrated to the GPU
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 21:31:06 +00:00
Chris Wilson
f9f8535db6
sna: Fix damage reduction by adding new boxes to the tail of the box list
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 21:31:06 +00:00
Chris Wilson
f8c91f229a
sna: We can always compare the box to be subtracted against the dirty extents
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 12:17:53 +00:00
Chris Wilson
cc21d3fa04
sna/damage: Fix the is-contained test
...
It was a non-overlapping test which is almost the reverse of what was
intended.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 12:14:33 +00:00
Chris Wilson
b86e4f5929
sna: Check that the copy dst is attached before replacing damage
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 11:45:27 +00:00
Chris Wilson
3bcc9f08e1
sna: Create a GPU for a streaming write
...
If we are about to do a write-only drawing operation that will exceed
our cache, allocate a GPU bo and perform the operation inplace.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 10:08:06 +00:00
Chris Wilson
efc8d04fc1
sna: Promote an unattached pixmap to the GPU for inplace copies
...
If we would prefer to perform the copy on the GPU and if the pixmap is
virgin, create a GPU bo for the operation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 09:47:37 +00:00
Chris Wilson
8c0e7ff5ac
sna: Clear the CPU damage for other overwriting rectangular blits as well
...
And make the accessing of the sna_pixmap safe -- it may not even exist!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 09:47:36 +00:00
Chris Wilson
7f9ed3ca56
sna: reset the pixmap on the initial clear after being swapped out
...
Pixmaps are swapped out into the CPU after a period of inactivity. This
then prevents the core rendering routines from migrating the pixmap back
to the GPU until it gets used again on a Render path. However, we can
clear that CPU damage and enable migration before a number of key steps
in the expose process.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 09:15:08 +00:00
Chris Wilson
8c987b6ccf
sna: Cheaply reduce damage when subtracting and removing the entire damage
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 09:15:08 +00:00
Chris Wilson
098592ca5d
sna: Remove the independent tracking of elts from boxes
...
Following the switch to a global mode for damage, the elts array became
redundant and all that is required is the list of boxes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 02:59:21 +00:00
Chris Wilson
73df0c7ab7
sna: Tune region upload inplace threshold
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 02:50:47 +00:00
Chris Wilson
ef66c5b5ad
sna: Search the inactive VMA cache first for a linear mapping
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-24 01:09:56 +00:00
Chris Wilson
1cc07fa2d2
sna: Avoid forced creation of GPU bo for tiny operations and dirty pixmaps
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-23 22:11:19 +00:00