summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2013-10-03intel: Remove dependence upon having PciInfoChris Wilson
After some probing mechanisms, we may end up with a valid device without knowing its PCI address a priori. Having a valid device, we can just query it for the correct device id, and can safely abort any path that requires PCI information that we don't have. (Those paths are not valid under such hosting anyway - if it may be required, we could reconstruct the address.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-03intel: And restore PlatformProbe to working orderChris Wilson
In the saga of the untested WIP patches for hosted device probing, was the failure in logic to detect a valid device during probing. Yikes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-03intel: Querying device attributes must be non-NULLChris Wilson
Check first for a NULL platform device before querying the attributes or else suffer a segfault during PCI probing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-03intel: Fix fallout from accident push of ODEV_ATTRIB_FDChris Wilson
This is WIP for passing along a hosted fd. It wasn't meant to be pushed along with the bug fix this morning. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-03sna: Restart timer evaluations if the BlockHandler takes too longChris Wilson
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 Wilson
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 Wilson
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-02sna: Only delete unused io buffersChris Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-01sna/trapezoids: Fix clipping on the far leftChris Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Use the bo allocation cache for converting buffersChris Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-29sna: Apply the non-relaxed fencing partial paranoia everywhereChris Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
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-28sna: Avoid reads from a GTT mmapped upload bufferChris Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Make sure the transformed CRTC box is clipped correctly.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: Trigger fallback after intermediate pixmap allocation failureChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna/gen4+: Handle very large copies more gracefullyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-27sna: In desperation, query the actual available aperture spaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Drop the REPLACES hint for a pinned target boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Simplify the clearing of a transformed frontbufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-26sna: Remove a bogus assertChris Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Promote self-copies to the GPUChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Micro-optimise copiesChris Wilson
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 Wilson
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 Wilson
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 Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Clear CPU damage when uploading partial images inplaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Add some DBG for early flushesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-25sna: Separate out copy preferrence from operating in place decisionChris Wilson
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 Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23sna/dri: Clear the clear hint upon applying DRI damageChris Wilson
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 Wilson
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