summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-03sna: Restart timer evaluations if the BlockHandler takes too longChris Wilson1-2/+5
Rather than passing a negative timeout to select, if we detect that we expired our timeout during the processing of the BlockHandler, restart. More worrying is that something in the BlockHandler took longer than 3ms to process. Reported-by: Felipe Contreras <felipe.contreras@gmail.com> Link: http://article.gmane.org/gmane.comp.freedesktop.xorg.devel/37388 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-02intel: Query platform fdChris Wilson1-1/+23
Under a compositor, we wish to use the pre-authorized fd passed to us by the host, stashed away in the platform device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-02intel: Pass the platform device along to the open routinesChris Wilson3-5/+25
This allows us to pass along more metadata along with the platform device in future. Currently we pass the device path, but in a hosted environment we should be passing along the authorized fd from the host. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-02configure: Error out if glamor request but UXA is disabledChris Wilson1-0/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-02sna: Only delete unused io buffersChris Wilson1-1/+1
Before deleting the io buffer, we need to check that it is not active. Currently we check that it is not pending use in the current batch, but we also need to double check that it does not have outstanding use by the GPU. Failing to do so could mean overwriting the data prior to it being read by the GPU, a very small race but often hit! Reported-by: Vedran Rodic <vrodic@gmail.com> # and many others Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66990 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-02sna: Add a few more asserts around handling of buffersChris Wilson1-1/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-01sna/trapezoids: Fix clipping on the far leftChris Wilson1-67/+61
Edges that extend past the left hand side of the clip box cannot simply be ignored (since they contribute to the scanline to their right, our region of interest) but they need to calculated separately rather than merged into the first cell. Reported-by: Pavel Ondračka <pavel.ondracka@email.cz> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69469 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-30sna: Honour Option "AccelMethod" "none"Chris Wilson1-1/+18
If the user requests that acceleration be disabled either through AccelMethod or NoAccel, do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-30sna: Only reduce Over to Src if the rects do not overlapChris Wilson1-1/+4
Similar to the previous commit, we have to allow overlapping OVER rectangles to be drawn one after another. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-30sna: Do not reduce overdrawn rectangles for XRenderCompositeRectsChris Wilson1-82/+100
The specification is that each is drawn in sequence (so over top of earlier rectangles), so do not cheat by using the computed region. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66313 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-30sna: Unmap cow bo when recreating the source boChris Wilson1-0/+4
When we destroy the original source and copy it to a new bo, we also need to make sure that any mappings of the original bo in the clones are undone. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-30sna/gen3: Tidy up fallback handling from fill-boxesChris Wilson1-7/+14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Use the bo allocation cache for converting buffersChris Wilson1-1/+5
Since we have a malloc cache for the bo, we may as well use it when converting from an upload buffer to a bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Whitespace fixesChris Wilson1-3/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Apply the non-relaxed fencing partial paranoia everywhereChris Wilson3-8/+9
This is required to ensure that the tiled offsets are tile-row aligned. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1232546 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna/video: The sprite framebuffer also encodes its formatChris Wilson2-2/+4
So we need to check whether the cached framebuffer matches the requested format, or else recreate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Resize an existing framebuffer if possibleChris Wilson1-2/+45
Sometimes we may have a compatible scanout cached, but of the wrong size. Instead of throwing away the memory and creating a new scanout from scratch, allow us to just resize the old scanout by destroying and recreating its associated framebuffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna/video: Don't allow caching of yuv scanoutsChris Wilson1-0/+5
We only want scanouts capable of being used for the front buffer in our cache, so make sure that YUV formatted fb are destroyed upon release. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna/video: Discard old video buffers when the frame size changesChris Wilson2-0/+10
Back in the good old days of the overlay, we only needed to care about having a frame buffer large enough to hold the data. This changed with the sprite interface which encodes the width x height into the framebuffer and so we need to be careful when handing back a cached buffer that it does indeed match the required dimensions. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-282.99.903 snapshot2.99.903Chris Wilson2-1/+39
2013-09-28sna: Avoid reads from a GTT mmapped upload bufferChris Wilson1-1/+1
We now allow LLC machines to also use GTT upload buffers, so we need to be cache when scanning the cache to look for suitable buffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-28sna: OsSigHandler expects 0 on handledChris Wilson1-1/+1
Returning 0 from sigtrap_handler() when we wish to fallback to the core OsSigHandler was precisely the wrong thing to do. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Fix regression in picture extractionChris Wilson3-9/+14
This is a little helper function, that just returns a bool, not the error code used by the render backends. Instead the caller tries an alternative method of extraction before giving up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Only flush the scanout if we successfully upload it to the GPUChris Wilson1-3/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Make sure we do not try to upload indirectly if the GPU is wedgedChris Wilson1-0/+3
Otherwise we trigger assertions and may end up with corruption. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Disable the promotion of large bo as flushChris Wilson1-7/+0
We can rely on our aperture and idleness tracking to appropriate flush batches. Marking the large bo as flush interferes with the treatment of flush for externally named bo, such as DRI/PRIME. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Catch SIGBUS to prevent X deathChris Wilson10-433/+653
We know that when we access either a CPU or GTT mmap we are vulernable to receiving a SIGBUS. In fact, we can catch these and abort the operation preventing X and all of its clients from randomly dieing. This helps for instance if you try and use a 1GiB frontbuffer on a 2GiB machine... For complete protection, we also need to catch signals for all GTT maps, such as VBO and staging buffers. (TBD) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Mark all large cached buffers as purgeableChris Wilson1-2/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Make sure the transformed CRTC box is clipped correctly.Chris Wilson1-10/+21
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Trigger fallback after intermediate pixmap allocation failureChris Wilson2-19/+40
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna/gen4+: Handle very large copies more gracefullyChris Wilson4-16/+24
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: In desperation, query the actual available aperture spaceChris Wilson1-5/+45
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Drop the REPLACES hint for a pinned target boChris Wilson1-0/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Simplify the clearing of a transformed frontbufferChris Wilson1-1/+13
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Remove a bogus assertChris Wilson1-1/+0
We keep active/inactive scanouts in the same cache, so drop the assert that they are all inactive - as it is handled a couple of lines later! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Eliminate a DBG compile warn for 32-bit buildsChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Promote self-copies to the GPUChris Wilson1-2/+10
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Micro-optimise copiesChris Wilson1-2/+2
Defer the read of the fExpose bit until we need it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Check that the bo exists before attempting to undo itChris Wilson3-1/+3
Fixes a NULL dereference from sna_blt_composite(). Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1228677 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Add a few more asserts around tracking of bo->exec vs bo->requestChris Wilson1-2/+13
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna/gen[35]: Remove dead code for choosing between BLT/render compositeChris Wilson2-75/+0
For these gen, we always want to use BLT where possible - even if it incurs a context switch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna/gen6+: Fallback to BLT composite if fallback is forcedChris Wilson2-2/+14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Clear CPU damage when uploading partial images inplaceChris Wilson1-10/+24
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Add some DBG for early flushesChris Wilson1-8/+26
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Separate out copy preferrence from operating in place decisionChris Wilson1-51/+72
The two decision trees are no longer identical. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23sna/dri: Prevent a NULL dereference in a DBG msgChris Wilson1-8/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23sna/dri: Clear the clear hint upon applying DRI damageChris Wilson1-0/+2
Otherwise a later call to GetImage will not notice the DRI update if it was already clear - and so return a blank image. One example is the use of x11vnc replaying xbmc. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69730 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23sna: Check OPTION_PREFERRED_MODE rather than M_T_USERPREFChris Wilson1-14/+20
During the intial KMS probe, we do not yet have the list of output modes, and in particular do not have the list of user preferred modes. So, in order to honour the user preferrence, we need to query for any preferred mode on the output from the option list. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=841696
2013-09-23sna/video: Add always-on-top to the list of Xv attributesChris Wilson2-1/+3
Otherwise it goes unknown, and not reported by xvinfo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23sna: Fix cast from u64 to pointer for 32-bit hostsChris Wilson1-1/+1
Missing chunk from commit 42330fbae862cda9ca17ec62eb0d2e4fb86032b8 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Sep 22 14:39:57 2013 +0100 sna: Track CPU/GTT maps independently Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>