Commit Graph

6772 Commits

Author SHA1 Message Date
Chris Wilson 0da5cc23b1 sna: Fix format specifier for mismatching int/long in DBG
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-06 16:43:24 +01:00
Chris Wilson 2770655371 2.21.9 release 2013-06-06 12:23:06 +01:00
Chris Wilson d3345cd269 sna: Only emit an error for terminal mmap failures
If we repeat the mmap, keep quiet. Only emit the ErrorF in case even the
repeated attempts to mmap the bo fail.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-06 12:23:06 +01:00
Chris Wilson 70fa080d02 sna: Include the GT details in the backend name for a chipset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-05 23:35:37 +01:00
Rodrigo Vivi 45c09bfe58 Add more correct names for Haswell.
As we find out more of the final product names for Haswell chipsets, we
need to update the user visible identification strings.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-05 23:34:28 +01:00
Chris Wilson a9f9fb8e44 sna/video: Fix redundant initialisation of video->clip
It will be created before use anyway, but this silences a compiler
warning.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-05 09:49:47 +01:00
Chris Wilson 5d0ae71f1d sna: Do not conflate ignoring an output with an allocation failure
If the user explicitly ignores an output through xorg.conf, then
xf86OutputCreate returns NULL. This is not to be confused with an
allocation error that also returns NULL. The latter is terminal, the
former is desired.

Fixes regression from commit a9acc8dbb4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu May 30 12:09:52 2013 +0100

    sna: Cleanup up error reporting after failure to init KMS interface

Reported-by: David Rosca <nowrep@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65381
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-05 09:19:39 +01:00
Chris Wilson 6dacaddb6a sna: Always populate the CPU features string
So that we don't print random contents of the stack on ancient 32-bit
CPUs with no extended instruction sets.

References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1186800
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-03 15:35:43 +01:00
Chris Wilson 8a88c01c37 sna: Make copying the glyph size more compact
The assembly was ugly with an unwarranted AGU stall.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-03 14:16:45 +01:00
Chris Wilson 66ad4d6f3c sna/dri: Undo any COW before performing a copy with DRI2CopyRegion
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65250
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-02 12:14:05 +01:00
Chris Wilson 9a8ff7861c sna: Add some more DBG hints to copy-on-write cloning
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-02 12:14:05 +01:00
Chris Wilson c4ad7b14ca sna: Prevent adding damage to an already all-damaged GPU bo
Keep the bookkeeping straight after propagating the source clear colour:
commit 810a0ce2f8 [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 10 12:02:10 2013 +0100

    sna: Propagate clear color when replacing by a CopyArea

Reported-by: Roman Jarosz <kedgedev@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-01 17:01:47 +01:00
Chris Wilson be84b69297 sna/dri: Reorder assert not to fail on a pageflip deferred to after a modeset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-01 16:52:26 +01:00
Chris Wilson 2e11b520bb sna: Compile fix for non-debug builds
sna_display.c: In function 'get_fb':
sna_display.c:181:3: warning: implicit declaration of function 'assert_scanout' [-Wimplicit-function-declaration]
sna_display.c:181:3: warning: nested extern declaration of 'assert_scanout' [-Wnested-externs]

* sigh

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-30 15:35:11 +01:00
Chris Wilson 3a9975729c sna: Restore GPU promotion for large fills
Fix another regression from
commit ef9dc6fae5 [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon May 20 11:08:51 2013 +0100

    sna: Undo a few more overwritten operations upon a bo

The REPLACES predicate was meant to complement the existing tests, not
be compulsory.

Found whilst investigating why performance seemed to have dropped off in
Phoronix's benchmarks.

Reported-by: Michael Larabel <michael@phoronix.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-30 15:06:42 +01:00
Chris Wilson 08b33ba8f1 sna: Assert that an existing scanout is the desired size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-30 15:06:42 +01:00
Chris Wilson a9acc8dbb4 sna: Cleanup up error reporting after failure to init KMS interface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-30 13:08:10 +01:00
Chris Wilson f4fcb0e7d2 sna: Report allocations failures during Screen initialisation
Just abort instead of trying to limp on if we fail to even allocate
memory during initialisation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-30 13:08:10 +01:00
Chris Wilson 7f7c8087db sna: Log which outputs are being configured during a modeset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-29 12:29:40 +01:00
Daniel Vetter fc1e0702b2 sna: fixup up possible_clones kms->X impedance mismatch
We need to be a notch more careful with remapping the possible clones
mask from the kernel:
- SDVO and Haswell DDI have multiple connectors mapping to the same encoder.
- The connector list can be reordered compared to the encoder list.
  This is used to move eDP/LVDS to the front.

Also add even more debug output.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-29 12:29:40 +01:00
Chris Wilson b7aa05e44b sna: Sanity check that CRTC / output combination is valid
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-29 09:53:09 +01:00
Chris Wilson b507796679 Add the known marketing names for the performance Haswell parts
Start filling in the names for the parts that have been announced, the
Iris branded Haswell GT3 parts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-28 23:16:31 +01:00
Chris Wilson b3169768dd sna: Make the backend identifier more informative
This is useful, for example, with the multiple gen7 variants.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-28 23:16:31 +01:00
Chris Wilson 0839e3316a sna: Call mode update after disabling outputs upon VT switch
Perform a second sanity check that all the outputs we expect to be
active remain so following the cleanup after VT switching.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-28 12:18:58 +01:00
Chris Wilson 7d64f596b8 test: Add an easily visible tearing test for video playback
Contributed by Matti Hamalainen.
2013-05-27 21:15:49 +01:00
Chris Wilson f38d037b94 sna/video: Correct interpretation of 'sync'
The 'sync' parameter past along XvPutImage is not a request for us to
perform the operation synchronised to the vblank, rather a hint that the
client wishes the operation to be synchronous. In Xorg, this is
implemented as an immediate ShmCompletion event so make sure we flush
the operation to hw in this case.

Fixes regression from
commit 195a51353c [2.21.8]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 9 19:13:46 2013 +0100

    sna/video: Convert to a pure Xv backend

Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65048
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-27 21:15:48 +01:00
Chris Wilson 7e7d0ad15b 2.21.8 release 2013-05-27 13:41:13 +01:00
Chris Wilson 51103d8637 sna: Free the released COW reference when uncloning
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Reported-by: David Gow <david@ingeniumdigital.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64978
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-25 15:54:43 +01:00
Chris Wilson fce4292ab7 sna: Fix cut'n'paste compile error from previous commit
Always check for outstanding diff before pushing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 15:15:58 +01:00
Chris Wilson e2e139923d sna: Log when the framebuffer changes size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 15:08:43 +01:00
Chris Wilson 820f97ede7 sna: Reorder cleanup of flush list and CPU bo to silence an assertion
Keep the bookkeeping in order.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 15:08:43 +01:00
Chris Wilson 79e98ea644 sna: Reenable COW support
Accidentally left it disabled whilst testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 13:08:56 +01:00
Chris Wilson f6c35e58c1 sna: Do not undo a bo if we may fallback
If we undo the pending operations to a bo, then fallback we cause
corruption. For example, see wine and its 1-bit rendering.

Fixes regression from
commit 07a4400fff [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 10 11:59:59 2013 +0100

    sna: Attempt to discard overwritten operations before CopyArea

Also we need to be more careful and consider alu when marking the
operation as 'replaces'.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 12:57:20 +01:00
Chris Wilson 818702d3dc sna: Discard COW before migrating CPU damage to the GPU
At that point, the GPU bo will no longer be a clone of the source and so
we need to decouple it and make ourselves a fresh copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 12:57:19 +01:00
Chris Wilson 2b97237676 sna: Do make a clone of a GPU bo that is itself a cache
As we do not attempt to undo the cache status upon the clone.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 12:57:19 +01:00
Chris Wilson dbe2b5896e sna: Correct assertion for reusing COW
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 12:05:00 +01:00
Chris Wilson 2005b273e1 sna: Check for NULL damage before dereferencing
Fixes regression from
commit 16a64649e9 [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 10 15:48:58 2013 +0100

    sna: Basic copy-on-write support for cloning pixmaps

Reported-by: Axel Rohde
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-24 11:03:42 +01:00
Chris Wilson ee7ea10148 sna: Only flags the PolyFillRect as REPLACES if it is unclipped
Otherwise we discard a fill operation that is required to initialise the
pixmap before drawing commences.

Fixes regression from
commit ef9dc6fae5 [2.21.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon May 20 11:08:51 2013 +0100

    sna: Undo a few more overwritten operations upon a bo

Reported-by: Matti Hamalainen <ccr@tnsp.org>
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64841
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-23 12:58:01 +01:00
Chris Wilson 87295b1ef8 sna: Remove the overzealous assert
IGNORE_CPU is sometimes only set when there is CPU damage to ignore...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-22 09:44:13 +01:00
Chris Wilson f2e0454f2d sna: Fix DBG typo and so fix build with --enable-debug
s/hint/flags/ -- used the wrong variable name in an assert and upset the
compiler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-22 09:00:25 +01:00
Chris Wilson abe85adda5 sna: Warn about the consequences of disabling tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21 13:40:09 +01:00
Chris Wilson 195a51353c sna/video: Convert to a pure Xv backend
This is to enable feature work which requires access to Client state.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21 11:14:52 +01:00
Chris Wilson 8e42637050 sna: Re-enable read-read optimisations
Coacher is optimistic that the issue is no longer reproducible on his
machine - and whilst I do not understand the root cause, I am confident
that the kernel code is correct as is our use.

References: https://bugs.freedesktop.org/show_bug.cgi?id=61628
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21 11:14:52 +01:00
Chris Wilson e65ee10dfd 2.21.7 release 2013-05-21 11:01:50 +01:00
Chris Wilson ef9dc6fae5 sna: Undo a few more overwritten operations upon a bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21 09:31:55 +01:00
Chris Wilson d6c30d1d4d sna: Clear the cow_list when discarding the clone upon pixmap destroy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17 12:12:07 +01:00
Chris Wilson 21f1745565 sna: Add the missing ref(bo) when undoing the source clone
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17 12:12:07 +01:00
Chris Wilson ee166ca856 sna: Undo the clone when replacing the DRI pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17 11:30:46 +01:00
Chris Wilson 8d31fe771b sna: Transfer ownership of the cloned bo to the pixmaps
Fix the leak from the previous commit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17 11:15:05 +01:00
Chris Wilson 5d9315873e sna: Avoid replacing pinned bo when undoing a clone
Otherwise we end up cloning the scanout only to leave it dangling if the
client copies the from the front-buffer and then writes to it.

Reported-by: Nick Bowler <nbowler@draconx.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64675
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17 11:06:10 +01:00