summaryrefslogtreecommitdiff
path: root/src/sna
AgeCommit message (Collapse)Author
2012-09-21sna: Use inplace X tiling for LLC uploadsChris Wilson
Based on a suggestion by Chad Versace (taken from a patch for mesa). This allows for a faster upload of pixel data through a ShmImage, or for complete replacement of a GPU bo. Using a modified version of x11perf to upload to a pixmap rather than scanout on an IVB i7-3720qm: Before: 40000000 trep @ 0.0007 msec (1410000.0/sec): ShmPutImage 10x10 square 4000000 trep @ 0.0110 msec ( 90700.0/sec): ShmPutImage 100x100 square 160000 trep @ 0.1689 msec ( 5920.0/sec): ShmPutImage 500x500 square After: 40000000 trep @ 0.0007 msec (1450000.0/sec): ShmPutImage 10x10 square 6000000 trep @ 0.0061 msec ( 164000.0/sec): ShmPutImage 100x100 square 400000 trep @ 0.1126 msec ( 8880.0/sec): ShmPutImage 500x500 square However, the real takeaway from this is that the overheads for ShmPutImage are substantial, only hitting around 70% expected efficiency, and overshadowed by PutImage, which for reference is 60000000 trep @ 0.0006 msec (1800000.0/sec): PutImage 10x10 square Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-20sna/gen3+: Trim the target extents to the CompositeClipChris Wilson
When computing the active region with of a composite operation with unknown extents we try to simply use the whole Drawable. However, this needs to be clipped otherwise it may trigger assertion failure with an offscreen pixmap. References: https://bugs.freedesktop.org/show_bug.cgi?id=55164 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-19sna/dri:Add some DBG and assertions to validate names passed back to clientsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18sna: Add some asserts useful for tracking an xserver drawing bugChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18sna/gen7: Add some ring switching sanity checksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-18sna: Remove special casing of drawing depth=1 glyphsChris Wilson
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-18sna: Check that we do not keep a GPU bo around after flushing a ShmPixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-15sna: Improve handling of probe failure during initialisationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14sna: Only discard CPU damage if we completely overwrite its extentsChris Wilson
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-14sna/dri: flip->next_front.bo is owned by the DRI drawable not by the flipChris Wilson
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-14sna/dri: And the hunt for the use-after-free continues...Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14sna: Fix typo for sna_render_picture_flatten()Chris Wilson
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-14sna/dri: Update AsyncSwap for recent changes in tracking DRI drawablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14sna/dri: Add a bunch of assertions for hunting a use-after-freeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14sna/dri: Version bump for prototypical AsyncSwapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-14Skip adding unknown special modesChris Wilson
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-13sna/gen7: Defensively program default GT valuesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna: Fix analysis of source extents for BLT compositeChris Wilson
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-13sna: Fix BLT composite offsetChris Wilson
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-13sna: Avoid corrupting the CPU bo when compositing fallback data through BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna/gen3: Tidy NO_COMPOSITE debuggingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna: Do not attempt to change tiling if wedgedChris Wilson
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-13sna: Prefer to use indirect uploads for very small updatesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13sna: Teach sna_replace__xor() how to tile large uploadsChris Wilson
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-12sna: Also remove bogus assertion from sna_replace__xor()Chris Wilson
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-12sna: Keep a very small, short-lived cache of large buffersChris Wilson
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-12sna: Propagate busyness when creating the proxyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12sna: Add some DBG as to why kgem_check_bo() flushesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12sna: Ensure tiling upload buffers are trimmed to fit in the cacheChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12sna: Avoid fallbacks to shadow pixels if FORCE_GPU is in effectChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=54808 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-12sna: Avoid readback inplace if the target is unmappableChris Wilson
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-12sna: Flush after operating on large buffersChris Wilson
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-10sna: Workaround issue with global glyph privates and shared ZaphodHeadsChris Wilson
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-10sna: Fixup possible_crtcs for ZaphodHeadsChris Wilson
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-07sna: Remember that LineDoubleDash involves updating the GC between segmentsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07sna: Pass the hints down to the PolyPoint fallbackChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07sna: Fix PolyPoint fallback through a complex clipChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07sna: First scan for a backlight associated with the deviceChris Wilson
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-07sna/prime: Fixup attaching the randr14 scanout pixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07sna: And remember to update the ScreenPixmap after resizeChris Wilson
Fixes the regression from the previous commit Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-07sna: Protect sna_crtc_resize() against early invocation with no RootWindowChris Wilson
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-07sna/dri: Fix the double-buffer pageflipping pathChris Wilson
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-07sna/dri: Make sure we set the SCANOUT flag when creating bo for pageflipsChris Wilson
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-06sna/prime: Correct the pinning flag when importing the prime boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06sna/prime: Distinguish forms of pinned pixmapChris Wilson
So that we can allow prime to replace the backing bo of currently exported pixmaps through DRI2. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06sna: Add is-pinned checks to changing the pitch on an existing boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06sna: Apply the minimum 256 pitch to CREATE_USAGE_SHARED pixmaps as wellChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06prime: Align pitch of shared untiled buffers to 256 bytesChris Wilson
In order for nvidia to handle the buffers we are currently generating, they need to have a pitch alignment of 256 bytes. Make it so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-06sna: Correct assertions for adding damage that bypasses the regionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-05Add PlatformProbe to handle sharing of device entitiesChris Wilson
Reported-by: Nick Bowler <nbowler@draconx.ca> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54561 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>