Commit Graph

6256 Commits

Author SHA1 Message Date
Chris Wilson dba83dacd2 sna/gen3: Use inline transform+scale function
So as to avoid reading back from the vbo (which may be wc mapped).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 19:23:36 +00:00
Chris Wilson f0fca544b0 sna/gen4+: Check for a spare exec slot for an outstanding vbo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 19:15:53 +00:00
Chris Wilson c6e850b626 sna/gen4+: Trim an extraneous coordinate from solid composite emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 19:15:53 +00:00
Chris Wilson 3fdc992344 sna/gen4+: Trim an extraneous coordinate from solid span emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 19:15:53 +00:00
Chris Wilson fdd6d222bc sna/gen4+: Tidy emit_spans_affine()
gcc produced abysmal code for the inlined emission, so hand unroll it
for sanity.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 19:15:53 +00:00
Chris Wilson 5d222d4d21 sna/gen4+: Tidy emit_spans_solid()
gcc produced abysmal code for the inlined emission, so hand unroll it
for sanity.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 18:44:02 +00:00
Chris Wilson 4528f68eff sna: Only allocate a busy CPU bo for a GPU readback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 18:42:40 +00:00
Chris Wilson 99fdd1a1c6 sna: Mark kgem_bo_retire() as static
The exported function is not used, so mark it static and strengthen the
assertions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 18:42:40 +00:00
Chris Wilson 548d284b8c sna: Skip copying fbcon if we are already on the scanout
If we are already the scanout, then there is little point copying to
ourselves... Should be paranoia.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 14:50:44 +00:00
Chris Wilson 583efd4ba0 sna: Sanity check config->compat_output
In a headless setup this may be left initialised to -1.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-27 17:59:59 +00:00
Chris Wilson 7725df8aa1 sna/gen2,3: Remove gen-specific vertex_offset
Remove the duplication of vertex_offset in favour of the common
vertex_offset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-27 14:01:59 +00:00
Chris Wilson 46af1ff126 sna/gen6+: Tidy up ring preferences
Remove a few duplicated tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-27 10:16:05 +00:00
Chris Wilson dd5b653aa2 sna: Do not try and set a 0x0 mode
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-27 09:56:47 +00:00
Chris Wilson 861c2362dd sna/gen6+: Tweak to only consider active ring on destination
Otherwise we decide to use BLT when hitting the render/sampler cache
is preferrable for a source bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-26 15:54:08 +00:00
Chris Wilson f9b6aa3aaf sna: Explicitly track self-relocation entries
Avoid having to walk the full relocation array for the few entries that
need to be updated for the batch buffer offset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-26 13:05:52 +00:00
Chris Wilson 90b1b220ee 2.20.17 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-26 12:51:58 +00:00
Chris Wilson 52fd223fc9 sna/video: Initialise alignment for video ports > 0
We repeatedly set the alignment value on the first port, rather than
once for each.

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-21 21:36:30 +00:00
Chris Wilson 3793ccf780 sna: Remove assertions that the pixmap is wholly defined when uploading
As the user may only write to a portion of a pixmap (thus only creating
a small amount of damage) and then attempt to use the whole as a source,
we run the risk of triggering an assertion that the whole was defined.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 14:48:07 +00:00
Chris Wilson 07dde33a4f sna: Remove a pair of stale assertions
For gen2-5, it does not matter what mode the batch is in when we
insert the scanline wait. With the more aggressive batch flushing, and
relaxed assigned of mode for those generations, we are likely to see
that the batch is idle when we go to insert the waits.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 14:35:32 +00:00
Chris Wilson bdd0cca4e1 sna: Refactor test for a rotation matrix
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 14:20:23 +00:00
Chris Wilson 347c5a7b33 sna/dri: Refactor get_current_msc between blit/flip paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 10:40:47 +00:00
Chris Wilson 8a67d3f808 sna/dri: Set the correct current_msc for the no readback path
If we are asked to render immediately, then in order to pass the tests
when comparing it to target, we need to set the current_msc to the
ultimate future value, -1.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 10:23:40 +00:00
Chris Wilson 48e4dc4bd4 sna/gen4: Backport tight vertex packing of renderblits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 09:46:18 +00:00
Chris Wilson 08d2b07369 sna/gen4: Backport more recent state tracking tweaks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 09:46:18 +00:00
Chris Wilson 8ff76fad1f sna/gen5: Backport tight vertex packing for simple renderblits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 09:46:18 +00:00
Chris Wilson 9144c95191 sna/dri: Avoid querying the current-msc with swapbbufers wait disabled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21 09:46:18 +00:00
Chris Wilson 84c327e17f sna/video: Assert that the frame is initialised
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 19:44:46 +00:00
Chris Wilson 4d75021992 uxa/dri: Correct the destination of the blit after chained flip is broken
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 19:34:41 +00:00
Chris Wilson ca5c028c2b glamor: Release the drawable after passing to glamor_push_pixels
An unlikely path, but a double prepare instead of a prepare/finish.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 19:31:44 +00:00
Chris Wilson de2de36049 sna: Check the correct variable for a failed allocation
Having already checked 'dst' and just allocated 'src', that is who we
should be checking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 19:29:31 +00:00
Chris Wilson deb908fda7 intel: ODEV_ATTRIB_PATH is no longer printed, so kill the temporary variable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-20 19:22:32 +00:00
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