Commit Graph

5921 Commits

Author SHA1 Message Date
Chris Wilson 853beff430 sna/dri:Add some DBG and assertions to validate names passed back to clients
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-19 08:35:28 +01:00
Chris Wilson 8c1e60a154 sna: Add some asserts useful for tracking an xserver drawing bug
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18 15:01:52 +01:00
Chris Wilson cd23ac69ff sna/gen7: Add some ring switching sanity checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18 13:38:47 +01:00
Chris Wilson 22c84d02ad sna: Remove special casing of drawing depth=1 glyphs
It turns out that they were not so special after all, and the "fast
path" was missing the important handling such as validating the GC. As a
result we ended up trying to render the glyphs through a planemask of 0
and similar garbage resulting in corruption. An example given by Kaus
Dittrich was the use of rotated glyphs in gnuplot.

Reported-by: Klaus Dittrich
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18 13:38:47 +01:00
Chris Wilson 71fa350325 sna: Check that we do not keep a GPU bo around after flushing a ShmPixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18 13:38:47 +01:00
Chris Wilson 88502b32d5 2.20.8 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-16 09:02:46 +01:00
Chris Wilson 395d738b50 sna: Improve handling of probe failure during initialisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-15 21:18:14 +01:00
Chris Wilson fe78904a45 Add basic support for ValleyView
Bind to the ValleyView SDV for verifying the render routines.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 21:51:36 +01:00
Ian Stakenvicius 3b9259f7ce configure: Make udev dependency optional
In order to support buildbots where the udev headers may exist on the
build system but not the target, we need explicit control over optional
dependencies.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54942
2012-09-14 21:04:42 +01:00
Chris Wilson d995705fb0 sna: Only discard CPU damage if we completely overwrite its extents
If we are performing a clipped copy, then we must be careful not to
completely discard the CPU damage as it may not be entirely replaced.

Reported-by: Roman Jarosz <kedgedev@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54937
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 19:32:06 +01:00
Chris Wilson deacab87e4 sna/dri: flip->next_front.bo is owned by the DRI drawable not by the flip
Be careful not to delete the reference we presume we hold as it is
borrowed from the DRI drawable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 17:01:13 +01:00
Chris Wilson 5369408d59 sna/dri: And the hunt for the use-after-free continues...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 16:12:00 +01:00
Chris Wilson 8e9d642034 sna: Fix typo for sna_render_picture_flatten()
Pass it the correct value for the pixmap height, and not its 'y'
coordinate!

Reported-by: Eugene Rosenzweig <ugn@outlook.com>
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=434860
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 14:06:38 +01:00
Chris Wilson 6ee9969f0e sna/dri: Update AsyncSwap for recent changes in tracking DRI drawables
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 13:04:50 +01:00
Chris Wilson d2dbb99138 sna/dri: Add a bunch of assertions for hunting a use-after-free
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 13:04:14 +01:00
Chris Wilson d875609147 sna/dri: Version bump for prototypical AsyncSwap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 12:17:28 +01:00
Chris Wilson 0fc3d020f3 Skip adding unknown special modes
In light of the discussion on how to add stereo modes it was revealed
that we would happily add modes with unknown and unhandled strange
flags. Adam Jackson mentioned that he has plans to fix that with some
upcoming work, but as a first step we can simply eradicate them whilst
pondering how to support the stereoscopic vision of the future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14 10:00:45 +01:00
Chris Wilson 35d81d97b3 sna/gen7: Defensively program default GT values
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 22:47:32 +01:00
Chris Wilson 3fbdedbf9d sna: Fix analysis of source extents for BLT composite
After we have computed the source offset vector for the transformed
source bo, we need to use that with respect to the destination rectangle
to verify that the source sample is wholly within bounds.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 22:10:08 +01:00
Chris Wilson 6c7f998f7b sna: Fix BLT composite offset
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54868
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 20:41:23 +01:00
Chris Wilson 2575cd0d23 sna: Avoid corrupting the CPU bo when compositing fallback data through BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 20:08:37 +01:00
Chris Wilson 5781de2e5a sna/gen3: Tidy NO_COMPOSITE debugging
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 19:53:29 +01:00
Chris Wilson dd1432b2c0 sna: Do not attempt to change tiling if wedged
The caller will just have to live with the current tiling, which should
be fine in most cases, in other cases the gpu is wedged...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 19:47:29 +01:00
Chris Wilson 8c7dd2219f sna: Prefer to use indirect uploads for very small updates
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 17:14:23 +01:00
Chris Wilson d87a56ed17 sna: Teach sna_replace__xor() how to tile large uploads
This path is hit using eog+cairo-1.10 and a large image, e.g.
http://marsrovers.jpl.nasa.gov/gallery/press/opportunity/20120705a/PIA15689_Greeley_Pan_wDeck_L257F.jpg

Reported-by: Michael Laß <bevan@bi-co.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54808
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 09:57:30 +01:00
Chris Wilson 58a96f0f68 sna: Also remove bogus assertion from sna_replace__xor()
Like the assertion in sna_replace() this is now incorrect due to the
automatic flagging of large bo with flush.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 23:53:44 +01:00
Chris Wilson 6069e78238 sna: Keep a very small, short-lived cache of large buffers
As we now regularly retire and so discard the temporary large buffers,
we find them in short supply and ourselves wasting lots of time creating
and destroying the transient buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 16:24:25 +01:00
Chris Wilson 1e2a03ad19 sna: Propagate busyness when creating the proxy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 16:22:44 +01:00
Chris Wilson e28f5a2537 sna: Add some DBG as to why kgem_check_bo() flushes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 15:21:27 +01:00
Chris Wilson 1af1dae1fe sna: Ensure tiling upload buffers are trimmed to fit in the cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 15:20:49 +01:00
Chris Wilson e5f137807c sna: Avoid fallbacks to shadow pixels if FORCE_GPU is in effect
References: https://bugs.freedesktop.org/show_bug.cgi?id=54808
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 14:59:05 +01:00
Chris Wilson 0d17208a66 sna: Avoid readback inplace if the target is unmappable
We have to use the tiling indirect path, or else fail.

References: https://bugs.freedesktop.org/show_bug.cgi?id=54808
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 14:58:51 +01:00
Chris Wilson 4b4abdaae9 sna: Flush after operating on large buffers
As we know that such operations are likely to be slow and consume
precious GTT space, mark them as candidates for flushing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12 14:58:51 +01:00
Chris Wilson 15911f533d prime: Reorder probe messages so that the driver prefix is correct
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-11 14:59:53 +01:00
Chris Wilson bc73acbd4d uxa: Error out after failing to become DRM master during PreInit
As we set the card fd to -1 upon failure, the error here is
non-recoverable, so make sure it gets propagated and we abort loading
the intel ddx.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/962892
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10 18:55:04 +01:00
Chris Wilson b0d14071f7 sna: Workaround issue with global glyph privates and shared ZaphodHeads
Under ZaphodHeads we end up with multple screens accessing the common
sna_glyph_key and so cause conflicting updates and erroneous references
into the screen-local texture atlases.

Two approaches can be tried here. Transition to a screen-specific
private key introduced with xorg-1.13, or to move the glyph cache (and
the rest of the gpu state tracker) down into the device private rather
than screen private. This is neither of those, but a workaround to avoid
reusing the incorrect entries from shared screens.

Reported-by: Stephen Liang <inteldriver@angrywalls.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54707
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10 13:57:12 +01:00
Chris Wilson cfa0c6162b sna: Fixup possible_crtcs for ZaphodHeads
As the possible_crtcs is a bitmask of the available crtcs exposed to the
Xserver, we need to adjust it for the limited view given by Zaphod mode.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-10 10:52:12 +01:00
Chris Wilson 95c71d1626 NEWS: Fix version reference 'bugs since 2.20.6'!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-08 20:12:32 +01:00
Chris Wilson 0659711dfa 2.20.7 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-08 20:02:32 +01:00
Chris Wilson 2c8e48f814 sna: Remember that LineDoubleDash involves updating the GC between segments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 23:24:22 +01:00
Chris Wilson ed7b8db249 sna: Pass the hints down to the PolyPoint fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 22:15:56 +01:00
Chris Wilson 6c9df48fa8 sna: Fix PolyPoint fallback through a complex clip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 22:05:01 +01:00
Chris Wilson 7d76eb155e sna: First scan for a backlight associated with the device
The goal is to find the right interface in a multi-GPU system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 18:08:07 +01:00
Chris Wilson 2de7d2d815 sna/prime: Fixup attaching the randr14 scanout pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 16:58:18 +01:00
Chris Wilson 448808d8a4 prime: Allocate a GPU_SCREEN when not primary to fulfil the output sink role
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 14:37:38 +01:00
Chris Wilson 3dce661ef3 sna: And remember to update the ScreenPixmap after resize
Fixes the regression from the previous commit

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 13:55:46 +01:00
Chris Wilson 0c39c363d7 sna: Protect sna_crtc_resize() against early invocation with no RootWindow
If the outputs are resized very early on, in CreateScreenResources, then
we will not yet have created a RootWindow and so trying to change its
pixmap is a futile effort.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 13:09:17 +01:00
Chris Wilson d7879a5939 sna/dri: Fix the double-buffer pageflipping path
Notably, we need to remember to exchange the front/back buffers after
flipping!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 12:18:08 +01:00
Chris Wilson 2630c81937 sna/dri: Make sure we set the SCANOUT flag when creating bo for pageflips
In case we should be creating an untiled framebuffer, we need to make
sure we honour the scanout alignment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07 11:23:02 +01:00
Chris Wilson aeef03520f sna/prime: Correct the pinning flag when importing the prime bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06 11:46:53 +01:00