Commit Graph

6392 Commits

Author SHA1 Message Date
Chris Wilson 0ec2f3a8ba sna: Spawn threads to composite trapezoids inplace
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 23:41:07 +00:00
Chris Wilson 427b7311fe sna: Perform the last threaded composite operation directly
The point of the refactor was to execute the last stage of the composite
in the master thread, so do so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 22:25:46 +00:00
Chris Wilson 326dcd75f2 sna: Parse cpuinfo to determine the actual number of physical cores/caches
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 21:13:47 +00:00
Chris Wilson f597b64718 sna: Tidy construction of data for threaded composite
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 19:13:34 +00:00
Chris Wilson 1643c97f8f sna: Use threads for simple mask generation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 19:13:34 +00:00
Chris Wilson d60128c55e sna/dri: Compensate clipExtents for drawable offset
The clipExtents is in screen coordinates whereas we just want to confirm
that the maximum pixel to be copied lies with the DRI2 buffer, which is
relative to the drawable.

Reported-by: Matthieu Baerts <matttbe@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59806
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 15:38:06 +00:00
Chris Wilson 264b3b7250 sna: Refactor to use a common fbComposite fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 15:25:44 +00:00
Chris Wilson 8ecfbea9d1 sna: Experiment with a threaded renderer for fallback compositing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24 15:25:16 +00:00
Chris Wilson 778dba90cf sna/dri: Don't contribute missed frames to the target_msc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 21:33:31 +00:00
Chris Wilson 50b41cb485 sna/dri: Only reject DRI2 buffers that are too small for the request blit
The goal is to reject stale DRI2 buffers that are smaller than the
target due to not-yet-handled ConfigureNotify, but not to reject
blitting from Windows that are larger than the frontbuffer.

Fixes a regression from the overzealous
commit b27ecf3059
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Nov 12 14:06:06 2012 +0000

    sna/dri: Prevent scheduling a swap on stale buffers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 21:21:42 +00:00
Chris Wilson 98b312e579 sna/dri: Stop feeding I915_TILING_Y to mesa i915c
Only i915g handles Y-tiling, and we can't differentiate between the two
types of clients.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 20:55:09 +00:00
Chris Wilson 3179640091 sna: Clean up WAIT_FOR_EVENT on gen2/3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 19:37:23 +00:00
Chris Wilson ea8148b24d sna/dri: Prefer to use the BLT ring for vsync'ed copies on IVB+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 18:02:18 +00:00
Chris Wilson 3c3a87a2d4 sna/gen6: Correct the event definition for secondary pipes for MI_WAIT_FOR_EVENT
It helps to wait upon the event we program and enable.

References: https://bugzilla.kernel.org/show_bug.cgi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 17:38:53 +00:00
Chris Wilson 88753c5a8c sna/gen7: Correct the event definition for secondary pipes for MI_WAIT_FOR_EVENT
It helps to wait upon the event we program and enable.

References: https://bugzilla.kernel.org/show_bug.cgi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 17:37:44 +00:00
Chris Wilson 2d92d8ec56 sna: Extend rectangular PolyLines to cover corner pixels on ccw paths
Reported-by: Joe Peterson <joe@skyrush.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55484
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-22 09:24:04 +00:00
Chris Wilson c8817e24a9 sna/gen7: Fix inversion of bool return code from CA pass
As we inverted the predicate, we no longer restored the original
operation after performing a CA pass - glyph would randomly become
white.

Reported-by: Jiri Slaby<jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-22 09:06:50 +00:00
Chris Wilson 10f549332e sna: Free a non-reusable bo if it expires on the flushing list
Still no sure just how the bo ends up there, but as there seems to be
the occasional malinger, just free it.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-21 16:48:34 +00:00
Chris Wilson d7f0df27ed sna: Use the maximum backlight value if we fail to read the current value
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-21 16:36:28 +00:00
Chris Wilson 46a3a68e60 sna: Assert that if marked as a scanout it is indeed bound.
On further review, the invariant must have been violated earlier, so
make the assert earlier.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-21 16:29:30 +00:00
Chris Wilson 0507d55dd1 sna: Only add bound scanouts to the scanout list
If we never used the bo as an actual scanout it will never have had been
moved to the uncached domain and so we can return it back to the system
cache.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-21 16:24:49 +00:00
Chris Wilson 5a0bc67ba5 sna: New execbuffer flags for lut-handle and fast-relocs are upstream
Now the flags are upstream, we can rely on runtime tests as the
interface is now frozen.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-21 11:41:38 +00:00
Chris Wilson 208ca91a31 sna/gen7: Place the vsync commands in the same cacheline
Do as told; both the LRI and WAIT_FOR_EVENT need to be in the same
cacheline for an unspecified reason.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 18:10:58 +00:00
Chris Wilson 9a3e3abfe9 sna/gen7: Offset start/end scanlines by one
The hardware needs to be programmed with the line before the desired
scanline, wrapping around as required.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 17:48:31 +00:00
Chris Wilson e6a64f872b sna/gen3+: Remove bogus assertion that the vbo in included before finish
If we are carrying over a nearly full vbo from one batch to the next, we
may indeed finish it prior to writing any new primitives and so the
assert is truly bogus.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 17:01:24 +00:00
Chris Wilson 5de919336f sna/gen6: Tweak programming scanline values
The documentation says that both start/end scanline need to be the line
before the desired value, and so to program the first scanline we need
to set it to the last scanline. The docs also say that the lower 3 bits
are ignored, so tweaked the values programmed accordingly with an extra
check that the window is not reduced to 0.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 16:39:11 +00:00
Chris Wilson 2f9ac4e8a1 sna/gen3+: And restore non-CA compositing state after the CA pass
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 15:53:32 +00:00
Chris Wilson 650c9d5ce8 sna/gen3+: Reset vertex relocation state after discarding the batch
Fixes a regression from commit a6ecb6d31d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jan 16 09:14:40 2013 +0000

    sna: Discard the batch if we are discarding the only buffer in it

as we may keep a stale relocation for the vertex buffer alive if we
attempt to clear the bo using the render engine before discarding it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 15:00:50 +00:00
Chris Wilson 492952e0d6 sna/gen3+: Handle flushing vbo for CA glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 14:55:06 +00:00
Chris Wilson b52c921204 sna: Adapt error detection and handling for invalid batchbuffers
Allow the DDX to continue even if the kernel rejects our batchbuffers by
disabling hw acceleration - just extends the existing hang detection to
also handle the driver producing garbage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 14:02:07 +00:00
Chris Wilson 8215a278f2 sna/gen3: Always close the vertices for a batch, even if the vbo is empty
In the case where we emit a no-op, we may not attempt to finish binding
the vbo as it is considered empty. This leaves a stray relocation for
the next batch, and also causes it to believe that it has a vbo bound
already.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 12:36:07 +00:00
Chris Wilson a88a9b9a59 2.20.19 release 2013-01-20 12:06:09 +00:00
Chris Wilson 7822bbacbe test: Add script to generate source file for testing vsync
Courtesy of an original script by Mark Schreiber,
https://bugs.freedesktop.org/show_bug.cgi?id=59606
2013-01-20 11:50:13 +00:00
Chris Wilson 9329d87559 sna: Make DEBUG_SYNC a configure option
As it is advisable to combined the synchronous rendering debug option
with other debugging options, it is more convenient to make it into a
configure option: --enable-debug=sync

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 10:15:30 +00:00
Chris Wilson c9263f192e sna: Apply DEBUG_SYNC prior to emitting error report
This is handy for the case where the batch triggers a GPU hang rather
than being rejected by the kernel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-20 01:39:12 +00:00
Chris Wilson 42ab789cce sna: Clear the non-intersecting damage after skipping the slave update
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-18 13:56:53 +00:00
Chris Wilson 828a3a80aa uxa: Clip dirty region to slave pixmap before appending damage
Fixes regression from

commit c789d06cf8
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Jan 7 13:57:21 2013 +1000

    intel: fixup damage posting to be done correctly around slave pixmap

which causes the entire slave scanout to be readback from uncached
memory every time a pixel is modified.

Reported-by: Stephen Liang <inteldriver@angrywalls.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59539
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-18 13:18:25 +00:00
Chris Wilson e17eaf540b sna: Replace double negative '!RegionNotEmpty' with the equivalent RegionNil
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-18 13:09:36 +00:00
Chris Wilson 2de43a0164 sna: Skip an empty slave update
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-18 12:01:54 +00:00
Chris Wilson 38de17f80d sna: Remove bogus assertion invalidated by 'read-read' sync
If we perform a read-read synchronisation, the kernel may still believe
that the bo is busy as it remains on the active lists being read by the
GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-18 10:16:42 +00:00
Chris Wilson 9f68ac60ae sna/dri: Explicitly flag sync copies for the backends
As gen6/7 need to prevent ring switching and perform a rendercopy if we
need to perform a vsync'ed copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 20:00:34 +00:00
Chris Wilson 1ee00c408d sna/trapezoids: Fix horizontal offset for inplace operation
Remember that for an inplace operation we are not dealing with an a8
mask, but rather a x8r8g8b8 surface and so need to step accordingly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 13:11:11 +00:00
Chris Wilson 0d749f93ea sna: Drop the MOVE_WHOLE_HINT for PutImage
It is not as clearly beneficial as for GetImage, as for example toolkits
may only push the shadows around a window.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 13:11:08 +00:00
Chris Wilson dc643ef753 sna: Apply read-only synchronization hints for move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 12:27:55 +00:00
Chris Wilson 18035a21e1 sna: Remove the confusion of the pixmap->undamaged
This was to track a pixmap that had been used for migration (i.e had in
the past been used for mixed rendering). It is no longer used so remove
it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 12:10:35 +00:00
Chris Wilson 46141d277f sna: Consider fill style for XPolyRectangle
The rectangle outline is not always solid...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 10:16:07 +00:00
Chris Wilson d5c8d38afa sna: Refactor to remove a goto from sna_put_zpixmap_blt()
The complexity of the function has been moved to move-to-cpu so we can
take further advantage of the simplified logic in put_zpixmap to clean
up the code by removing an unwanted goto.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 10:10:54 +00:00
Colin Walters 9552438caa autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:18:27 -05:00
Adam Jackson 87d773249a configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:18:23 -05:00
Chris Wilson dbf1cfec9c 2.20.18 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 12:20:48 +00:00