Commit Graph

8165 Commits

Author SHA1 Message Date
Chris Wilson 97003b1a2d sna/gen6+: Prefer the BLT for large overlapping copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 13:52:41 +01:00
Chris Wilson 87fc78ac4f sna: Try to reuse the current cursor if we fail to update
As a last resort, continue to display the old cursor if we tried and
failed to create a new cursor.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 10:52:47 +01:00
Chris Wilson cd381ad96e xvmc: Refactor mutex locking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 09:31:50 +01:00
Chris Wilson bccfb768ee xvmc: Sanitize compile and library flags
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 09:19:31 +01:00
Chris Wilson 5a0cb1049c configure: Fix DRI2 build
One s/DRI2/have_dri2/ too far.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 09:19:31 +01:00
Chris Wilson d47a01fce4 sna: Reorder ignore_cpu_damage() to avoid asserts
Tricksy asserts making sure that the correct arguments are passed
around!

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 08:51:20 +01:00
Chris Wilson c4d4bd5d92 sna/gen8: Allow reads from scanout to be cached
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 08:32:34 +01:00
Chris Wilson 8e743ccef8 sna/gen8: Check for WT support before attempting to use the WT mocs
It appears the kernel has a better idea when WT is supported on which
gen8 parts. I assumed it was always supported, but experience suggests
otherwise, so only use WT support when advertised.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 08:27:05 +01:00
Chris Wilson 7bc669dd4b configure: Allow manual disabling of each DRI level
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13 07:48:15 +01:00
Chris Wilson ffe067705b sna: Try to use CPU uploads before BLT uploads
As the BLT upload implies a sync (and a likely GPU boost), only do so if
we cannot do an immediate upload with the CPU, either directly to
backing memory or through the GTT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-12 18:17:04 +01:00
Chris Wilson 93444ea673 sna: Refactor USE_INPLACE debug macro
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-12 09:26:14 +01:00
Chris Wilson abbf6d6b79 sna/gen8: Clear a couple more push constants
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 21:14:00 +01:00
Chris Wilson 7f9b015d87 sna: Remove bogus assertion
The sna_pixmap is cleared afterwards, it does not need to be clear on
free.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 19:10:22 +01:00
Chris Wilson e3a0e40310 sna: Fix direction flags for memmove
Under a compositor, the current deltas may invert the sense of the copy
direction, causing scrolling corruption. Simplify handling those flags
by making them invariant for the function.

Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79843
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 18:54:54 +01:00
Chris Wilson 55660376d5 sna: Use the pixmap header creation routine
A few more places could use the common pixmap creator, just remember to
handle the SHMPixmap complication!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 18:54:54 +01:00
Chris Wilson 1beaa980ea sna/gen6+: On small GT avoid the intermediate copy for overlaps
If the memory bw is constrained on the GPU avoid doing the 2-pass copy
for overlaps on the render ring, and do the single pass slower BLT copy
instead - as since it has to transfer less data it will be faster.

Reported-by: Ildar Nurislamov <absorbb@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 16:57:14 +01:00
Chris Wilson 31467b01e3 sna/gen6+: Overlapping bo by definition have compatible depths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 16:21:13 +01:00
Chris Wilson 0dfe7d93de sna: First copy to overlap temporary must be using GXcopy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 16:12:26 +01:00
Chris Wilson ad076b3940 sna: Remove debugging hunk
Stray hunk in self-copy boxes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 15:49:43 +01:00
Chris Wilson a90160dcec sna: Update damage pointer after the implicit reduction
sna_damage_contains_box() routine implicitly reduces the damage before
performing its check. This may alter and even destroy the damage entry,
so pass in the handle so that it can be updated correctly.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 15:43:06 +01:00
Chris Wilson c9003c6d96 sna: Fix scanout creation routine for old kernels <= 3.11
With an old kernel, we would fail to actually mark the display as part
of the scanout domain, but proceed to assign it a fb id. This caused our
asserts to report our bookkeeping error.

Reported-by: Pavel Ondračka <pavel.ondracka@email.cz>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79909
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 15:43:01 +01:00
Chris Wilson 5705e66a32 sna: Add some DBG to the memmove path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 15:29:56 +01:00
Chris Wilson b41a51e0f5 sna: Tweak self-copy boxes to hit the GPU more often
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 14:22:26 +01:00
Chris Wilson b879de6246 sna: Recheck source bo after migrating dst (in case of src == dst)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 14:08:31 +01:00
Chris Wilson 21c150a873 sna: Skip redundant clears
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 14:02:54 +01:00
Chris Wilson e1a4438f07 sna/glyphs: Always print some DBG when performing fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 13:59:46 +01:00
Chris Wilson 040eccb9b1 sna: Add some asserts to track redundant damage operations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 13:18:33 +01:00
Chris Wilson 4fccfe3a51 sna/gen8: Check offset alignment before using a userptr for RENDER
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79053
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:27 +01:00
Chris Wilson 1217dbc88e sna: Support efficient cursor updates for old machines
Given a kernel patch to fix coherency of physical objects, we can use a
more efficient method for updating cursors.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:27 +01:00
Chris Wilson ee7d2e0a8e sna: MST topologies may change on any hotplug event
As the kernel does not send out an explicit DISCOVER event, we have to
reinspect every connector after every hotplug event to detect topology
changes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:27 +01:00
Chris Wilson 782c920b01 sna: Create a stable output name based on MST topology
In order to provide persistent names for MST devices, which may change
topology dynamically, the kernel exports a PATH blob. We can then use
this path to generate the output name, and so reuse existing XID when a
monitor is plugged back in.

Based on the patch for -modesetting by Dave Airlie.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:27 +01:00
Chris Wilson e680e54eab sna: Ignore setting read-only for temporary userptr maps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:27 +01:00
Chris Wilson d9bf6f3fec sna: Prefer to operate inplace on the GPU rather than stall on the CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:16 +01:00
Chris Wilson 277e6ab84b sna: Discard TearFree damage before checking for an overwriting upload
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:05:07 +01:00
Chris Wilson eb9de37daa sna: Silence compiler warnings for discarding const Region points
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:02:05 +01:00
Chris Wilson 085141348c sna: Squelch log messages for fb/pixmap tiling in the default case
The output is confusing, so hide it unless it is modified by the user.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 11:02:05 +01:00
Chris Wilson 53c1faa509 sna: Mark the GPU as all damaged when discarding CPU bo during uploads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11 08:07:42 +01:00
Chris Wilson e2bfa715a9 sna/dri2: Check that the window covers the whole CRTC before xchg
Fixes TearFre regression from

commit 3932e97057 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 9 08:58:15 2014 +0100

    sna/dri2: Allow TearFree flipping to individual CRTC

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 21:31:05 +01:00
Chris Wilson d0f32a9d3a sna: Cast away compiler warning
sna_display.c: In function 'has_user_backlight_override':
sna_display.c:595:3: warning: return discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 21:31:05 +01:00
Chris Wilson 216beed6df sna: Expand debugging to cover gen8 BLT variations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 21:31:05 +01:00
Chris Wilson f19195f7ea sna: Fix arguments when flipping transformed TearFree outputs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 14:39:10 +01:00
Chris Wilson c16b2a1259 sna: Tidy a few asserts on the state of crtc->flip_bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 14:39:10 +01:00
Chris Wilson fd6aaec33d sna: Handle the user passing "Backlight" ""
Allow the user to disable the backlight control by passing the empty
string in the xorg.conf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 11:04:33 +01:00
Chris Wilson cb7b27a705 2.99.912 snapshot 2014-06-10 08:54:18 +01:00
Chris Wilson 52e2aa0939 sna: Queue a flip after fixing up a failed flip
After a flip fails, we try to update the CRTC manually to new fb.
However, the caller is still expecting to receive an event though the
drm device to notify when the flips are complete. In order to maintain
that ABI, we need to queue another flip after the fixup (to the
currently bound fb).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10 08:52:09 +01:00
Chris Wilson 68ac3039e4 sna: Fix the typo in the last commit
Rewording the sentence and reordering the arguments was a mistake!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09 22:02:06 +01:00
Chris Wilson fdb8f49044 sna: Add an extra error message before disabling a CRTC
One of the error paths to disable a pipe was lacking a log message.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09 21:47:24 +01:00
Chris Wilson c1154ae107 configure: Allow disabling control over the backlight
Some OS prefer to control the backlight themselves through another
daemon and so do not want X interfering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09 21:47:24 +01:00
Chris Wilson bb2d5e3696 sna: Defer the copy back from the shadow CRTC bo until we allocate the target
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09 16:39:02 +01:00
Chris Wilson b00a60b417 sna: Fix cut'n'paste DBG error
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09 16:39:02 +01:00