Commit Graph

7050 Commits

Author SHA1 Message Date
Chris Wilson c01c66bca2 sna: Update experimental create2 struct definition
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-07 18:54:57 +01:00
Dave Airlie 6004870d53 configure.ac: fix dri enabled with kms only picked
Otherwise we'd fail saying DRI1 wasn't possible, when that
is exactly what we asked for.

[ickle: The breakage was introduced with

commit bd6ffd1ad2 [2.21.14]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Jul 27 15:33:19 2013 +0100

    configure: Print a summary of compilation options

which modified the search to only take place if UMS was enabled, but
missed mollifying the resulting error.]

Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-06 09:31:21 +01:00
Chris Wilson a875ba39be sna: Rename the attribute macro __packed__ to avoid clang barfing
Using __packed__ as shorthand for ___attribute__(__packed__) confuses
clang as. (I guess to it expands (__packed__) which gcc skips.) As
clang also uses packed in its builtins, we have to find a compromise,
and so tightly_packed wins for being a more verbose description without
the dangerous leading underscores.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-05 16:20:35 +01:00
Chris Wilson 2536ad044b sna: Tweak threading thresholds
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04 13:10:26 +01:00
Chris Wilson 2cdd57c804 sna/trapezoids: Some minor DBG to investigate threaded rendering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04 12:54:27 +01:00
Chris Wilson 1f7e20d812 sna: Define fast function attribute for old gcc or other compilers
Also written by Mark Kettenis and reported by Sedat Dilek.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04 12:54:17 +01:00
Chris Wilson 0cd154039a 2.21.14 release 2013-08-04 10:30:14 +01:00
Chris Wilson a5bf389908 sna: Mark the entire userptr proxy chain as flush/non-reusable
Fixes cache bookkeepping when mixing userptr uploads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04 09:51:26 +01:00
Chris Wilson 5287660aaf sna: Reserve relocation entries for the deferred VBO
Whilst we reserved exec entry slots for the deferred VBO, there were no
relocation spaces reserved. So if we submitted a render command followed
by a multitude of BLT copies, we could then overrun the relocation array
when adding the deferred vbo to the batch.

Reported-by: Danny <moondrake@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67504
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-02 13:18:12 +01:00
Chris Wilson 3f04b6f33f sna/dri: Disable TripleBuffering by default for compositors
Ideally, the method of swapping is something that the applications have
control over, along with how to synchronise to the vertical refresh.
Whilst triple buffering is good to reduce jitter for games (at the cost of
an extra frame of latency, usually considered a good tradeoff), it
prevents the applications from accurately controlling the presentation
of animations. One vocal critique is Owen Taylor, who demands accurate
swap control for smooth animations in gnome-shell. For example,

http://blog.fishsoup.net/2012/11/28/avoiding-jitter-in-composited-frame-display/

In lieu of application control, just apply a quirk for the compositor.
Everyone else will just have to wait for DRI3.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-01 15:21:04 +01:00
Chris Wilson 0ae07158c3 sna: Add a few more details to the log for mode switching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-01 11:18:19 +01:00
Chris Wilson 246911d742 sna: Don't force inline string-ops for the general memcpy_blt routine
As we need optimal copy code for the general case, where unlike
swizzling the run lengths are not known before hand, we need to call the
arch specific routines from glibc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-01 11:18:18 +01:00
Chris Wilson 8174c56c3a sna/glyphs: Allow glyphs-to-dst to discard CA masks for a8 glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-01 11:18:18 +01:00
Damien Lespiau c5e3b66c27 uxa/display: Keep the EDID blob around for the lifetime of an output
xf86InterpretEDID() doesn't copy the EDID raw data in xf86MonPtr but
just stores the given pointer. The DDX driver needs to make sure that
data stays valid.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-31 18:57:28 +01:00
Chris Wilson 278ee155d5 sna: Relax readback constraint for CPU mappings of scanouts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-31 17:45:16 +01:00
Chris Wilson bfe25b8110 sna: Fix interaction between WT mapping of scanouts and allocating from stolen
If we allocate the scanout from stolen, we cannot then access it via the
CPU - so prevent the mapping in those cases.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-31 11:01:37 +01:00
Chris Wilson 493763301e sna: Allow CPU access to scanouts if WT cached
On Iris, we may store the framebuffer in the eLLC/LLC and mark it as
being Write-Through cached. This means that we can treat it as being
cached for read accesses (either by the GPU or CPU), but must be careful
to still not write directly to the scanout with the CPU (only the GPU
writes are cached and coherent with the display).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30 23:02:50 +01:00
Chris Wilson cdbc097796 sna/gen7: Set appropriate constants for Haswell GT3
GT3 has twice the number of cores and URB as GT2, and so we can use
more threads and URB entries.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30 16:44:31 +01:00
Chris Wilson 9a390c77dc sna/gen4: Hide an unused function
Whilst we are force flushing vertexes we are not using the threaded
emitter, so simply hide it from the compiler to prevent it warning about
the unused function.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30 14:07:45 +01:00
Chris Wilson a3eea6e61e Suppress misleading warnings for -Wmaybe-uninitialized
All the curent reports by gcc are false positives. Instead we have better
static analysis tools at our disposal and valgrind.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30 13:26:14 +01:00
Chris Wilson 208282d316 Suppress a bunch of compiler warnings for using constant strings
We want these allocated in ro memory even if the antique API complains.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30 13:26:14 +01:00
Chris Wilson 7e3445a330 sna/dri: Tidy up applying damage to the Pixmap when copying regions
Now that we are doing a true move-to-gpu first, we can drop the hacks
from damage().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30 12:46:18 +01:00
Chris Wilson c507f621c9 sna: Suppress a few harmless warnings
Mostly of the only used in debugging path variety.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 23:54:31 +01:00
Chris Wilson cf7d36455f intel: Suppress some extremely noisy warnings
Warning about redundant declarations within the xorg headers hides
genuine warnings in our own code - disable them until the headers are
cleaned up.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 23:49:08 +01:00
Chris Wilson d7465ece29 sna: Cleanup along all error paths in sna_pre_init()
Only one out of a dozen error paths actually freed the locally allocated
memory, oops.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 21:55:29 +01:00
Chris Wilson 5751b9f1f5 sna/dri: Prevent stale DRI buffers from a NULL dereference
If the DRI buffer is stale, the drawable may have been recreated and no
longer be associated with DRI. In this case, the pixmap may not be on
the GPU, so just subsitute the client's old bo and hope the it catches
up and does a GetBuffers in the near future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 15:21:19 +01:00
Egbert Eich 8619db7224 Add support for the dell backlight interface
Signed-off-by: Egbert Eich <eich@freedesktop.org>
[ickle: Add the failsafe to sna as well.]
2013-07-29 13:05:03 +01:00
Chris Wilson c9d8949980 sna: Composite region is already in dst drawable space
So do not offset it again when processing the fallback composite
operation.

Regression from commit 6921abd810
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jul 18 16:21:27 2013 +0100

    sna: Add a fast path for the most common fallback for CPU-CPU blits

References: https://bugs.freedesktop.org/show_bug.cgi?id=66990
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 12:16:21 +01:00
Chris Wilson 3cb75950a9 uxa: Fix incorrect include path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 11:05:28 +01:00
Chris Wilson 1dd79c225c sna: Restore driver info upon FreeScreen
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-29 11:05:23 +01:00
Chris Wilson b0826907dd sna: Fix limit on stipples to only use immediate operands for <= 32 dwords
The check was still based on bytes after the len had been converted to
dwords.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 19:23:40 +01:00
Chris Wilson 5e9decc963 uxa: Add the missing include to silence the compiler warning
Silence compiler warning for no prior declaration of intel_init_scrn().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 16:51:32 +01:00
Chris Wilson f97b55d283 intel: Remove the unused SDV PCI IDs
As a first step towards working out what to do with the remaining
used-once PCI IDs, delete the used-never ones.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 16:51:32 +01:00
Chris Wilson 679416f9a5 sna: Allow PutImage to utilise userptr for busy targets
Typically, PutImage is not a performance critical path since ShmPutImage
uses CopyArea and so PutImage is relegated to small one off transfers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 16:51:32 +01:00
Chris Wilson bd6ffd1ad2 configure: Print a summary of compilation options
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:51:56 +01:00
Chris Wilson d92b5ddcff sna/gen7: Prefer GPU spans for Baytrail as well
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:51:51 +01:00
Chris Wilson 0b68f1741f sna/gen7: Use ivb/byt/hsw shorthand for generation checking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:44 +01:00
Chris Wilson 0e2a1c27b7 sna/gen7: Rename Valleyview to Baytrail
The codename changed midcycle - along more rational lines (all the chips
within the platform are now part of the Baytrail family rather than
different codenames for each).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson 8d10c32d65 sna/gen7: Set appropriate thread counts for Valleyview^Baytrail
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson a84a9fcb5e intel: Remove the unused bridge PCI-IDs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson 8afb5438f3 intel: Always define the PCI-IDs
If the macros conflict with another definition on the system, that is
actually a useful warning in this case as it means there exists a typo
somewhere.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson a12c352b56 intel: Remove some unused macros
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson e94f66c951 intel: Move some backend specific macros out of the common header
All the IS_GEN/IS_DEVICE are only used by the UXA backend, so move them
to its headers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson 04d5c33b96 uxa: Colocate architecture source files with backend implementation sources
i.e. move the toplevel uxa/*.[ch] into src/uxa/*.[ch]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson 45d4e8dcf9 uxa: Clear up the common intel directory
Move all the UXA backend specifc files into their own subdirectory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson ab28526ea4 intel: Only print the unique chipset names
When printing out the list of supported chipsets, remove the (many
times) repeated names as they are very confusing and obscure the product
name you may be searching for.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 6fd37e644d intel: Replace the codename in the user facing string for unknown Haswell parts
For these parts we do not yet known the correct marketing name, so
replace our use of the codename with the generic term.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 7567c99ee9 intel: Set the correct marketing names for Ironlake, Sandybridge and Ivybridge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 17873be335 intel: Remove the SDV from the list of identified chipsets
These devices are not for retail and so have no marketing names.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 4c6871684b intel: Cross-check an unnamed chipset against the list of known PCI-IDs
If we recognise the PCI-ID but do not have a marketing name for it, it
means we are deliberating ignoring it - presumably because it is an
engineering sample. In this case, we do not want to print out a warning
into the logfile so replace the "Unknown chipset" with some info
about the future product.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00