Commit Graph

8321 Commits

Author SHA1 Message Date
Chris Wilson e1c3e6ce79 sna: Add DBG breadcrumbs before flushes in BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 21:18:58 +01:00
Chris Wilson 43176b9bfa sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo
One day, we will move the width/height/bpp to the bo itself...

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 21:18:43 +01:00
Chris Wilson 6c3399715e sna/dri2: Apply the paraniod buffer clip in the correct coordinate system
We need to only clip to the extents of the copy in the buffer space -
which implies that we need to translate the region into that space before
doing the clip.

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 16:38:29 +01:00
Chris Wilson c25fa2216a sna: Tweak preference for small GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 15:44:04 +01:00
Chris Wilson 19a62e088f test/lowlevel-blt-bench: Update progress more frequently
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 15:43:57 +01:00
Chris Wilson fab3bc70a4 sna: Reduce assertion when using asynchronous CPU access
If we are not actually accessing the memory through the pointer, we do
not care if it not currently coherent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 11:05:33 +01:00
Chris Wilson ffe8bd4d6e sna: Silence snarky compliers
0 != (void *)0

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 10:55:20 +01:00
Chris Wilson 05f6183075 sna: Mollify assert to be consistent with the scanout flush
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 10:46:00 +01:00
Chris Wilson 2e0000688d test/lowlevel-blt-bench: Exercise masks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 09:37:07 +01:00
Chris Wilson 37ac34c4e4 test/lowlevel-blt-bench: Exercise SHM pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 09:37:06 +01:00
Chris Wilson 901d889dd7 intel-virtual-output: Remove one redundant cleanup on error
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 07:44:25 +01:00
Chris Wilson a8b0ba0ed5 intel-virtual-output: Cleanup singleton on failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 15:30:03 +01:00
Chris Wilson 8188966485 intel-virtual-output: Convert debugging messages to verbosity
Original patch by main.haarp:
"A verbose switch is quite useful for debugging, it shouldn't require
editing and recompilation to gain more useful output. I added it."

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80664
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 15:29:46 +01:00
Chris Wilson 665d012b8e sna: Ensure CPU bo is synchronized before writing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 15:21:51 +01:00
Chris Wilson 6b906ae742 sna: Update allocation of CPU bo to avoid creating active buffers
Since we now prefer CPU detiling, exactly when we want active/inactive
buffers is a little more complex - and we also need to take into account
when we want to use the CPU bo as a render target.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 07:15:20 +01:00
Chris Wilson b961d73233 sna: Sync CPU bo before writes
Fixes regression from

commit 961139f587 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 30 09:45:15 2014 +0100

    sna: Use manual detiling for downloads

Reported-by: Harald Judt <h.judt@gmx.at>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80560
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 07:13:48 +01:00
Chris Wilson 53ef9e762a sna: Only preferentially upload through the GTT for large transfers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 07:13:48 +01:00
Chris Wilson 0955f12ae0 sna: Prefer linear if below tile_width
Be stricter in order to allow greater use of CPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 3ef966f4c5 sna/io: Prefer CPU copies on LLC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 9fc052da5c sna: Don't discard damage for SHM pixmaps
We don't really want to rendering into SHM pixmaps except for copying
back due to the strict serialisation requirements.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 0f8b39d24f sna: Check for a mappable GPU bo before migrating damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson cfdaee4a7e sna: Skip adding damage if it is already contained
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 80752fb279 sna: Tidy calling memcpy_from_tiled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:04 +01:00
Chris Wilson 2a0176379f sna: Micro-optimise unswizzling tiling/detiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-28 14:18:23 +01:00
Chris Wilson 24cb50e53c sna/trapezoids: Handle mono traps just in case
I disabled a few paths and ended up in an assert that mono trapezoids
shouldn't get that far...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-28 07:07:40 +01:00
Chris Wilson 72c041e57b uxa: Update Screen Pixmap width/height first
Since commit dd6db82680 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 9 20:26:19 2014 +0100

    uxa: Add DRI3 and miSyncShm support

we verify that the attaching bo meets the constraints required for the
Pixmap. However, when updating the ScreenPixmap following a resize, we
did not update the Pixmap size until after we tried to update the bo,
resulting in a validation failure when shrinking the screen.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:29:17 +01:00
Chris Wilson 0584604b53 test: Expand number of sources for basic benchmarking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:14:09 +01:00
Chris Wilson edd2b78956 sna/dri2: DBG compile fixes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:00:03 +01:00
Chris Wilson a6ba93283b sna/glyphs: Add DBG option for glyph tolerance
And bump it to 3 so that glyph filtering doesn't force us to use the
mask too often.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 13:44:48 +01:00
Chris Wilson ee5c74deee sna/glyphs: Add DBG option for forcing glyphs-to-dst
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 13:40:58 +01:00
Chris Wilson 6ba4ee1fe8 sna: Check source bo is suitable for BLT before doing so
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 10:38:59 +01:00
Chris Wilson 157e22cb8e sna: Only reuse pinned batches for 830/845
Trying to fly too close to the sun. :(

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80558
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00
Chris Wilson f027b4f628 sna/dri2: Slightly improved DBG messages
Missing git add from

commit 2e8c09f3fe
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 25 22:19:23 2014 +0100

    sna/dri2: Hook into ClientGone callback to clear dangling references

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00
Chris Wilson 2ae5d7d941 sna: Tidy selection of a near-miss active buffer.
References: https://bugs.freedesktop.org/show_bug.cgi?id=80560
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00
Chris Wilson 8cad98eca6 sna: Fix userptr defines to match i915_drm.h
Now that we are starting to see userptr in the headers, we see that the
definitions slightly changed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 14:39:13 +01:00
Chris Wilson c5c7dd24a5 sna: Remove scare quotes from hotplug detection "enabled"
Tidy up the log message by improving its formatting, and making it more
accurate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 09:32:09 +01:00
Chris Wilson 2e8c09f3fe sna/dri2: Hook into ClientGone callback to clear dangling references
As the Window may exist for multiple Clients, we cannot rely on the
destruction of the Window decoupling all outstanding events and
preventing chasing a stale Client pointer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 08:28:53 +01:00
Chris Wilson 12a349974b sna: Make output destroy more defensive
We may never create the properties as it may be ignored or the
allocation may fail, so we need to be careful when freeing we do not
stumble over invalid pointers.

References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c28
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26 07:00:20 +01:00
Chris Wilson 2ec2164ba4 sna/dri2: Compile fixes for ancient Xorg
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 18:08:20 +01:00
Chris Wilson 258f8983da sna: Fix uninitialisable variable
sna_render.c: In function 'sna_render_picture_downsample':
sna_render.c:822: warning: 'priv' may be used uninitialized in this function

introduced in

commit ded05e8abb
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 23 22:15:56 2014 +0100

    sna: Allow scratch pixmap to allocate linear GPU bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 17:20:52 +01:00
Chris Wilson ca0d06add9 sna: Improve throttling during bo allocation
By controlling how long we may block during buffer allocation, we can
relax the throttle elsewhere to prevent render lag buildup.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 15:27:34 +01:00
Chris Wilson 5ad1661b87 sna: Only mark throttle as done after success
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 13:23:17 +01:00
Chris Wilson c3e4518e84 sna: Track desired flushes better after starting a new batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 11:51:12 +01:00
Chris Wilson 85bb55e4a6 intel: Fix weblinks (again)
Julien pointed out that I fail at checking links.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 11:45:55 +01:00
Chris Wilson ff31d49bfa intel: Fix weblinks
Matti reported a few outdated links to intellinuxgraphics.org, now
superseded by 01.org.

Reported-by: Matti Hämäläinen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 11:34:48 +01:00
Chris Wilson 8c1729aab6 sna: Tweak scanout flush
We now distinguish gpu_dirty whilst the bo is not flushed within a batch
and needs_flush for when it is dirty and still busy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 09:00:04 +01:00
Chris Wilson 26c4e850b8 sna: Throttle before doing a TearFree buffer replacement
If the client is rendering fast, he may be rendering too fast and
starting to build up a backlog.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 08:21:05 +01:00
Chris Wilson ea6b0bb8e1 sna: And fix the typo...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 08:05:22 +01:00
Chris Wilson 3f4da671b0 sna: Disable userptr for bdw
Something fishy is afoot. But let's kill this particularly worrisome
regression so that we can do a full round of testing.

References: https://bugs.freedesktop.org/show_bug.cgi?id=79053
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 08:03:10 +01:00
Chris Wilson 204ec74a61 sna: Check all connectors for reuse
Do not rely on the MST path being present to indicate a connector that
may be reused.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80355
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25 07:31:33 +01:00