Commit Graph

4382 Commits

Author SHA1 Message Date
Zhigang Gong f4ea732d71 uxa/glamor: Let glamor do the GC validation
If we are using GLAMOR, then a tile pixmap or stipple pixmap
may be pure glamor pixmap and thus UXA will not know how to
render to them, and we need to let glamor do the validation.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:04 +00:00
Zhigang Gong e8aa9cedbf uxa/glamor: Remove extraneous flush
When glamor is enabled, a pixmap will not be accessed by UXA's
accelerated functions. Only unaccelerated functions may access those
pixmaps, and before each unaccelerated rendering, it calls
uxa_prepare_access which will do a glFlush. Combined with a flush before
sending to DRI clients, we no longer need to flush after every
operation.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Zhigang Gong 4ca94ed91f uxa/glamor: Remove dead code.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 5576afc7d1 sna: Inline checks for over-sized buffers during pixmap creation
Make the tests for acceptable GPU pixmaps explicit and upfront.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson b2dc17678f sna: Always search for an exact active match first from the bo-cache
And accept second-best only if permitted by flags.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson caf41ae23d sna: Force tiling on medium pitches if not reduced for other reasons
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 1b688ca0cf sna: Delete the last buffer if destroyed without being used on the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 4a68e72771 sna/gen3: Prefer to use the blitter for solid fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 199e357dc6 sna/trapezoids: Pass the sna pointer to the callees
Avoid the repeated multiple indirect dereferences.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson bd7aa1754d sna: Avoid unnecessary call overhead for read-only move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 294c8791c4 sna: Use a cheaper no-reduction damage check for simply discarding further damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 7ff42e9c83 sna/damage: Mark the box as packed so that the embedded_box is aligned correctly
valgrind was complaining about an overlapping memcpy on a 64-bit
platform as gcc padded the sna_damage_box to 28 bytes...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 4652a20de5 sna/gen3: Check for a non-NULL bo before incrementing its ref in reuse_source()
For gen3, we may reduce a source into a constant operator and so
dispense with keeping a bo. When duplicated into the mask channel, we
then need to be careful not to dereference the NULL pointer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-03 21:35:03 +00:00
Chris Wilson 777fcc9b11 sna: Prefer not to force the creation of gpu bo for pixmap uploads
As this causes a significant regression when benchmarking firefox on SNB
with firefox-planet-gnome if we already have CPU buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-01 18:45:53 +00:00
Chris Wilson 1a6c16a24c sna: Keep a freelist of buffers
As reallocation of bo is the most frequent cause of malloc/free.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-01 15:24:46 +00:00
Chris Wilson f008a2a90c sna: Tune blt routine
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-01 15:24:46 +00:00
Chris Wilson b57c7248ac sna: Delete some redundant code
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-01 15:24:45 +00:00
Chris Wilson 83d16455b7 sna: Eliminate one union pass when reducing damage-add
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-01 15:24:45 +00:00
Chris Wilson 2f5b769e71 sna: Move some checks against programming errors to asserts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-01 10:12:59 +00:00
Chris Wilson 24bf59c43f Revert "sna: Increase the minimum alignment constraint for g33"
This reverts commit 2934e778f0. The actual
cause of the bug I was seeing on my PNV box turned out to be
a1f585a3d0, so time to reinvestigate the alignment issues.
2011-12-31 18:57:57 +00:00
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 a5583165da uxa: Remove concept of global FB ownership made obsolete by GEM and KMS
With the introduction of GEM, we can continue to submit batch buffers
irrespective of ownership of the console, so do so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-28 13:57:09 +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