Commit Graph

5793 Commits

Author SHA1 Message Date
Chris Wilson 2559cfcc4c sna/gen4+: Specialise linear vertex emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02 11:52:58 +00:00
Chris Wilson 0996ed85fd sna/gen2+: Precompute the affine transformation scale factors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02 11:52:58 +00:00
Chris Wilson d36cae801f sna/gen4+: Tidy special handling of 2s2s vertex elements
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02 11:52:58 +00:00
Chris Wilson 8582c6f0bb sna/gen6+: Remove vestigial CC viewport state
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02 11:52:58 +00:00
Chris Wilson 24264af291 sna: Fast path inplace addition of solid trapezoids
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02 11:52:58 +00:00
Chris Wilson e9a9f9b029 sna: Micro-optimise glyph_valid()
Note that this requires fixing up the glyph->info if the xserver didn't
create a GlyphPicture.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-02 11:52:31 +00:00
Chris Wilson 372c14aae8 sna: Remove some obsolete Options
Throttling and delayed-flush are now redundant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-01 20:42:41 +00:00
Chris Wilson 65924da91d sna: Tidy compat interfaces
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-01 11:40:15 +00:00
Chris Wilson 0a35d92873 sna/gen2: Always try to use the BLT pipeline first
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-01 11:15:07 +00:00
Chris Wilson c1457fbd8a sna/gen2: Tidy a pair of vertex emitters
Switch to the new inline scaled transforms.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-01 10:49:27 +00:00
Chris Wilson 48a5797c0f sna/gen4: Tweak single-thread SF w/a for solids
Allow multiple threads for the rare case of compositing with a solid
color.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-31 17:51:00 +00:00
Chris Wilson e4f6ba6b47 sna/gen6+: Hint that we prefer to use the BLT with uncached scanouts
Once again balancing the trade-off of faster smaller copies with the BLT
versus the faster larger copies the RENDER ring.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-31 15:55:28 +00:00
Chris Wilson 6e87e7ddfe sna/dri: Use the default choice of backend for copying the region
Notably, if everything is idle, using the BLT is a win as we can emit
them so much faster than a rendercopy, and as the target is uncached we
do not benefit as much from the rendercache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-31 15:55:28 +00:00
Chris Wilson a7988bf77f sna/dri: Fix triple buffering to not penalise missed frames
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-31 15:55:28 +00:00
Chris Wilson 736b89504a uxa: Align surface allocations to even tile rows
Align surface sizes to an even number of tile rows to cater for sampler
prefetch. If we read beyond the last page we may catch the PTE in a
state of flux and trigger a GPU hang. Also detected by enabling invalid
PTE access checking.

References: https://bugs.freedesktop.org/show_bug.cgi?id=56916
References: https://bugs.freedesktop.org/show_bug.cgi?id=55984
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-30 10:36:05 +00:00
Chris Wilson 43336c632b sna: Seed the solid color cache with an invalid value to prevent false hits
After flushing, we *do* need to make sure we cannot hit a false lookup
via the last cache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 16:59:00 +00:00
Chris Wilson f605038209 sna/dri: Gracefully handle failures from pageflip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 16:41:03 +00:00
Chris Wilson 1c2ece3691 sna/gen4+: Try using the BLT before doing a tiled copy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 16:06:19 +00:00
Chris Wilson 09ca8feb34 sna: Move the primary color cache into the alpha cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 16:06:19 +00:00
Chris Wilson 8c56c9b1da sna: Allow a flush to occur before batching a flush-bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29 15:46:00 +00:00
Chris Wilson 2f53fb389c sna: DBG compile fixes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-28 22:58:02 +00:00
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 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 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