Commit Graph

7631 Commits

Author SHA1 Message Date
Chris Wilson 8587b2fff2 sna: Rewrite rotation setup on top of universal drm planes
The kernel interface has changed slightly since the early proposals. Now
the rotation property is only on the plane and so we have to lookup the
primary prime as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-08 14:18:10 +01:00
Chris Wilson f24a9d3352 sna: Fix a couple of DBG messages
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-08 13:07:11 +01:00
Chris Wilson 6a64a3ae55 sna: Discard operations to either CPU or GPU bo when overwriting with RenderRectangles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 13:04:02 +01:00
Chris Wilson 2c8ab77fcd sna: Tweak number of threads for short areas
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 12:43:55 +01:00
Chris Wilson d3ccb3f3b2 sna: Convert a clear tile into a solid fill
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 12:39:01 +01:00
Chris Wilson 2e0763088f sna: Fix typo s/num_threads/max_threads/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 12:26:43 +01:00
Chris Wilson 04ddea075e sna: Do a quirk early check for short areas before threading
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 12:19:25 +01:00
Chris Wilson 228a22fe8d sna: Disable use of threaded compositor when using threaded renderer
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 12:19:25 +01:00
Chris Wilson 64bcb91f58 sna: Utilise existing cached upload for promoting to GPU bo
If we already have a buffer that represents the data on the GPU, we can
simply use that when we need to promote the pixmap onto the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 11:25:28 +01:00
Chris Wilson 821ef20b27 sna: Promote tile pixmaps to GPU when reused
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 10:44:04 +01:00
Chris Wilson c6407f7380 sna/gen8: Disable the unaligned check
Note sure if this is strictly required -- but at the moment it fails for
1x1R solids, causing us to skip glyphs. The simulator doesn't complain,
so just skip the check for now.

Reported-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 10:14:54 +01:00
Chris Wilson e64d14d7bc sna: Tighten assertions for using upload proxies concurrently with CPU reads
After relaxing some of the rules on when to discard the upload proxies,
we also need to relax some of the complementary asserts.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 09:55:04 +01:00
Chris Wilson 4e12d5ca26 sna: Prevent creating a GPU bo for an inplace read
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04 09:48:53 +01:00
Chris Wilson 18ae7722db sna: Wrap xf86DPMSSet
We need to wrap xf86DPMSSet() so that we can reintialize our bookkeeping
and auxiliary planes after disabling/re-enabling CRTC during DPMS
operations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-03 18:18:04 +00:00
Chris Wilson 57d0cc82d8 sna: Clear the cursor reference from the CRTC if the update fails
This should allow it to be restored correctly the next time it gets
shown.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-03 09:11:32 +01:00
Chris Wilson 24c9bac7eb sna: Limit the size of the tiling object to be smaller than either the originals
When we tile, we do so in order to fit an operation involving two
objects larger than the aperture. If we then choose an intermediate
tiling object that is larger than either of those two, the error will
persist and we will be forced to recuse.

In the worst case, this will provide an upper bound to the recursion.

Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-02 21:23:17 +01:00
Chris Wilson 87e659b887 sna: Use the threaded compositor for picture conversions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-02 12:47:14 +01:00
Chris Wilson 2bf36d54eb sna/gen6+: Tweak consideration of compositing on BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-02 12:47:14 +01:00
Chris Wilson 732cd11cf0 sna: Fix typo in LinearFramebuffer handling
Eeek, when not using LinearFramebuffer we still want to create the GPU
bo: s/,/;/

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01 17:55:32 +01:00
Chris Wilson b5fa463b90 sna: Correct migration flags for initial scanout creation
We want to preserve any contents preloaded (not that there should be
any...)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01 17:54:29 +01:00
Chris Wilson b88866aa5e sna/dri2: Add a DBG option to select copy method
Often when debugging it is useful to force either use of the BLT or 3D
pipelines for copies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01 17:00:25 +01:00
Chris Wilson a10781b70f sna: Enforce LinearFramebuffer option
This option should only be used for compatibility. Previously this was
done at a high level, this changes it to enforce the tiling as we apply
the CRTC.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01 16:52:35 +01:00
Chris Wilson 75745cd586 sna/dri2: Use CPU fallback if possible
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01 14:31:32 +01:00
Chris Wilson 02715490db sna/dri2: Set depth/bpp on scratch DrawableRec
We need to initialise both depth and bitsPerPixel on the drawable struct
we pass around as they are used for selecting for the format when
copying.

Reported-by: Vedran Rodic <vrodic@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01 13:15:44 +01:00
Damien Lespiau e6e5330857 intel: Use the i845 info structure for INTEL_I845G_IDS()
I assume the intention was to provide a different structure for each of
the gen 2 devices.

This doesn't change anything really.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-06-30 21:20:27 +01:00
Chris Wilson e1c3e6ce79 sna: Add DBG breadcrumbs before flushes in BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 21:18:58 +01:00
Chris Wilson 43176b9bfa sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo
One day, we will move the width/height/bpp to the bo itself...

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 21:18:43 +01:00
Chris Wilson 6c3399715e sna/dri2: Apply the paraniod buffer clip in the correct coordinate system
We need to only clip to the extents of the copy in the buffer space -
which implies that we need to translate the region into that space before
doing the clip.

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 16:38:29 +01:00
Chris Wilson c25fa2216a sna: Tweak preference for small GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 15:44:04 +01:00
Chris Wilson fab3bc70a4 sna: Reduce assertion when using asynchronous CPU access
If we are not actually accessing the memory through the pointer, we do
not care if it not currently coherent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 11:05:33 +01:00
Chris Wilson ffe8bd4d6e sna: Silence snarky compliers
0 != (void *)0

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 10:55:20 +01:00
Chris Wilson 05f6183075 sna: Mollify assert to be consistent with the scanout flush
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30 10:46:00 +01:00
Chris Wilson 665d012b8e sna: Ensure CPU bo is synchronized before writing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 15:21:51 +01:00
Chris Wilson 6b906ae742 sna: Update allocation of CPU bo to avoid creating active buffers
Since we now prefer CPU detiling, exactly when we want active/inactive
buffers is a little more complex - and we also need to take into account
when we want to use the CPU bo as a render target.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 07:15:20 +01:00
Chris Wilson b961d73233 sna: Sync CPU bo before writes
Fixes regression from

commit 961139f587 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 30 09:45:15 2014 +0100

    sna: Use manual detiling for downloads

Reported-by: Harald Judt <h.judt@gmx.at>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80560
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 07:13:48 +01:00
Chris Wilson 53ef9e762a sna: Only preferentially upload through the GTT for large transfers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 07:13:48 +01:00
Chris Wilson 0955f12ae0 sna: Prefer linear if below tile_width
Be stricter in order to allow greater use of CPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 3ef966f4c5 sna/io: Prefer CPU copies on LLC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 9fc052da5c sna: Don't discard damage for SHM pixmaps
We don't really want to rendering into SHM pixmaps except for copying
back due to the strict serialisation requirements.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 0f8b39d24f sna: Check for a mappable GPU bo before migrating damage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson cfdaee4a7e sna: Skip adding damage if it is already contained
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:05 +01:00
Chris Wilson 80752fb279 sna: Tidy calling memcpy_from_tiled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29 06:57:04 +01:00
Chris Wilson 2a0176379f sna: Micro-optimise unswizzling tiling/detiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-28 14:18:23 +01:00
Chris Wilson 24cb50e53c sna/trapezoids: Handle mono traps just in case
I disabled a few paths and ended up in an assert that mono trapezoids
shouldn't get that far...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-28 07:07:40 +01:00
Chris Wilson 72c041e57b uxa: Update Screen Pixmap width/height first
Since commit dd6db82680 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 9 20:26:19 2014 +0100

    uxa: Add DRI3 and miSyncShm support

we verify that the attaching bo meets the constraints required for the
Pixmap. However, when updating the ScreenPixmap following a resize, we
did not update the Pixmap size until after we tried to update the bo,
resulting in a validation failure when shrinking the screen.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:29:17 +01:00
Chris Wilson edd2b78956 sna/dri2: DBG compile fixes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 16:00:03 +01:00
Chris Wilson a6ba93283b sna/glyphs: Add DBG option for glyph tolerance
And bump it to 3 so that glyph filtering doesn't force us to use the
mask too often.

References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 13:44:48 +01:00
Chris Wilson ee5c74deee sna/glyphs: Add DBG option for forcing glyphs-to-dst
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 13:40:58 +01:00
Chris Wilson 6ba4ee1fe8 sna: Check source bo is suitable for BLT before doing so
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 10:38:59 +01:00
Chris Wilson 157e22cb8e sna: Only reuse pinned batches for 830/845
Trying to fly too close to the sun. :(

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80558
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27 07:40:48 +01:00