Commit Graph

6501 Commits

Author SHA1 Message Date
Chris Wilson f2a64dbdfc sna: Avoid stalling on a SHM upload when otherwise idle
Fixes regresion from

commit 09ea1f4402
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jan 10 16:26:24 2013 +0000

    sna: Prefer to use the GPU for copies from SHM onto tiled destinations

As the stalls on IVB 64-bit machines at least greatly offset the
benefits. As those earlier measurements were made on the same IVB
machine but running in 32-bit mode, I need to double-check whether or
not this is another 32-bit peculiarity.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13 17:17:15 +00:00
Chris Wilson 4bf51ec7bc Revert "sna: Avoid promoting SHM CPU bo to GPU to maintain coherence with SHM clients"
This reverts commit f743cd5734.
2013-02-13 16:32:18 +00:00
Chris Wilson 9861423a76 sna/dri: Fix typo limiting gen4 to TILING_X depth buffers
Fixes regression from

commit 98b312e579
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jan 23 20:51:35 2013 +0000

    sna/dri: Stop feeding I915_TILING_Y to mesa i915c

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60178
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13 15:11:45 +00:00
Chris Wilson 38a3506aa1 sna: Handle scanouts still active at the time of destruction
Basically remove the bogus assert, and reorder the list to
preferentially reuse the still active scanouts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13 14:09:38 +00:00
Chris Wilson 3b82d93162 sna/dri: Validate that the scanout flag is set
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12 21:53:38 +00:00
Chris Wilson 04e4805f57 sna: Prefer inplace readback if the GPU doesn't support cacheable BLTs
As we must perform the GTT reads anyway, first see if we can copy
directly to the destination.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12 21:52:35 +00:00
Chris Wilson 2c569d22d2 sna: Only use the inplace read fallback if we have no CPU bo support
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12 20:15:33 +00:00
Chris Wilson aeaed0b781 sna/dri: Assert that we are not passed deceased DRI2Buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12 19:37:02 +00:00
Chris Wilson 5fb165b02d sna/dri: Assert that the old scanout is clear before overwriting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 22:15:17 +00:00
Chris Wilson 2667b821e1 sna/dri: Update flush status for tear-free exported GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 22:09:22 +00:00
Chris Wilson a4442045df sna/dri: Harden the replacement of the back buffer against alloc failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 21:47:30 +00:00
Chris Wilson 75406775b8 NEWS: Fix marketing name for 945gm
The GMA3100 was the desktop G31/G33 which whilst almost identical to the
GMA950, notably does not require the extra unfenced alignment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 13:00:13 +00:00
Chris Wilson 0b116a1d02 sna: Fix inaccurate use of __attribute__((const))
'const' is only allowed to use the function parameters and not allowed
to access global memory - that includes not allowed to deference its
arguments...

Thanks to Jiri Slaby for spotting my mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 12:40:08 +00:00
Chris Wilson 47657e5355 sna/dri: Ignore a compiler barf breaking an assertion
Manual confirmation with gdb says all is fine and things work again
after printing the variables responsible. The curious reader is welcome
to read the disassembly to find where the compiler goofed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 12:31:18 +00:00
Chris Wilson 3540554e5a sna/dri: Couple up the flush pixmap after checking for allocation failures
Tidy up the error path not to leave the GPU bo pinned and marked for
flushing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 11:17:05 +00:00
Chris Wilson 58b61bcd02 sna/dri: Tighten the assertions that we have one DRI2Buffer per Pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 11:17:05 +00:00
Chris Wilson a13f806ae2 sna: Assert that we do not destroy a GPU bo for an active DRI pixmap
This is an extra paranoid check that the bo is still pinned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 10:50:49 +00:00
Chris Wilson c2eb2db832 sna: Avoid stalling for changing cache levels on an active scanout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 10:47:13 +00:00
Chris Wilson 696347a626 sna/dri: Only clear the GPU bo flush flag when the last export is destroyed
Add various assertions around DRI to be sure that we don't change the
GPU bo for a pixmap that does not match our flush bookkeeping. Then be
more careful during the DRI2Buffer destroy that we don't accidentally
remove the flush flag from a shared bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-11 09:58:58 +00:00
Chris Wilson 301aebfa71 configure: Add -lX11 required to link the legacy libI810XvMC.so
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10 18:04:51 +00:00
Chris Wilson 65c320e677 2.21.2 release 2013-02-10 16:10:08 +00:00
Chris Wilson 0d75b19979 sna: Restore glyphs with xorg-1.12
That simple and innocuous build fix for xorg-1.13 bizarrely causes
missing glyphs with earlier Xorgs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10 16:02:38 +00:00
Chris Wilson 9fd0d8873a NEWS: fix bug url
The dangers of cutting and pasting from git log.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10 14:29:29 +00:00
Chris Wilson 617fadf3ac 2.21.1 release 2013-02-10 14:20:59 +00:00
Chris Wilson 3169a4e53c sna: Reorder some includes so that compat-api.h comes after the headers it wraps
Fixes the build in cases where the compat-api.h was defining macros to
subvert the real functions found in the xorg includes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10 11:57:14 +00:00
Chris Wilson 71fbad64c5 configure: Fix typo in checking for libdrm_intel
The package name is libdrm_intel not libdrm_intel-1, an obvious
cut'n'paste error from testing for pixman-1.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10 10:54:17 +00:00
Chris Wilson 3cbdfb54d1 sna: Backport to squeeze - Xorg-1.6, pixman-0.16, libdrm-2.4.21
The principle change is to switch to the old Privates API and undo the
Region renames.

The downside is that this ignores the critical bugfixes made to the
xserver since xorg-1.6 - but I assume that whoever wants to run the
latest hardware on the old xservers is also backporting those stability
fixes...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10 10:24:12 +00:00
Chris Wilson 42a6b25817 sna: Fix alignment of the base of partial buffers for pre-G33 chipsets
The older chipsets have much more restrictive alignment rules for the
base address of tiled but unfenced objects.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1120108
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-09 15:33:10 +00:00
Chris Wilson 80044e5463 sna: Promote to GPU is only partially damaged on the CPU but busy on the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-09 09:57:26 +00:00
Chris Wilson d18cb72a94 sna: Randomly perturb 'wedged' to hunt for faults
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08 23:08:34 +00:00
Chris Wilson ce9f044836 sna/gen6: Use GT2 settings for both GT2 and GT2+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08 16:01:54 +00:00
Chris Wilson ae5399aaf9 sna: Force the fallback path for unaccelerated randr damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08 11:31:21 +00:00
Chris Wilson c69b4389ab sna/gen4: Split the have_render flag in separate prefer_gpu hints
The idea is to implement more fine-grained checks as we may want
different heuristics for desktops with GT1s than for mobile GT2s, etc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08 11:23:02 +00:00
Chris Wilson bec99de812 sna: Remove the bogus assertions on buffer domains
Just a few lines earlier we already have the correct assertion that the
buffer was not in the GPU domain, so had these two been correct, they
would have still been redundant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08 00:57:45 +00:00
Chris Wilson 8d1d3c6e61 sna: Fixup an invalid assertion
We may choose to operate inplace on a buffer last used by the CPU if we
are discarding all the existing damage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 14:47:57 +00:00
Chris Wilson c405dba367 sna: Also assert that the GPU is not wedged before continuing a batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 13:42:08 +00:00
Chris Wilson feeff6fcef sna: Force GTT readback if the GPU is wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 13:36:03 +00:00
Chris Wilson 8a272971d5 sna: Allow inplace uploads to utilise GTT on LLC machines
Rather than arbitrarily disable the fallback paths for LLC, allow it to
utilise any available GTT buffers for inplace uploads. The best
explanation so far is that with the streaming is that we are trashing
the LLC. On other machines, the difference is in the noise.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 12:04:35 +00:00
Chris Wilson bc8a2c30c4 sna: Only try the SRC fixup into the buffer if it is CPU mapped
On one particular machine, this operation is behaving as if it is
reading back UC memory during the explicit write-only composite.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 10:45:29 +00:00
Chris Wilson 889ed28f52 sna: Correctly align used buffers to the following page boundary
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-07 10:45:29 +00:00
Chris Wilson 974b6a97d7 sna: Fallback to non-LLC paths after an allocation failure for an LLC buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson 5c8084ef04 intel: Becareful not to match UMS against future generations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson be241fb25e sna: Free the handle after pwrite buffer allocation failure
Having just allocated the handle, we need to free it if we then fail to
allocate memory for the buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson 4b3b25f0be sna: Flush our caches if we fail to mmap an object
The likely cause for a mmap failure is that we hold too many objects
open or have exhausted our address space. In both cases, we need to trim
our caches before continuing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson daba1ae3e7 sna: Correctly handle failure to CPU map a new allocation
If we fail to CPU map, we want to fallback to just using pwrite with
normal memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson 0adb0b5e1e sna: Handle mapped buffer allocation failure for LLC
The presumption was that if we had LLC we would have allocated the
buffer by that point - however, it was remotely possible to have fallen
through and so we need to handle those cases.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 17:23:51 +00:00
Chris Wilson f4cff22afa sna: Relax the buffer size assertion to only be larger than required
Not all paths request alloc pages, a few just request sufficient pages
for the original size. So we can only assert that condition is
satisfied.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 15:35:57 +00:00
Chris Wilson 8bc593c732 sna: Make sure we always replace io buffers before inserting into the cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 15:35:57 +00:00
Chris Wilson 5f72158919 configure: XvMC support is optional, so make failure to find xcb non-fatal 2013-02-06 15:10:23 +00:00
Chris Wilson cd6d8f9b9d xvmc: Add the complementary XCB_CFLAGS
After splitting the xvmc dependences into xcb and non-xcb, we then also
have to add the xcb CFLAGS to build libIntelXVmc.la

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-06 10:37:50 +00:00