Commit Graph

6225 Commits

Author SHA1 Message Date
Chris Wilson 0f84ecfc3c sna/gen4+: Amalgamate all the gen4-7 vertex buffer emission
Having reduced all the vb code for these generations to the same set of
routines, we can refactor them into a single set of functions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 19:11:04 +00:00
Chris Wilson 1f4ede0ef8 sna: Do not throttle before move-to-cpu
The idea being that when creating a surface to perform inplace
rasterisation, we won't be using the GPU for a while and so give it time
to naturally throttle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 10:10:12 +00:00
Chris Wilson 5deba2832d sna: Ignore throttling during vertex close
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 10:10:12 +00:00
Chris Wilson f91a24fdba sna/video: Remove XvMCScreenInitProc
The symbols disappears without warning in xorg-1.14

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58552
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 10:10:12 +00:00
Chris Wilson ee99511846 sna/gen4+: Tweak preference of GPU placement for spans
If the CPU bo is busy, make sure we do not stall for an inplace
operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-19 18:03:53 +00:00
Chris Wilson bfd96b092d sna/video: Fix presentation of cropped sprites
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 23:09:42 +00:00
Chris Wilson 2df1b1abf0 sna/video: Fix up copying cropped textured video packed data
Simply ignore the cropping and copy the whole plane rather than
complicate the computation of the packed destination pixels.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 16:27:16 +00:00
Chris Wilson 8d523fa824 sna/video: Fix up destination offset for copying cropped textured video planes
Oh fun. Textured video expects the source content to be relative to the
origin, whereas overlay video expects the source at the origin.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 16:21:34 +00:00
Chris Wilson 7bb4573fcc sna/video: Fix up the image size for copying
Yikes, setting image.x2 == image.x1 meant no data was copied whilst the
video was clipped.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 16:07:19 +00:00
Chris Wilson 551b400377 sna/video: Amalgamate the computation of source vs dest offsets
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 15:14:00 +00:00
Chris Wilson d96a226cc5 sna/video: Fix adjustment of drawable vs source origin wrt to clip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 14:26:18 +00:00
Chris Wilson 79cb6304e9 sna/xvmc: Clean up to avoid crash'n'burn
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 14:09:03 +00:00
Chris Wilson 0d26082303 sna: Prefer the GPU once again for PolyPoint
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 10:54:28 +00:00
Chris Wilson 0e0a2d3006 sna/gen7: Mark the ring switch before checking bo
As we may do a batch submission due to the change of mode.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18 10:27:04 +00:00
Chris Wilson f522fbe7c9 sna: Refine check for an unset context switch
So it appears that we end up performing a context switch on an empty
batch, but already has a mode. This is caught later, too late, by
assertions. However, we can change the guards slightly to prevent those
assertions without altering the code too greatly. And I can then think
how to detect where we are setting a mode on the batch but doing no
work - which is likely masking a bigger bug.

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>
2012-12-17 23:13:41 +00:00
Chris Wilson 6c50cf4809 sna: Untangle the confusion of caching large LLC bo
We only use a single cache for very large buffers, so we need to be
careful that we set the tiling on them. More so, we need to take extra
care when allocating large CPU bo from that cache to be sure that they
are untiled and the flags are true.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17 22:27:14 +00:00
Chris Wilson e474abea7c sna: Promote pinned-batches to run-time detection
Now that the feature has been committed upstream, we can rely on the
runtime detection.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17 15:38:04 +00:00
Chris Wilson 4d7e3a9123 uxa: Fix copy'n'paste of false not FALSE
Bugzilla; https://bugs.freedesktop.org/show_bug.cgi?id=58406
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17 12:34:05 +00:00
Chris Wilson 7a4d1136bd sna/video: Pass along the video source offset
Fortunately nobody had yet noticed that all videos were assumed to play
with a matching src/dst origin.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17 12:02:41 +00:00
Chris Wilson dfe9d18f9f sna: Limit the default upload buffer size to half the cpu cache
This seems to help with small slow caches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17 12:02:40 +00:00
Chris Wilson 5b0572503e sna: Enable support for opting out of the kernel CS workaround
Keeping a set of pinned batches in userspace is considerably faster as
we can avoid the blit overhead. However, combining the two approaches
yields even greater performance, as fast as without either w/a, and yet
stable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 23:04:55 +00:00
Chris Wilson 805f78addf sna: Try to reuse pinned batches by inspecting the kernel busy status
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 22:13:21 +00:00
Chris Wilson f1aec67681 sna: Precompute the base set of batch-flags
This is to make it easier to extend in future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 17:37:32 +00:00
Chris Wilson c7ac12003b sna: Only flush at the low fence wm if idle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 15:28:45 +00:00
Chris Wilson 4580bbeac0 intel: Support debugging through AccelMethod
Ease debugging by allowing all acceleration or render acceleration to be
disabled through AccelMethod:

Option "AccelMethod" "off" -> disable all acceleration
Option "AccelMethod" "blt" -> disable render acceleration (only use BLT)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 15:22:58 +00:00
Chris Wilson 58770b7d64 man: Describe Option "AccelMethod"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 15:22:58 +00:00
Chris Wilson 83609af368 sna: Tweak the idle SHM CopyArea path to also replace a busy GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:53:26 +00:00
Chris Wilson 6490585f65 sna: Do not force use of the GPU for a copy from a SHM pixmap
As we will undoubtably flush and sync upon the SHM request very shortly
afterwards, we only want to use the GPU for the SHM upload iff it is
currently busy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:02:43 +00:00
Chris Wilson 3a08f09187 sna/gen6+: Tweak prefer-blt-bo
Split the decision between where it is imperative to use the BLT to
avoid TLB misses and the second case where it is merely preferential to
witch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:02:43 +00:00
Chris Wilson ac9ef1fc60 sna/gen6+: Keep the bo on its current ring
Track the most recent ring each bo is executed on, and prefer to keep it
on that ring for the next operation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:02:43 +00:00
Chris Wilson 15ccb7148d sna/gen6+: Apply the is_scanout to the key not value in the binding cache
Oops, we never managed to reuse the cached location of the target
surface as we entered it into the cache with the wrong key.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:02:42 +00:00
Chris Wilson fde25b0892 sna/trapezoids: Add another inline hint
cell_list_alloc() is only called from one place, and the compiler should
already be inlining it - but does not appear to be. Hint harder.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:02:42 +00:00
Chris Wilson 2a21c8b351 sna: Include shm hint in render placement
The goal is to reduce the preference of rendering to a SHM pixmap - only
if it is already active, will we consider continuing to use it on the
GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-16 10:02:42 +00:00
Chris Wilson a467102a95 2.20.16 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-15 10:00:48 +00:00
Chris Wilson b0f8c823b6 sna/dri: Fallback to a blit after a failed flip
...rather than force the exchange.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-15 09:28:04 +00:00
Chris Wilson 2c71a8e08a sna/dri: Honour TripleBuffer Option
In case anyone ever wants to disable the default.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-15 09:27:07 +00:00
Chris Wilson 6593ad3fec sna/dri: Store and check size of front/back bo attached to a DRI2 drawable
So that we can prevent feeding back a stale bo when the DRI2 client
tries to swap an old buffer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57212
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-14 23:48:00 +00:00
Chris Wilson 9df9585cb0 sna: Reduce fence watermarks
Further restrict the amount of fenced bo we try to fit into the batch to
make it easier for the kernel to accommodate the request.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-14 15:37:56 +00:00
Chris Wilson 0d3ba44e44 sna/gen2+: Experiment with not forcing migration to GPU after CPU rasterisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-14 13:48:05 +00:00
Chris Wilson d867fd01cb sna/gen3: Don't combine primitives if beginning a ca 2-pass
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-14 13:19:04 +00:00
Chris Wilson 3ca503dac2 sna/gen3: Remove stray setting of vertex_start
It is always done at the beginning of vertex emission.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-14 13:19:04 +00:00
Chris Wilson 7f76f100e8 sna/gen2: Reorder reuse_source() to avoid NULL dereference for solids
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 23:12:42 +00:00
Chris Wilson 044a54c233 sna/gen2: Initialise channel->is_affine for solid
In case we hit a path were we avoid reusing the source for the mask and
leave is_affine unset for a solid mask.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 23:05:30 +00:00
Chris Wilson 29afd0dc8e sna/gen2: Assertions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 23:00:13 +00:00
Chris Wilson 4d2abe1e3d sna/gen3: Remove incorrect optimisation of an opaque source for CA
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 22:09:37 +00:00
Chris Wilson d428dbf7ad sna/gen2: Program solid mask using the DIFFUSE component
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 15:26:39 +00:00
Chris Wilson 9e7311516d sna/gen2: Align surface sizes to an even tile
Makes this 855gm much happier.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 15:26:39 +00:00
Chris Wilson e646047a56 sna: Fix up BLT overwrite detection to use target_handle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 14:23:54 +00:00
Chris Wilson 4f96439e39 sna: Fix typo for 830/845 gen
Must remember, its octal not decimal.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 13:15:52 +00:00
Chris Wilson f631a56bcb sna: Only flush the batch after an actual relocation
As we may write preparatory instructions into the batch before checking
for a flush.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-13 00:55:45 +00:00