Commit Graph

6379 Commits

Author SHA1 Message Date
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
Chris Wilson 47caffc50b sna: Restrict upload buffers to reduce sampler TLB misses
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 11:10:03 +00:00
Chris Wilson ab36300a22 sna: Correct DBG to refer to the actual tiling mode forced
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:30:10 +00:00
Chris Wilson a6ecb6d31d sna: Discard the batch if we are discarding the only buffer in it
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:30:10 +00:00
Chris Wilson 26db2438e3 sna: Fix computation of large object sizes to prevent overflow
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:00:21 +00:00
Chris Wilson 54c1d97d5a sna: Add DBG for when we add the inplace hint
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 09:00:04 +00:00
Chris Wilson 588c5aa6bc sna: Revert use of a separate CAN_CREATE_SMALL flag
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-16 08:15:42 +00:00
Chris Wilson af85ffdec7 sna: Avoid serialising on an move-to-cpu for an async operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 23:02:18 +00:00
Chris Wilson d70be85dc7 sna: Assert that we never try to mix INPLACE / ASYNC hints for move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:09 +00:00
Chris Wilson 1287c3a24c sna: Specialise sna_get_image_blt for clears to avoid sync readback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson da4972eec5 sna/trapezoids: Avoid the multiply for an opaque source
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson 7f968c8c99 sna: Add DBG to use_shm_bo()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson af63fab504 sna: Hint that a copy from a SHM bo will likely be the last in a batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00
Chris Wilson 1be4364092 sna: Pass the async hint for the upload into the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15 22:24:08 +00:00