summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-10sna: Pass render hints for migration based on source locationChris Wilson1-4/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Add DBG for why trapezoids may be preferred inplaceChris Wilson1-14/+26
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Include mono/precise hints in trapezoids DBGChris Wilson1-2/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Allow SIGBUS/SEGV to kill the threadChris Wilson1-13/+17
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 Wilson1-6/+0
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 Wilson1-2/+1
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25Cast to use unsigned mathZdenek Kabelac1-1/+1
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-10-15sna/trapezoids: Initialise force_fallbackChris Wilson1-1/+2
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 Wilson1-8/+12
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 Wilson1-1/+1
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 Wilson1-1/+2
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 Wilson1-5/+5
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 Wilson1-12/+16
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 Wilson1-10/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-04sna: Start splitting the trapezoids megafile into parseable blocksChris Wilson1-6698/+2
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-27sna: Catch SIGBUS to prevent X deathChris Wilson1-14/+23
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 Wilson1-2/+2
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 Wilson1-4/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-04sna/trapezoids: Some minor DBG to investigate threaded renderingChris Wilson1-5/+11
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22sna: Fix DBG compilationChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19sna: Return true from get_drawable_deltas() if the pixmap is offsetChris Wilson1-8/+8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-06sna: Fix format specifier for mismatching int/long in DBGChris Wilson1-2/+5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-17sna: Avoid replacing pinned bo when undoing a cloneChris Wilson1-1/+1
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 Wilson1-10/+19
"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 Wilson1-22/+32
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-13sna/trapezoids: Minimally replace points for TriFanChris Wilson1-4/+2
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 Wilson1-2/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna/trapezoids: Add a pair of unlikely hints for forced box emissionChris Wilson1-2/+2
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 Wilson1-3/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25sna/trapezoids: Instruct the compiler to flatten the callees whilst rasterisingChris Wilson1-2/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20sna/trapezoids: Clamp cells to valid rangeChris Wilson1-20/+21
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20sna/trapezoids: Embed a few cells into the stackChris Wilson1-2/+6
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 Wilson1-156/+46
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 Wilson1-0/+2
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 Wilson1-60/+79
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 Wilson1-38/+147
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31sna/traps: Allow inplace compositing for non-GPU buffers and rectilinear trapsChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-31sna/traps: Translate the extents for the rasterization threadsChris Wilson1-1/+3
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 Wilson1-23/+206
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-27sna: Begin sketching out a threaded rasteriser for spansChris Wilson1-24/+222
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-25sna: Spawn threads to rasterize trapezoids through pixmanChris Wilson1-44/+137
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Spawn threads to composite trapezoids inplaceChris Wilson1-48/+199
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Use threads for simple mask generationChris Wilson1-25/+114
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-24sna: Refactor to use a common fbComposite fallbackChris Wilson1-25/+7
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17sna/trapezoids: Fix horizontal offset for inplace operationChris Wilson1-1/+1
Remember that for an inplace operation we are not dealing with an a8 mask, but rather a x8r8g8b8 surface and so need to step accordingly. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17sna: Remove the confusion of the pixmap->undamagedChris Wilson1-1/+0
This was to track a pixmap that had been used for migration (i.e had in the past been used for mixed rendering). It is no longer used so remove it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-15sna/trapezoids: Avoid the multiply for an opaque sourceChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-10sna: Use some surplus bits to back our temporary pixman_image_tChris Wilson1-2/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-05sna/trapezoids: filter out cancelling edges upon insertion to edge-listChris Wilson1-4/+65
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>