Commit Graph

6543 Commits

Author SHA1 Message Date
Chris Wilson 1068bf7024 sna: Mention if compiled as 64bit as part of the CPU feature detection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 10:14:23 +00:00
Chris Wilson 27c71027b1 sna: Ignore SSE4a - not an Intel ISA!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 10:00:29 +00:00
Chris Wilson 2a6f3989ba sna/gen3: Allow conditional use of SSE2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 09:59:34 +00:00
Chris Wilson 13461a18b1 sna: Print detected CPU features
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 09:41:14 +00:00
Chris Wilson 528dbf9ebb sna: Fix build on older GCC for cpuid()
We need to double check that the features we look for are supported by
the compiler before doing so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 08:17:44 +00:00
Chris Wilson 49d9c5e9d4 sna: Reverse inverted assertions
Oops, the assertions that we had sufficient free space was inverted.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 00:27:12 +00:00
Chris Wilson 94b95cc2fc sna/gen4+: Begin specialising vertex programs for ISA
Allow use of advanced ISA when available by detecting support at
runtime. This initial work just uses GCC to emit varying ISA, future
work could use hand written code for these hot spots.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26 00:03:28 +00:00
Chris Wilson f095678125 test: Correct ignore path for async.avi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25 23:15:02 +00:00
Chris Wilson aa045d80ec sna: Detect available instruction sets at runtime
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25 23:15:02 +00:00
Chris Wilson 56fd91fc83 sna/gen3+: Restart vertex space checks after lock contention
If we end up contending for the vertex lock, we need to double check
there is sufficient vertex space left for us.

Bugzill: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1124576
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25 16:13:18 +00:00
Chris Wilson b12f0da0be sna/gen3+: Assert that nbox is not 0
Various assertions to track down a potential programming error.

References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1124576
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25 16:13:05 +00:00
Chris Wilson 6f9646f5be sna/trapezoids: Instruct the compiler to flatten the callees whilst rasterising
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25 14:36:32 +00:00
Chris Wilson 421910ca57 sna/gen3: Factor out the per-vertex divide for gradients
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-24 22:15:13 +00:00
Chris Wilson a19da0ea51 sna: Reduce DefaultDepth to 16 on older chipsets
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-24 11:22:01 +00:00
Chris Wilson d7bba8512c sna: Tidy a call to set the gamma before setting up a CRTC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-23 10:56:42 +00:00
Carl Worth e2aaf4ed33 Refuse to load driver for depth-8 X server.
The driver is not functional at this depth, so tell the user as much and
bail out.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31375

Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-22 17:19:21 -08:00
Chris Wilson cbd8f16ea0 sna: Refuse to create larger than max temporary upload bo
The maximum size is determined by available RAM, if we exceed it we
greatly increase the risk of swap thrashing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 21:49:42 +00:00
Chris Wilson 7a26479277 sna: Retire before looking for a large 2D buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 20:13:58 +00:00
Chris Wilson 630b114f1c sna: Allow search_linear_cache() to reuse large buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 20:08:36 +00:00
Chris Wilson d87a0b4c3b sna: Allow picture fixup in channel format if not changing RGB depth
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 20:07:56 +00:00
Chris Wilson b129b434f9 sna: Optimise mmap of GPU bo for read-read operations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 12:13:53 +00:00
Chris Wilson 19bd005056 sna: Avoid migrating and making the GPU bo busy prior to mmapping it
References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1131134
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 12:13:27 +00:00
Chris Wilson afb77ffade sna/gen7: Skip CLEAR_PARAMS for the null depthbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 10:48:06 +00:00
Chris Wilson 1a7262e530 sna/gen7: Only a pipeline stall is required for the CA pass
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22 10:30:49 +00:00
Chris Wilson b0c83b77d0 sna/dri: Eradicate the DRI2 name exchange mechanism
Thinking about the compositor <-> server <-> client inter-exchange
demonstrates that we cannot prevent the client rendering into the
source texture being show by the compositor. That is a subject for DRI3.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-21 19:37:51 +00:00
Chris Wilson 6172ff3e35 sna: Always enable the solid-cache and gradient-cache
Figuring out when it might not be used is simply too error prone.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-21 15:34:47 +00:00
Chris Wilson b7a96df9b0 sna: Honour LinearFramebuffer
The Option was untested, and unsurprisingly was broken.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20 18:54:27 +00:00
Chris Wilson d2442c74b8 2.21.3 release 2013-02-20 13:36:43 +00:00
Chris Wilson 2cab7e80eb sna/trapezoids: Clamp cells to valid range
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20 12:40:01 +00:00
Chris Wilson 14de90b251 sna/trapezoids: Embed a few cells into the stack
Avoid an allocation in the common case where the set of trapezoids is
fairly narrow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20 12:00:54 +00:00
Chris Wilson 3eca4ea1a5 sna/trapezoids: Perform the cell allocation upfront
As we know the maximum extents of the trapezoids, we know the maximum
number of cells we will need and so can preallocate them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20 11:33:46 +00:00
Chris Wilson 9df5e48c58 sna/video: Only setup XvMC if we first setup Xv
Under certain circumstances, XvScreenInit can indeed fail, so do not
bother with creatin XvMC (as it triggers internal assertions if it
cannot find our adaptor amongst Xv's).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-19 10:08:29 +00:00
Chris Wilson b6588c4807 test: Add generated vsync.avi to gitignore 2013-02-19 08:59:12 +00:00
Chris Wilson 1e2fd66ade sna: Assert that the GPU damage is NULL before destroy a proxy
If the GPU bo is a proxy, then it really is a pointer into a upload
buffer for CPU data. In these cases, there should never be any GPU
damage lying around.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-19 08:57:47 +00:00
Chris Wilson d90a123db7 sna: Assert that the gpu_bo exists if it is entirely damaged
This should help catch the error slightly earlier.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-18 20:06:45 +00:00
Chris Wilson a03aba6f7f sna: A couple more assertions that we forcibly attach pixmaps correctly
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-18 16:12:14 +00:00
Chris Wilson 1f16d85426 sna/dri: Prevent swapping a decoupled DRI2Buffer
If the DRI2Buffer is no longer valid for the Drawable, for example the
window had just been reparent, just complete the swap without triggering
any assertions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-18 15:42:06 +00:00
Damien Lespiau b3ba758a01 uxa/gen7: Don't use a message register to store vl
Turns out the "new" assembler that uses mesa's opcode emission hits the
path that automatically transforms MRF registers into GRF ones in the
exa_wm_src_projective shader.

The diff with the new assembler is:

$ intel-gen4disasm -g7 -
-   { 0x00600041, 0x208077be, 0x008d03c0, 0x008d0180 },
+   { 0x00600041, 0x2e8077bd, 0x008d03c0, 0x008d0180 },
mul(8)      m4<1>F          g30<8,8,1>F     g12<8,8,1>F     { align1 };
mul(8)      g116<1>F        g30<8,8,1>F     g12<8,8,1>F     { align1 };

Of course, message registers are no more in gen7, so the shader is
trying to do something shaddy (ahem!).

Instead of using m4, let's make exa_wm_src_projective use g68 for v (aka
vl) which makes sense since:

1/ vh is g69
2/ exa_wm_src_affine uses g68 for vl already

This commit changes the generated assembly, here's the decoded diff:

$ intel-gen4disasm -g7 -
-   { 0x00600041, 0x208077be, 0x008d03c0, 0x008d0180 },
+   { 0x00600041, 0x288077bd, 0x008d03c0, 0x008d0180 },
mul(8)      m4<1>F          g30<8,8,1>F     g12<8,8,1>F     { align1 };
mul(8)      g68<1>F         g30<8,8,1>F     g12<8,8,1>F     { align1 };

Cc: Kenneth Graunke <kenneth@whitecape.org>
Reported-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-18 13:46:47 +00:00
Chris Wilson 43ba22ef4a Confirm that i915.ko has KMS enabled before binding to the device
If the kernel has the module, but the KMS module option is not enabled,
we cannot function. So after checking to see if the i915.ko is bound,
then querying whether it provides any KMS resources. If it has no CRTCs
attached, then we need to failover to the VESA/fbdev drivers. Note that
this should have been detected by drmCheckModesettingSupported()

References: https://bugs.freedesktop.org/show_bug.cgi?id=60987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-17 09:32:59 +00:00
Chris Wilson 5a5943e237 NEWS: Xserver 1.6 was not packaged in Xorg 7.7
I misinterpreted Sedat Dilek's advice on how to fix my confusing
changelog, so drop the Xorg 7.7 confusion and just refer to the version
of Xserver the driver is first compatible with.
2013-02-15 12:05:14 +00:00
Chris Wilson 15e1050ea5 NEWS: Fix a couple of typos and factual errors
Sedat Dilek corrected my spelling and pointed out that what is known as
Xorg 1.6 in the log file is actually better known as releases of
Xserver 1.6 and Xorg 7.7.
2013-02-14 21:59:36 +00:00
Chris Wilson 86e025a184 sna/gen4: Restore nonrectiinear spans workaround
Instead of relying on the macro, the intention was simply to use the
prefer_gpu hint. However, I dropped it whilst refactoring ideas from
later generations. So restore both the debug control to force spans as
well as the intended workaround.

Reported-by: Edward Sheldrake <ejsheldrake@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13 22:08:55 +00:00
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