Commit Graph

4141 Commits

Author SHA1 Message Date
Chris Wilson d8f2e87473 sna/render: Fix check for "migrate whole pixmap"
The whole pixmap means the sample covers the full width and height, not
just either!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-29 14:14:23 +00:00
Chris Wilson 20e5791408 sna: Fix assertion around flushing of mmap(PROT_READ)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-29 10:59:20 +00:00
Chris Wilson 56155c91af sna/gen6: Set the batch mode prior to checking limits and flushing
If we change contexts, then we will submit the batch obsoleting the
earlier resource checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-29 10:27:18 +00:00
Chris Wilson 5b1e9e1573 sna: Always reduce tiling for thin pixmaps
Benchmarking on the current code base, says this is now a win. A
reversal of older benchmarks, so expect further tuning.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-28 22:01:00 +00:00
Chris Wilson dacb301c05 sna: Use the correct pitch when creating an untiled active buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-28 20:39:51 +00:00
Chris Wilson 8657128fa7 sna: Pass the pixmap to sna_replace()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-28 18:59:50 +00:00
Chris Wilson 4e38d22105 sna: Tidy kgem_choose_tiling()
Reduce the calls to compute the surface size down to one.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-28 18:59:50 +00:00
Chris Wilson 04f47e52da sna: Don't try to guess when the kernel believes a buffer to be flushed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-28 18:22:48 +00:00
Chris Wilson d87c332653 sna: Eliminate empty glyphs during format conversion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 10:18:35 +00:00
Chris Wilson 413776c79e sna: Use 64-bit mov (when available) for bitmap glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 10:18:35 +00:00
Chris Wilson 507f99eba2 sna/gen6+: Only use BLT if the untiled bo will cause per-pixel TLB misses
i.e. only force the BLT if using the sampler is going to be incredibly
slow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 09:04:10 +00:00
Chris Wilson f11e9f1891 sna: Only check for all-damaged CPU bo if we may discard the GPU bo
The goal of the optimisation is to discard the GPU bo early, so we
can skip the extra damage reduction if there is no gpu bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 09:04:10 +00:00
Chris Wilson ccee730e45 sna: Discard the gpu-bo is the entire pixmap is written to by the CPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 09:04:10 +00:00
Chris Wilson df68b20a17 sna: Disabling tiling if the bo would be smaller than a page
Once again experiment with untiled smalled buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 09:04:10 +00:00
Chris Wilson d88ad2e60a sna: Round up stride to alignment for TLB miss checking
We want to avoid the condition of reducing the tiling mode (when reusing
an active untiled buffer in preference to creating a new) for a wide buffer
when doing will force a TLB miss on each sample.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-27 09:04:09 +00:00
Chris Wilson 16f5e224dc sna: Avoid the double application of drawable offsets for tiled spans
As we handle tiled spans indirectly, we need to avoid applying the
drawable offsets twice (once in the mi layer generating the spans, and
then once more in the tiled rect renderer).

Reported-by: Ulrich Müller <ulm@gentoo.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43245
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25 16:21:41 +00:00
Chris Wilson e06789871b sna/gen5+: Prefer using the BLT when either src or dst is untiled
The cost of the TLB miss on every sample far outweighs the impact of the
context (and ring) switch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25 15:53:29 +00:00
Chris Wilson d0cce0da71 sna/gen5: Use the same prefer_blt_fill() switch for fill-one
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25 13:16:37 +00:00
Chris Wilson 7ad2d3b695 sna/gen2: Wire up NO_COMPOSITE for debugging
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25 09:44:21 +00:00
Chris Wilson 394ad51c42 sna/video: Check for Xv presence in the server before initialising
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 22:04:50 +00:00
Chris Wilson a2fab9560e sna: Downgrade Y-tiling if we must use the BLT
There are many operations, usually the core drawing acceleration, where
the BLT is much more preferable than using the CPU. However, the BLT is
limited to only using X-tiling, so if we encounter a Y-tiled pixmap
target we need to recreate it as X-tiling before proceeding. Hopefully,
the pixmap is then kept around and rendered multiple times to amoritize
the cost of the copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 22:04:50 +00:00
Chris Wilson e0a4492c8b sna: Use Y-tiling for source pixmaps
Y-tiling is slightly faster with RENDER operations, so attempt to
allocate source-only pixmaps using this tiling mode. Actually using
Y-tiling is a delicate balance because it then prevents the use of the
BLT. For instance, enabling Y-tiling by default gives a 30% performance
improvement on the fish-demo (compositing benchmark) at 2560x1440 on
Ironlake but regresses tiger-demo by 2x (spans benchmark).

So experiment with this compromise and allow for changing the default
tiling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 22:04:48 +00:00
Chris Wilson 7e4a1b7ed2 src/sna/gen5: Replace the precompiled shaders
Take advantage of a couple of new instructions introduced with Cantiga
to reduce the instruction count inside the shaders and improve
performance by around 10% in the fish-demo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 18:24:37 +00:00
Chris Wilson 67ea8808d7 sna/gen5: Remove the unused SIP
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 12:57:36 +00:00
Chris Wilson 499ed74e97 sna: Tweak cancellation of deferred flush
The goal is to keep running until the tick after every stops,
irrespective of forced flushes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 11:02:01 +00:00
Chris Wilson 35239d207c sna: Always call retire following a mmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 10:40:33 +00:00
Chris Wilson 11e0b456de sna/gen5: Use the BLT rather than flush when copying
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 10:40:33 +00:00
Chris Wilson a44663af93 sna/gen4,gen5: Fix typo and only emit a flush if the video source is dirty
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-24 03:04:53 +00:00
Chris Wilson 4a27dd287c uxa: Make the glamor/uxa transition more verbose
And so hopefully make it clearer. In the process we restore the flushing
behaviour for UXA back to before the glamor intervention.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-21 13:02:34 +00:00
Chris Wilson b0d64a9567 sna: Correct end-point adjustment for stippling PolySegment
Reported-by: Roman Jarosz <kedgedev@gmail.com>
Reported-by: da_fox@mad.scientist.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43134
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-21 11:54:59 +00:00
Chris Wilson a5353a7c1d sna/gen4: Use the special composite rect emission for fill_one()
In order to workaround a bug in the shaders on gen4, we need to flush
the pipeline after every rectangle. The recently introduced fill-one
mechanism for gen4, missed this vital step triggering a random hang with
an otherwise sane batchbuffer (the missing flush is hard to spot!).

Fixes regression from 86f99379ee (sna/gen4: Add fill-one).

Reported-by: Albert Damen <albrt@gmx.net>
Reported-by: Fryderyk Dziarmagowski <fdziarmagowski@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43083
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-21 10:58:17 +00:00
Chris Wilson 3b9479dc39 sna: Micro-optimise sna_push_pixels_solid_blt()
Unroll the byte reversal as we know the row length is word aligned.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-19 19:12:31 +00:00
Chris Wilson 297f7680cf sna: Avoid the NULL damage deref
Fixes x11perf -wdcircle100 -time 1 -repeat 1 -rop GXxor

Reported-by: Fryderyk Dziarmagowski <fdziarmagowski@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43084
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-19 16:11:42 +00:00
Chris Wilson 4a86ec5ddb sna/gen7: Apply recent SNB tuning as applicable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-19 08:34:59 +00:00
Chris Wilson fe944d61d5 sna/gen7: Correct shifts for surface state
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-19 08:34:59 +00:00
Chris Wilson 70042400fd sna/gen7: minor tidy of redundant defines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-18 23:47:10 +00:00
Chris Wilson f938cd1599 glamor: Include glamor cflags and libs for atypical builds
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-17 13:43:37 +00:00
Zhigang Gong eb6148a36a uxa/glamor: Turn on glamor for fill spans and rects
This commit only enables two glamor functions for
uxa_fill_spans and uxa_poly_fill_rects.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-17 01:10:21 +00:00
Zhigang Gong fbabe60f48 glamor: Initial commit to introduce glamor acceleration.
Added one configuration option --enable-glamor to control
whether use glamor. Added one new file intel_glamor.c to
wrap glamor egl API for intel driver's usage.
This commit doesn't really change the driver's control path.
It just adds necessary files for glamor and change some
configuration.

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-17 01:10:21 +00:00
Zhigang Gong c4c2eb1fae uxa/glamor: Introduce additional access modes to wrap glamor acceleration
Integrate glamor acceleration into UXA framework. Add
necessary flushing at the following points:

1. Flush UXA batch buffer before call into glamor.
2. Flush GL operations after return from a glamor function.
3. The point we need to flush UXA batch buffer, we also
   need to flush GL operations, for example, in
   intel_flush_callback and couple of places in intel_display.c.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 23:57:57 +00:00
Chris Wilson ac7df2919b Revert "Disable adding normal RTF modes for an eDP"
This reverts commit 212fa98687.

The underlying register programming for eDP is now believed to be fixed
as of linux-3.1.

References: https://bugs.freedesktop.org/show_bug.cgi?id=38012
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41070
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 23:29:39 +00:00
Chris Wilson 24ece4a87e configure: Version bump for 2.17.0 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 23:14:25 +00:00
Chris Wilson 14b3176962 NEWS: Release notes for 2.17.0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 23:13:44 +00:00
Chris Wilson c259144e3f sna: The block handler is passed an indirect pointer to the timeval
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 22:15:39 +00:00
Chris Wilson bfd2bb4027 sna: Correct dependencies for DRI2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 22:15:39 +00:00
Chris Wilson 3771387ad1 Compile out UXA if so desired
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 22:15:39 +00:00
Chris Wilson edbeab8c4e sna: Reduce and clarify dependencies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 22:15:39 +00:00
Chris Wilson 78d4e99fc9 sna: And keep unity happy
Rewrite the DRI layer to avoid the various bugs and shortcomings of the
Xserver and interfacing with mesa.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38732
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39044
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-16 22:14:15 +00:00
Chris Wilson aac022cbb3 sna: Optimise single pixel transfers
Surprisingly frequent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-14 19:49:29 +00:00
Chris Wilson 5647e2981d sna/damage: Always reduce damage for testing PIXMAN_REGION_OUT
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=42414
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-14 14:13:10 +00:00