Commit Graph

6937 Commits

Author SHA1 Message Date
Chris Wilson 463ab7f4fa sna: Fix tile origin for pattern blits
References: https://bugs.freedesktop.org/show_bug.cgi?id=71260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:07 +00:00
Chris Wilson 6889ba38ab sna: Drop forced alignment to 64 on pre-gen4 devices
Some linear GPU bo that we create must be naturally aligned, and the
extra alignment imposed for pure paranoia is counter productive.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-02 17:11:06 +00:00
Chris Wilson 3dae8b9715 sna: Dump GTT info if we fail to execute a batch due to ENOSPC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-29 14:47:29 +00:00
Chris Wilson 2497fc332e sna: Fix typo inside DBG message
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 22:03:39 +00:00
Chris Wilson fd007d9d46 sna/video: Correct handling of cropped images along packed fast path
In particular, it was offseting the read from the source image, but not
correcting the length to read - causing a read from beyond the end of
the source and a segfault.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 22:00:11 +00:00
Chris Wilson b85051ae48 sna: Fallback from partial to full move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 22:00:11 +00:00
Chris Wilson faedf266d7 sna: Tidy up an assertion on an uninitialised variable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 14:12:56 +00:00
Chris Wilson 1e382c6ece sna: Harden GetImage for use with very large buffers
That risk causing SIGBUS due to oom.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 14:06:27 +00:00
Chris Wilson 569b06abea sna: Wrap glyph composition with sigtrap handling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:14:27 +00:00
Chris Wilson 974abd0c3a sna: Prefer using userptr for PutImage into large GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:03:54 +00:00
Chris Wilson 64f1fbb465 sna: Tidy a split conditional in an picture upload
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:03:29 +00:00
Chris Wilson 1200aae481 sna: Wrap image upload with sigtrap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-28 13:03:06 +00:00
Chris Wilson 0fb7c366a5 sna: Add a few more refcnt asserts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27 22:06:27 +00:00
Chris Wilson 1085e6c932 sna: Update connector-type-to-string mapping
Add in a couple of newcomers to the connector type and make it easier to
track updates in future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-26 16:14:24 +00:00
Chris Wilson 13f3b24bab sna: Correct plurization of axis for modesetting log message
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 18:56:49 +00:00
Chris Wilson ded23af3cd sna: Include reflections when logging mode changes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 16:49:58 +00:00
Chris Wilson 98efd7f5d9 sna: Log mode switches on virtual outputs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 15:33:13 +00:00
Chris Wilson 42f325a87c sna: Keep @NOWARNFLAGS@ last
As the last option overrides the earlier options, make sure these
particular overrides always take effect by adding them last.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 11:14:29 +00:00
Chris Wilson 4c4458e8a3 sna/trapezoids: trapezoids_bounds() reports not-empty, so use it
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac af4995d74b sna: Handle failure to disable old plane when switching CRTCs
If we fail to disable the old plane, abort the PutImage and report the
error.

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac 00dcb4f229 uxa: fix order of inline Bool
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac 175b8711f8 uxa,legacy: use unsigned for comparition of unsigned
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac 7b235c92bb sna: Add missing va_end
Put va_end() into error paths

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac 318f100d73 uxa: Avoid relying on an assert and cleanup iterator
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac a110637ef2 Fix indentation for incorrectly shifted statements
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac b419691e27 uxa: rename some local variable to not shadow global ones
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac 6f066b6714 uxa: Ensure mask_picture is defined
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac ea18b7780e Cast to use unsigned math
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:49 +00:00
Chris Wilson 34057611c6 Correct type of uevent_handler
xf86AddGeneralHandler returns an opaque pointer, not a function pointer.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 10:04:49 +00:00
Zdenek Kabelac d2df10e28f Remove uneeded headers
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:47 +00:00
Zdenek Kabelac 2275ef581e Makefile convert @var@ to $(var)
Avoid using @var@ since this could not be easily overwritten through
'make var=xxx' option which is normally available.
For Makefile.am users should avoid using @var@.

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 09:25:56 +00:00
Chris Wilson 0ee29c4ea3 uxa,sna: Prevent bo exchange when pinned for non-DRI2 clients
With the advent of DRI3 (and previously with Prime and Glamor) we have
external clients who rely on the pixmap<->bo mapping being invariant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-22 13:37:00 +00:00
Chris Wilson f0021ab2a6 sna: Tidy up fallback from render composite to blt composite
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-22 12:13:30 +00:00
Chris Wilson 38ef572d68 sna: XY_SETUP_* expects the dst tiling to be set on gen4+
A few paths failed to set the tiling flag when setting up the BLT
engine, leaving the engine in a potentially inconsistent state.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-21 21:52:46 +00:00
Chris Wilson dee2db8839 sna: Fix typo in sna_blt_fill_begin()
Reported-by: intelgraphics7@gmx-topmail.de
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-21 14:48:23 +00:00
Chris Wilson 7d9edc9a71 sna: Set supported rotations on virtual outputs
As the virtual outputs are created later, they do not get automatically
populated with RR properties and we must do that instantiation
ourselves.

Reported-by: Kirill Müller <mail@kirill-mueller.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-21 10:07:00 +00:00
Chris Wilson c79cb18407 sna/gen7: Try to reduce flushes between primitive continuations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-20 13:52:28 +00:00
Chris Wilson 9ed5f83fe7 sna: Fix use before assignment
mono.sna was being used the line before it was assigned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19 12:09:35 +00:00
Chris Wilson a9d6f897e6 sna: Free composite boxes in the unlikely all-invalid path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19 12:03:33 +00:00
Chris Wilson 0782d4e57e sna: Correct check for overwriting last BLT fill
Typo crept in from the reloc rework.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19 12:02:43 +00:00
Chris Wilson 31f559820d sna/gen4+: Clear redirect bo before falling back to BLT paths
Just in case we later try to take action on the already freed
redirection.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19 12:00:08 +00:00
Chris Wilson 12f4c48d39 sna/gen7: Rework random GPU flushing
There seems to be no clear rationale for these flushes. They have been
empirically derived to pass test/render-copyarea and rendercheck,
without impacting upon a few simple benchmarks.

References: https://bugs.freedesktop.org/show_bug.cgi?id=68410
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-18 18:25:55 +00:00
Chris Wilson 04e4bae02c sna: Tell valgrind about the returned mode list
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-18 14:16:07 +00:00
Chris Wilson 4194100691 sna: Process Damage relative to dst->pDrawable not its pixmap->drawable
References: https://bugs.freedesktop.org/show_bug.cgi?id=32734
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-18 12:34:12 +00:00
Chris Wilson b692416110 sna/damage: Tidy up a tail return
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-18 11:58:43 +00:00
Chris Wilson 52612185c6 sna/damage: Guard against integer overflow before malloc
Check that the multiplication to compute the allocation will not
overflow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-15 21:20:30 +00:00
Chris Wilson 95c3892dd3 sna: Include valgrind leakchecks for --enable-debug=memory
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-15 11:55:51 +00:00
Chris Wilson 6e9a8c5ae2 sna: Add the missing braces around the conditional block
Fixes regression from
commit f3225fcb38
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 5 08:38:22 2013 +0000

    sna: Be move conservative with tiling sizes for older fenced gen

Reported-by: Jay Little <jaylittle@jaylittle.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71605
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 16:14:09 +00:00
Chris Wilson aa5a5684eb sna/gen6+: Only substitute SRC for CLEAR if using the correct source
If the source has not been verified to be clear, then using the SRC
operator will paint the wrong color.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 12:07:47 +00:00
Chris Wilson 97e684ab3c sna/gen6+: Improve debug PREFER_RENDER to cover all decision points
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14 12:07:47 +00:00