summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids.c
AgeCommit message (Collapse)Author
2014-12-12sna/trapezoids: Check the pixmap is wrapped before deferencing itChris Wilson
When we AddTraps to a low resolution bitmap, we need to fallback as we don't wrap it with a GPU pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-21sna/trapezoids: Prefer GPU for AddTraps()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-01sna/trapezoids: Fix comparison on right edge of trapezoidsChris Wilson
We need to compare the fixed ceiling rather the floor for accuracy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn boChris Wilson
One day, we will move the width/height/bpp to the bo itself... Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13sna: Refine decision whether to use the GPU or render inplaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-05sna: Curry parameters to sna_damage_all()Chris Wilson
It is far easily to pass the PixmapPtr into the function and have it pluck out the width and height than do so in all callers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-28Silence CLang (almost)Chris Wilson
Fix up all the warnings about implicit enum conversions. The container_of() macro remains defunct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna: Pass render hints for migration based on source locationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Add DBG for why trapezoids may be preferred inplaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Include mono/precise hints in trapezoids DBGChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Allow SIGBUS/SEGV to kill the threadChris Wilson
To handle sigtrapping of the threads, we allow the threads to handle their async signals and upon hitting the trap, we kill the thread. All the rest of the threads are reaped by the main xserver thread afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-17sna: Cull the DBG spew to stderrChris Wilson
Reduce the logging verbosity of DBG so that it only appears in the logfile by default - makes debugging much more pleasant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25sna/trapezoids: trapezoids_bounds() reports not-empty, so use itChris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25Cast to use unsigned mathZdenek Kabelac
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-10-15sna/trapezoids: Initialise force_fallbackChris Wilson
Remember to set it initially to false so that we randomly do not start using fallbacks. Fixes regression from commit 0cd2c43fa8f3a66d612589ad1163a90e427668ac Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Oct 13 14:46:45 2013 +0100 sna/trapezoids: Use the aligned fast path for fallbacks Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-13sna/trapezoids: Use the aligned fast path for fallbacksChris Wilson
Route the fallback methods through the force_fallback aligned fast paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-08sna: Rework the num_threads refinement to avoid the divisionChris Wilson
We can replace the division by a multiplication. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-08sna/trapezoids: Recompute num_threads to match rangeChris Wilson
We need to be careful not to execute threads past the end of the alloted buffer by making sure the clip extents correctly align. Reported-by: Joseph Yasi <joe.yasi@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70204 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-07sna/trapezoids: Only use a single thread to emit rectilinear spansChris Wilson
If the trapezoids are rectilinear, they should hit a fast path through the span compositors and so threading them seems pointless. Expect possibily for inplace pixman operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-05sna/trapezoids: Do not pass invalid trapezoids to pixmanChris Wilson
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1197921 Link: http://lists.x.org/archives/xorg-devel/2013-October/037996.html Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-05sna/trapezoids: Add a precise scan converterChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-04sna: Start splitting the trapezoids megafile into parseable blocksChris 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-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-08-14sna: Rename sna_pixmap_get_bo()Chris Wilson
Mark how dangerous this function is by giving it a __ prefix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04sna: Tweak threading thresholdsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04sna/trapezoids: Some minor DBG to investigate threaded renderingChris Wilson
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-07-19sna: Return true from get_drawable_deltas() if the pixmap is offsetChris Wilson
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-17sna: Avoid replacing pinned bo when undoing a cloneChris Wilson
Otherwise we end up cloning the scanout only to leave it dangling if the client copies the from the front-buffer and then writes to it. Reported-by: Nick Bowler <nbowler@draconx.ca> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64675 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-09sna/trapezoids: Fix the determination of the trapezoid originChris Wilson
"src-x and src-y register the pattern to the floor of the top x and y coordinate of the left edge of the first trapezoid," Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1178020 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-09sna: Add more debugging to unaligned trapezoidsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-13sna/trapezoids: Minimally replace points for TriFanChris Wilson
The realisation dawns that it wasn't the ordering of points within the triangle, but simply that I was replacing the wrong one.
2013-03-13sna/trapezoids: Correct ordering of points within TriFranChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna/trapezoids: Add a pair of unlikely hints for forced box emissionChris Wilson
Overflowing the buffer is unlikely, so pass the hint on to the compiler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Flatten unaligned box emissionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25sna/trapezoids: Instruct the compiler to flatten the callees whilst rasterisingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20sna/trapezoids: Clamp cells to valid rangeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20sna/trapezoids: Embed a few cells into the stackChris Wilson
Avoid an allocation in the common case where the set of trapezoids is fairly narrow. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20sna/trapezoids: Perform the cell allocation upfrontChris Wilson
As we know the maximum extents of the trapezoids, we know the maximum number of cells we will need and so can preallocate them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-10sna: Backport to squeeze - Xorg-1.6, pixman-0.16, libdrm-2.4.21Chris Wilson
The principle change is to switch to the old Privates API and undo the Region renames. The downside is that this ignores the critical bugfixes made to the xserver since xorg-1.6 - but I assume that whoever wants to run the latest hardware on the old xservers is also backporting those stability fixes... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-08sna/gen4: Split the have_render flag in separate prefer_gpu hintsChris Wilson
The idea is to implement more fine-grained checks as we may want different heuristics for desktops with GT1s than for mobile GT2s, etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31sna/traps: Thread the fallback rectilinear compositorChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31sna/traps: Allow inplace compositing for non-GPU buffers and rectilinear trapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31sna/traps: Translate the extents for the rasterization threadsChris Wilson
The single-threaded code used the pre-computed width/height and only required the origin from the bounds. However, the threads need to allocate memory for themselves based on the computed bounds, and so it helps if those bounds are then correct (rather than only the top-left being in local space with the bottom-right in global coordinates). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Enable threaded rasterisation for non-antialiased geometryChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Begin sketching out a threaded rasteriser for spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-25sna: Spawn threads to rasterize trapezoids through pixmanChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Spawn threads to composite trapezoids inplaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>