Commit Graph

9028 Commits

Author SHA1 Message Date
Chris Wilson 15354751b7 tools/intel-virtual-output: Update DBG comment to include DRI3 transport
The Pixmap may either be being used for DRI3 or SHM transport.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-09 10:40:59 +01:00
Chris Wilson fad92cec33 sna/present: Free Timer when converting to vblank event
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 18:48:52 +01:00
Chris Wilson c47fd1dcad test/present: Synchronize MSC notifiy modulus test to the vblank
As the test presumes we can queue all the modulus queries within the
same vblank, we can improve matters by synchronizing to the next vblank
first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 14:02:41 +01:00
Chris Wilson e74ff58144 sna: Force the TearFree redisplay when populating a rotated configuration
We have to disable the "shadow idle; skipping" test if the CRTCs are
showing stale content following a sna_crtc_attach().

Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89904
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 13:58:35 +01:00
Chris Wilson a00ed98131 test/present-speed: Disable idle event reporting for no-copy overhead test
Reduce the overheads in the server for better measurements.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 11:39:49 +01:00
Chris Wilson c2da68871a sna: Clear the new scanout along all paths before attaching
Make sure we clear the scanout even after the error paths before
attaching the shadow buffer (in case it is full of unwanted junk).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 09:52:59 +01:00
Chris Wilson d348f897c8 test/present: Expland MSC accuracy test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 21:33:40 +01:00
Chris Wilson 6de85a1e60 test/present: Include composite redirected windows in the test matrix
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 21:13:38 +01:00
Chris Wilson 56801202de sna/present: Use a vblank wait to fix up a timer firing too early
In cases of stress, we use a timer to create a fake vblank event and
then we adjust the timer when it fires to match it up with the CRTC msc.
However, sometimes we fire before the vblank but less than a millisecond
and so below the precision of the timer causing us to send notifies too
early. Use a blocking vblank wait to fixup these rare cases.

Testcase: present/notify/accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 19:44:50 +01:00
Chris Wilson 990ca393fd test/present-speed: Reneable normal testing
Oops, debug leftover.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 17:13:54 +01:00
Chris Wilson f4588b64e2 test/present-speed: Export the pixmap over DRI3
Improve the DRI3 simulation by exporting the Pixmap to force DRI3
syncflushes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 17:03:02 +01:00
Chris Wilson be0fc3ce20 sna: Block signals while releasing cursor under modeset
Otherwise we may process a SIGIO moving the cursor away from the CRTC
causing us to remove the cursor and then process a stale pointer inside
the modeset after the signal is complete.

Reported-by: Chris Bainbrigde <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 15:49:45 +01:00
Chris Wilson af2da32574 test/present-speed: More measurement for different swap methods
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 10:52:21 +01:00
Chris Wilson fd12095f89 test/present: Also test swaps on windows (as well as full screen flips)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 10:52:21 +01:00
Chris Wilson 7cf670228e sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.

v2:

commit 226a58bc59
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Apr 4 20:58:24 2015 +0100

    sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it

Tried to fix it by disabling SourceValidate. However, it a direct hook
into the Damage code by miSprite that triggers the copy. Since there
appears to be no way to intervene, we just mark that copy as internal
and ignore it.

Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 11:00:25 +01:00
Chris Wilson 209d120dbf sna: Initialise hwcursor to true
So we don't disable the hwcursor when we have a rotation set but not all
pipes activated.

Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 09:56:08 +01:00
Chris Wilson 226a58bc59 sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.

Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-04 20:58:24 +01:00
Chris Wilson 108a09e3db sna: Add DBG for why we fallback to sw cursor
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-04 20:11:24 +01:00
Chris Wilson 61da72c076 test/present-speed: More buffers required to hit maximal framerates
5 buffers are required for swap elision, plus an extra or two for IPC
scheduling jitter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-04 19:38:49 +01:00
Chris Wilson ea545e05ec sna: Rewrite swizzling funcs using macros
Save a little space at the expense of a little readibility.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-03 14:37:50 +01:00
Chris Wilson de61dae3bb sna: Implement missing 9^10^11 swizzle mode
As found on my gm45...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-03 11:11:09 +01:00
Chris Wilson 8d85793b08 configure: Replace hardcoded pkg-config --exists with PKG_CHECK_EXISTS
Suggested by Emil Velikov:

	Normally hard coding pkg-config is considered a bad idea. Please
 	try PKG_CHECK_EXISTS - it would work like a charm when
	cross-compiling.

	Cheers
	Emil

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-03 00:01:31 +01:00
Chris Wilson 459efa036e test/dri2: Reset swap-interval after testing async swapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 22:50:54 +01:00
Chris Wilson 3c3f7d7df4 test/dri2: Check vblank waits
Make sure that waiting 60 times for a vblank, 60 msc pass

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 22:50:19 +01:00
Chris Wilson ef8f5236f2 sna/dri2: Fix multimonitor swap elision
We were not updating the window->crtc for the immediate swaps with the
result that after switching CRTCs, we were requesting a vblank on the
wrong pipe and triggering an error path (forcing the blit and negating
the elision).

Testcase: test/dri2-speed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 17:19:32 +01:00
Chris Wilson 0814dc41c3 test/present-speed: Include a measure for fence signalling overhead
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 15:13:43 +01:00
Chris Wilson f63f739fec sna: Do not call an extra busy ioctl for scanout flushs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 08:55:19 +01:00
Chris Wilson e47eb0c5e5 sna: Don't unroll BLT points
The compiler is smarter than I am; unrolling hurts here.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 23:13:29 +01:00
Chris Wilson 7df58456b8 sna: Add DBG option to disable manual detiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 23:13:29 +01:00
Chris Wilson b56b63bf93 sna: Relax a y-tiling fb assertion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 23:13:29 +01:00
Chris Wilson f00599f971 sna/dri: Avoid using the BLT for DRI2CopyRegion if no semaphores
We expect mesa nowadays to preferentially use the render pipeline for
doing its clears and so want to avoid handing it back an active BLT bo
if we don't have semaphores (as that would cause a sync).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 23:13:29 +01:00
Chris Wilson 61d2baa430 configure: Make tools/PROGRAMS agnostic to tools presence
In order to make tools indivdiually selectable for compiling, we don't
want to override earlier tools - so use '+=' rather than a plain '='
when adding each tool to the set of PROGRAMS.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 15:55:11 +01:00
Chris Wilson cdac2b369a sna: Relax unclean rules to check busyness on all foreign pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 15:55:11 +01:00
Chris Wilson 35537ec4bf sna/present: flush is not required
present.flush is called on the Window after a copy from a Pixmap is
completed - which will be naturally flushed anyway. What the API should
be passing is the Pixmap, since we do want to flush the operations from
it before sending the idle event. C'est la vie.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 15:55:11 +01:00
Chris Wilson 2f047c6278 tools/dri3info: Query refresh rate on Primary monitor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 12:55:44 +01:00
Chris Wilson 745c21fb1a sna: Fixup inverted logic for new bo
We only want to inspect the busy status of bo we have not yet added to
our execbuffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01 00:34:00 +01:00
Chris Wilson 61f8dcdfa5 sna: Consider idleness of both rings if we need a semaphore
When emitting batches early for improved GPU/CPU concurrency, we only
want to do so if the target ring is not busy. However, if the batch
requires a semaphore, we also need to consider the other ring as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 23:09:43 +01:00
Chris Wilson 56f9d2c1d9 sna: Flush BLT operations to an idle GPU
We improve dispatch latency if after creating a command buffer we
immediately submit if the GPU is idle. This improves concurrency as we
continue to build the next command buffer as the GPU executes and helps
prevent needlessly using one engine for too long (i.e. sometimes we may
be able to execute the work much early and do the ring switch cheaply).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 23:09:43 +01:00
Chris Wilson 68632e1000 sna: Use more explicit retire-requests after syncing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 23:09:43 +01:00
Chris Wilson 8b358076f2 sna: Query the engine residency on foreign bo before use
Since knowing which ring the bo is currently active on is important when
considering the impact of semaphores on the next operation, be sure to
query it on foreign bo before we use them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 23:09:38 +01:00
Chris Wilson ef24cb1b22 sna/gen6+: Prefer the BLT for small copies
Even on GT3, it is preferrential to use the blitter if the copy is small
(due to the latency in execution).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 22:44:21 +01:00
Chris Wilson 5a872056de sna/gen6+: Prefer the BLT for small self-copies
Even on GT3, it is preferrential to use the blitter if the copy is small
(due to the latency in execution).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 22:32:25 +01:00
Chris Wilson 1be5b71582 Add TILE property support (for MST tiled monitors)
Based on the patch for modesetting (and lots of work) by Dave Airlie

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-31 22:31:06 +01:00
Chris Wilson 8dc716e866 sna: Limit the last gasp execbuf try to ENOSPC
Disabling the outputs and trying again can only possibly help in the
case of fragmentation. In all other failures modes (typically GPU hang)
it just causes a slow flash of the display.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-29 13:17:34 +01:00
Chris Wilson c05c6abd08 sna: Mask the batch length
It's white lie that only is technically required for gen2, and works
around a massive performance hit on gen7.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-28 23:59:56 +00:00
Chris Wilson dbdcae9f8a sna: Refresh properties even if we skip the detection probe
Properties may refresh quickly, more often than the output status
changes. We want to query the properties without doing a forced probe,
so make sure we refresh the values if the user requests a property.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-25 20:44:01 +00:00
Chris Wilson 8f11f2bdcd Use AC_FUNC_ALLOC
The preferred all-inclusive method for finding alloca().

Reported-by: Richard Palo <richard@netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89762
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-25 14:20:43 +00:00
Chris Wilson aa40f99014 Use AC_HEADER_MAJOR to find how to include major()
We need to include <sys/mkdev.h> on Solaris.

Reported-by: Richard Palo <richard@netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89763
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-25 14:14:30 +00:00
Chris Wilson d85e68e2d3 sna: Add include <alloca.h> for compiling on Solaris
Reported-by: Richard Palo <richard@netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89762
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-25 13:16:56 +00:00
Chris Wilson d377fd3d11 sna: Detect Y-tiled scanout feature
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-24 21:05:58 +00:00