summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
AgeCommit message (Collapse)Author
2013-08-25sna: Add a few more checks for a hosted Xserver before walking CRTC listsChris Wilson
If we are hosted, we do not own the CRTC configuration, and deferencing the private data structures believing them to be ours, only leads to disaster. Based on patches by Christopher James Halse Rogers. Reported-by: Christopher James Halse Rogers <raof@ubuntu.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-16sna/video: Don't assert on a client error, return BadAllocChris Wilson
If the client sends a BO that is too small to satifsy the PutImage, then reject with BadAlloc rather than die with an assert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-30Suppress a bunch of compiler warnings for using constant stringsChris Wilson
We want these allocated in ro memory even if the antique API complains. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22sna: Fix DBG compilationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-12sna/video: Catch allocation failure whilst setting up the TexturedAdaptorChris Wilson
Missing NULL check for calloc of the port private array. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-06sna/video: Select vsync by default based on "SwapbuffersWait"Chris Wilson
To be strictly identical to the DRI code, we should override the user when the option is set. However, this a baby step for simple bug testing. References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1176647 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-06sna/video: Fixup formats to select visualsChris Wilson
Fixes regression from commit 195a51353c3af7bd253227da5f759f06cea01f73 [2.21.8] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Apr 9 19:13:46 2013 +0100 sna/video: Convert to a pure Xv backend Reported-by: Edward Sheldrake <ejsheldrake@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65479 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-06sna: Fix format specifier for mismatching int/long in DBGChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-27sna/video: Correct interpretation of 'sync'Chris Wilson
The 'sync' parameter past along XvPutImage is not a request for us to perform the operation synchronised to the vblank, rather a hint that the client wishes the operation to be synchronous. In Xorg, this is implemented as an immediate ShmCompletion event so make sure we flush the operation to hw in this case. Fixes regression from commit 195a51353c3af7bd253227da5f759f06cea01f73 [2.21.8] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Apr 9 19:13:46 2013 +0100 sna/video: Convert to a pure Xv backend Reported-by: Matti Hamalainen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65048 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-21sna/video: Convert to a pure Xv backendChris Wilson
This is to enable feature work which requires access to Client state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-17Revert "xgvevent"Chris Wilson
This reverts commit ddd75d6539dcf692cb76747cd63d1f301180f18a. This is a WIP patch, not ready for upstream. The danger of mixing topic branches.
2013-04-16xgveventChris Wilson
2013-04-09sna/video: Textured video passthrough no longer relies upon XvMCChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-09sna/video: Expand passthrough support for overlay planesChris Wilson
The passthrough is actually a generic, albeit private, mechanism that anything can use to pass along a GEM handle for use with Xv. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-02sna/gen4: Break the Video rendering loop into 16 rectangle chunksChris Wilson
If we feed more than 16 rectangles into the video rendering pipeline, the GPU goes crazy and starts emitting corruption. Lalalala. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1162046 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-28sna/video: Correct scaling of source offsetsChris Wilson
When applying pan and zoom to a mismatched video, it would inevitably miscompute the origin and scale factors. Reported-by: Matti Hamalainen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61610 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-21sna/video: Initialise alignment for video ports > 0Chris Wilson
We repeatedly set the alignment value on the first port, rather than once for each. Reported-by: Jiri Slaby <jirislaby@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47597 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18sna/video: Fix presentation of cropped spritesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18sna/video: Amalgamate the computation of source vs dest offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18sna/video: Fix adjustment of drawable vs source origin wrt to clipChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-18sna/xvmc: Clean up to avoid crash'n'burnChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-17sna/video: Pass along the video source offsetChris Wilson
Fortunately nobody had yet noticed that all videos were assumed to play with a matching src/dst origin. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-08sna: Flush upon change of target if GPU is idleChris Wilson
The aim is to improve GPU concurrency by keeping it busy. The possible complication is that we incur more overhead due to small batches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-11-30Convert generation counter to octalChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-17sna: Use the secure batches to program scanline waits on gen6+Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26sna/video: Protect against attempting to use TexturedVideo whilst wedgedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14Drop some unused includesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-14sna: Aim for consistency and use stdbool except for core X APIsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-09sna: Simplify the DBG incarnationChris Wilson
It was only ever used in conjunction with HAS_DEBUG_FULL. For debug purposes it is as easy to redefine DBG locally. By simplifying the DBG macro we can create it consistently and so reduce the number of compiler warnings. Long term, this has to be dynamic. Sigh. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-23sna: extend RandR to support super sized monitor configurationsChris Wilson
With the introduction of the third pipe on IvyBridge it is possible to encounter situations where the combination of the three monitors exceed the limits of the scanout engine and so prevent them being used at their native resolutions. (It is conceivable to hit similar issues on earlier generation, especially gen2/3.) One workaround, this patch, is to extend the RandR shadow support to break the extended framebuffer into per-crtc pixmaps. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-02sna: NameForAtom may return NULLChris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-28sna: Use magic upload buffers for video texturesChris Wilson
So that we may benefit from the caching of buffers and the automatic selection of the preferred upload method. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-26sna: Fix typo for debug compilationChris Wilson
s/ctrc/crtc/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-25sna: Trust the crtc-is-bound determination after modeset and hotplugChris Wilson
As these should be the only time that they change and we now have the checks in place, we can drop the workaround of doing the check just before emitting the wait. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-06sna/video: Only wait upon the scanout pixmapChris Wilson
Caught by the addition of the assertion. 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>
2012-03-30sna: Minimise the risk of hotplug hangs by checking fb before vsyncChris Wilson
Everytime we issue a MI_WAIT_FOR_EVENT on a scan-line from userspace we run the risk of that pipe being disable before we submit a batch. As the pipe is then disabled or configured differently, we encounter an indefinite wait and trigger a GPU hang. To minimise the risk of a hotplug event being detected and submitting a vsynced batch prior to noticing the removal of the pipe, perform an explicit query of the current CRTC and delete the wait if we spot that our framebuffer is no longer attached. This is about as good as we can achieve without extra help from the kernel. Reported-by: Francis Leblanc <Francis.Leblanc-Lebeau@verint.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45413 (and others) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-02sna: Pass usage hint for creating linear buffersChris Wilson
As we wish to immediate map the vertices buffers, it is beneficial to search the linear cache for an existing mapping to reuse first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-29sna: Allow ridiculously large bo, up to half the total GATTChris Wilson
Such large bo place extreme stress on the system, for example trying to mmap a 1GiB into the CPU domain currently fails due to a kernel bug. :( So if you can avoid the swap thrashing during the upload, the ddx can now handle 16k x 16k images on gen4+ on the GPU. That is fine until you want two such images... The real complication comes in uploading (and downloading) from such large textures as they are too large for a single operation with automatic detiling via either the BLT or the RENDER ring. We could do manual tiling/switching or, as this patch does, tile the transfer in chunks small enough to fit into either pipeline. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-27sna/video: Ensure the video pixmap is on the GPUChris Wilson
The presumption that the pixmap is the scanout and so will always be pinned is false if there is a shadow or under a compositor. In those cases, the pixmap may be idle and so the GPU bo reaped. This was compounded by that the video path did not mark the pixmap as busy. So whilst watching a video under xfce4 with compositing enabled (has to be a non-GL compositor) the video would suddenly stall. Reported-by: Paul Neumann <paul104x@yahoo.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45279 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-27sna/video: Add some DBG messages to track the error pathsChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=45279 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-27sna/video: Add some more DBG breadcrumbs to the textured PutImageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-27sna/video: Simplify the gen2/915gm checkChris Wilson
And make the later check in put image match. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-15sna/video: Increase the level of paranoiaChris Wilson
In how many different ways can we check that the scanout is allocated before we start decoding video? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-12-15sna/gen3: Check for upload failure of video boChris Wilson
And propagate that failure back to the client. Reported-by: Paul Neumann <paul104x@yahoo.de> References: https://bugs.freedesktop.org/show_bug.cgi?id=43716 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-13sna/video: Simplify check for 915G[M] which is simply gen==30Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-13sna/video: Constify a couple of attribute arraysChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09sna/video: Pass texture video limits to the clientChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09sna/video: Use the normal bo cache for texture video streamsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09sna/video: Pass cropped source dimensions along with frame dataChris Wilson
So pack all the relevant details into the same structure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30sna: Don't mess with NDEBUGChris Wilson
This is set in configure and redefining it later inside the C files just leads to trouble and broken compilation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>