Commit Graph

5554 Commits

Author SHA1 Message Date
Chris Wilson 4bcab83bbd i810: DRI is not dependent upon XAA
The blit routines is uses are independent of the XAA driver interface
and can be used separately.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 22:21:22 +01:00
Chris Wilson 558c825129 sna/gen4+: Drop unsupported source formats
Once again I've confused existence of the enum with the ability of the
sampler to read that format.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 22:00:30 +01:00
Chris Wilson 9f3b3098c9 sna/dri: Allow DRI2 to be loaded even if we are wedged
Just because the GPU is spitting EIO at us does not necessarily imply
that a DRI client will also suffer. Spit out a warning for later bug
reporting and let them find out for themselves!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 21:42:51 +01:00
Chris Wilson 15b7191fd3 sna/gen6: Micro-optimise render copy emission
Backport of the changes made for IVB.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 21:36:26 +01:00
Chris Wilson 4eea9ac003 sna/gen7: Micro-optimise render copy emission
The goal is bring the overhead down to that of using the blitter. Tricky
given the number of steps to using the 3D pipeline compared to the
BLT...

A stretch goal would be to make IVB GPU bound for -copywinpix10!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 21:36:26 +01:00
Chris Wilson 267429bbb1 sna: Enable runtime detection of set-cacheing ioctl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 21:36:26 +01:00
Chris Wilson c0b3674d04 sna/trapezoids: Only reduce bounded operators to a single pass
Only for a few operators can we replace the opacity mask by
premultiplying into the source.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 21:36:26 +01:00
Chris Wilson bb0303677c sna/trapezoids: Use pixman from within the spans to reduce two-pass operations
Reduce the two pass CompositeTrapezoids if we can perform the operation
inplace by calling pixman_image_composite from the span. This step
enables this for xrgb32.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 10:44:35 +01:00
Chris Wilson bee1a14618 sna: Fix processing of the last fallback box
The evil typo caused us to misalign the clip boxes and run over a
garbage array on 64-bit builds.

Reported-by: Edward Sheldrake <ejsheldrake@gmail.com>
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52163
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 09:40:09 +01:00
Chris Wilson 88cb1968b6 sna: Add more DBG for fallback processing
Hunting the lost box...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 09:41:24 +01:00
Chris Wilson 36f2e46619 sna: Reuse the snoopable cache more frequently for upload buffers
Now that we are keeping a small cache of snoopable buffers, experiment
with using them for uploads more frequently.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 09:41:24 +01:00
Chris Wilson 73f07abbd2 sna: Maintain a short-lived cache of snoopable CPU bo for older gen
Once again, we find that frequent buffer creation and manipulation of the
GTT is a painful experience leading to noticeable and frequent application
stalls. So mitigate the need for fresh pages by keeping a small stash of
recently freed and inactive bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-18 09:41:24 +01:00
Chris Wilson 77520641a3 i810: Replace XAAGet.*ROP() with local tables
The XAAGetPatternROP() and XAAGetCopyROP() functions were removed along
with the rest of XAA so we need to implement those tables locally.

Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 22:12:49 +01:00
Chris Wilson caef63e026 i810: Split xaa routines from common acceleration methods
Some of the routines in i810_accel.c are specific to XAA whilst others
are used elsewhere, for example in i810_dri.c. Therefore we have to be
selective over which ones we compile out without xaa.

Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 21:37:28 +01:00
Chris Wilson 53ff19f45a sna: Allow wedged CopyPlane to operate inplace on the destination
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 19:49:43 +01:00
Chris Wilson d4fa4d5494 sna: Allow inplace copies for wedged CopyArea
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 19:49:37 +01:00
Chris Wilson 217eeadf81 sna: Allow operation inplace to scanout whilst wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 19:40:51 +01:00
Chris Wilson 40ff29480a sna: Tweak fast blt path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 18:45:28 +01:00
Chris Wilson fce69c79c4 sna: prefer fbBlt over pixman_blt
It is currently much better optimised through memcpy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 18:43:31 +01:00
Chris Wilson c29f96d508 sna/gen7: Bump the number of pixel shader threads for IVB GT2
Spotted-by: Kilarski, Bernard R" <bernard.r.kilarski@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 17:29:21 +01:00
Chris Wilson 799bae9e8f sna/dri: Do not allow an exchange to take place on invalid buffers
If the SwapBuffers is called after we have resized a Window but before
the client has processed the Invalidate notification, then the
SwapBuffers will be referring to a pair of stale buffers. As the buffers
are no longer attached to the Pixmap, we can not simply exchange them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 17:29:21 +01:00
Chris Wilson 067aeaddb8 sna: Rebalance choice of GPU vs CPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 17:29:21 +01:00
Chris Wilson 7ebeea3f5c sna: Avoid the CPU bo readback for render paths
As we exclude using the CPU bo if there is overlapping GPU damage, we
can forgo the call to keep the transfer the damage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 17:29:11 +01:00
Chris Wilson ed8c729ed0 sna: Catch the short-circuit path for clearing clear on move-to-gpu as well
I thought the short-circuit path was only taken when already clear, I
was wrong.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 11:21:59 +01:00
Chris Wilson 359b9cc82d sna: Limit the use of snoopable buffers to read/write uploads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 10:26:27 +01:00
Chris Wilson 4f21dba6ee sna: Only drop the clear flag when writing to the GPU pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 09:26:46 +01:00
Chris Wilson fbfbbee828 sna: Fix glyph DBG to include clip extents and actual glyph origin
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 09:20:21 +01:00
Chris Wilson f0ed0ca234 sna: Promote an undamaged pixmap to use the full GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-17 08:35:20 +01:00
Chris Wilson 1f79e877fb sna: Share the pixmap migration decision with the BLT composite routines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 23:48:10 +01:00
Chris Wilson d141a2d590 sna: Disable snoopable bo for gen4
Further inspection reveals that whilst it may not hang the GPU, the
results are not pleasant or complete.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 23:27:32 +01:00
Chris Wilson 107feed2a4 sna: Disable snoopable uplaod buffers for gen4
The sampler really does not like using snoopable buffers...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 18:58:30 +01:00
Chris Wilson 818c21165c sna: Fixup pixmap validation for sna_copy_area()
Remember to offset the box by the drawable deltas in order to
compensate for compositing.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=52142
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 16:28:00 +01:00
Chris Wilson 623d84bed7 Wrap defines to avoid redefinition warnings
Currently this only catches out ARRAY_SIZE, but wrap the other common
defines for consistency.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 16:07:37 +01:00
Chris Wilson 907a2a7c97 sna/trapezoids: Fix inplace unaligned fills (on gen4)
Reported-by: Sergio Callegari <sergio.callegari@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52150
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 14:49:45 +01:00
Chris Wilson 6ce2f40249 sna/trapezoids: Add some DBG to unaligned fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 14:46:39 +01:00
Chris Wilson 2721214868 sna: Move the disabling of CPU bo for gen4 to the render unit
They appear to work fine with the BLT and only seem to cause issues when
used with the sammpler. So enable them for accelerated uploads and
downloads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 13:52:39 +01:00
Chris Wilson 0777b146bf sna: Use set-cache-level to allocate snoopable upload buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 13:49:39 +01:00
Chris Wilson 33443f7ee4 sna: Add a couple of DBG options to control accelerated up/downloads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 12:51:54 +01:00
Chris Wilson 9240602938 sna: Discard and recreate the CPU buffer when busy during move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 12:30:44 +01:00
Chris Wilson 7024ef771f sna: Add a few DBG to show when CPU bos are being used for xfer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 12:30:43 +01:00
Chris Wilson c564414157 sna: Disable the scanout flush when switch off via DPMS
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 12:17:40 +01:00
Chris Wilson 536e7ab756 intel: Don't use stdbool without declaring it
Reported-by: Fabio Pedretti <fabio.ped@libero.it>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-16 12:17:40 +01:00
Chris Wilson 0c32be15b0 uxa: Remove Shadow hack
This was an incomplete hack so deprecate in favour of Shadow-on-Steriods,
SNA.

References: https://bugs.freedesktop.org/show_bug.cgi?id=47324
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-15 20:56:58 +01:00
Chris Wilson 6a18a0936e configure: version bump for 2.20.0 release
The day SNA hits mainstream...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-15 20:26:30 +01:00
Chris Wilson 6fa059330d sna: Avoid creating a CPU bo for uploads if we already have a large GPU bo
And vice-versa if already have a large CPU bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-15 15:14:47 +01:00
Chris Wilson a253c95ec6 sna: Prefer uploads to be staged in snoopable bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-15 15:13:23 +01:00
Chris Wilson ef6d94a844 sna: Simply reverse all the boxes if dx <= 0 and dy <= 0
In this fairly common case, avoid both the double pass and use a simpler
algorithm as we can simply reverse the order of the boxes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-15 11:46:53 +01:00
Chris Wilson 6601a943ff sna: Keep track of the base pointer for the reordered boxes
So that we avoid freeing an invalid pointer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-15 11:39:56 +01:00
Chris Wilson ef34d5cf41 sna: Make sure we check for a busy CPU bo before declaring is-cpu
Even if the pixmap is entirely damaged on the CPU, we still may be in
the process of transferring it and so cause an unwanted stall.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14 23:25:17 +01:00
Chris Wilson 0e397e4a1d sna/glyphs: Perform the fallback mask reduce before moving the glyph pointers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14 21:36:45 +01:00