summaryrefslogtreecommitdiff
path: root/src/sna
AgeCommit message (Collapse)Author
2014-03-19sna: Assert after applying clipping that the draw rectangle is wholly containedChris Wilson
Otherwise we ignore the purpose of applying the clip! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-17sna: Improve guard against loading palettes whilst headlessChris Wilson
Whilst hosted, which is very similar to being headless, we do not even have the kmode pointer and so checking kmode->count_crtcs is fatal. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-17sna: Fix logic inversion in use of imprecise transform conversionChris Wilson
An accidental drop of the if (!is_translation) broke composite copies under a transform. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76244 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14sna: Allow some leeway when deciding to discard common translationsChris Wilson
Under PictFilterNearest, we can ignore fractional translations (not all renderers discard those.) And if we are being approximate, we can loosen our tolerance as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14sna: Ensure we flush SHM pixmaps if rendering to a GPU shadowChris Wilson
Normally, we try to render into the CPU bo of a SHM pixmap. However, under the right circumstances we may try to do a series of rendering into the GPU bo and then copy it back to the CPU bo. In that case, we need to be sure to mark the pixmap as requiring the flush. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-13sna/gen6+: Simplify BLT vs RENDER decisions for fill opsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-13sna: Nullify extra fill.opsChris Wilson
I forgot that the initial memset(&fill, 0, sizeof(fill)) was no longer performed and we rely on explicit initialisation during the setup, so add the missing fields. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76088 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-12sna: Restore asserts that we do not map a freed bufferChris Wilson
The complication comes with stolen bo that we treat as purged (because they have no backing storage we can access) and so require an extra caveat. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-12sna: Add DBG around using pixman's glyph cacheChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-12sna: Only couple up a proxy->rq when inserting into the request->buffers listChris Wilson
Otherwise, we may never decouple it again afterwards leading to a dangling pointer dereference. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1289923 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-12sna: Simplify code when no 64-bit registers are available in the ISAChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-11sna: Missing fixes for using BLT pointsChris Wilson
On a lone machine I had a vital fix for setting the destination tiling bit inside the XY_PIXEL_BLT command. Sadly, I forgot about the fix before the patch from another machine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-11sna/glyphs: Add a smattering of DBG for validating the glyph maskChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-11sna: Avoid using the wrong pitch for comparing replacement sizesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-11sna: Assert that the pixmap pitch is initialised before useChris Wilson
This is a sanity check that the pixmap is mapped for use by the CPU prior to us actually using it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-11sna: Be defensive when applying size restrictions to boChris Wilson
The assumption that all paths prevalidate the restrictions upon creation the bo are false. Some important paths try to force the bo creation in order to meet client expectations (e.g. DRI). So we are faced with impossible requests which must fail, so make sure we do report those failures. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1289049 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna: DBG compilation fixupsChris Wilson
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-03-10sna/glyph: Release the pixman glyph cache along the error pathsChris Wilson
If we lock the glyph cache and then hit an error, we must make sure we release our lock. An easy way would be not to lock when we may err. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna/gen2: Fix build after last minute patch editingChris Wilson
Whoops, the selective editing of the patch left a trailing '{' and breaking the build. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna/gen2: Tidy blend factor selection for the sourceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna/gen2: Fix alpha blending with 8bit destination surfacesChris Wilson
On gen2 (like gen3), 8-bit destination surfaces are read into the Green channel (and written to from the Green channel). Therefore the expected alpha blending must instead be converted to colour blending. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75818 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna: Unroll finding bbox of pointsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-10sna: Emit points using the BLT primitive when appropriateChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-05sna/gen8: Correct MOCS settings for render targetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-28sna: Reorder writes during thread task decouplingChris Wilson
So that the lockless reads do not see the task complete signal prior to marking the task as successful. Otherwise, we falsely detect that the thread trapped a signal and kill them all. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-27sna: Limit the WHOLE_HINT to large PutImagesChris Wilson
The goal here is to predict when we are uploading an entire image though multiple PutImage requests. If the image is small enough, then the PutImage will be contained within a single request and the damage tracking will be accurate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-27sna: Avoid promoting region-to-whole migration and discarding damageChris Wilson
Fixes regression from commit 1de1104064b5898cbed37e836901694a381c1266 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Feb 21 22:43:04 2014 +0000 sna: Use a hint to do whole image uploads inplace Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75549 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Tighten assertion for tiling blt fallbacksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna/gen6+: Add missing DBG argumentChris 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-23sna: Add a little more DBG to watch the flow of allocated bo sizesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Avoid signed overflow when printing allocated bytes in DBGChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-23sna: Cleanup caches if execbuf failsChris Wilson
One of the failure modes for execbuf is running out of memory - often this is reported as a false ENOSPC (thanks shmemfs!). Because of this, we should try to resubmit after we purge our caches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Propagate thread signals for extra 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-02-22sna: Move sigtrap wrapping closer to threaded sw compositeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Assert that sigtrap is activeChris Wilson
Curiouser and curiouser. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Apply the dst offset for pixman fillsChris Wilson
Along one of the sw blt paths we failed to apply the offset for Composite redirection. Reported-by: Jiri Slaby <jirislaby@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73811 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-22sna: Handle asynchronous signals from threadsChris Wilson
By killing the threads and leaking their allocations - marginally preferrable to losing the entire Xserver. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Use a hint to do whole image uploads inplaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Allow allocation to fail even when debuggingChris Wilson
Let the malloc failure propagate rather than assert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Wrap inplace trapezoid operators with SIGBUS protectionChris Wilson
For the moment, this still leaves open the vexing question of how to protect the multi-threaded variants, but it should provide more shelter for extreme OOM. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Tighten assertion for tiling blt fallbacksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Do not attempt fallback configuration without any CRTCsChris Wilson
The fallback xf86InitialConfiguration() is another function that may explode if called without any CRTCs attached. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Do not register colormaps without any CRTCsChris Wilson
The xserver may crash if we try to setup colormap handling without any CRTCs, so don't. Suggested-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-20backlight: Make search routine for device specific backlight commonChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-20sna: Query cursor size from the kernelChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-15backlight: Amalgamate hardcoded priority tablesChris Wilson
Our fallback path for finding the backlight interface uses a hardcoded table of known backlight controllers in proirity order. Rather than maintain this table twice in the midst of the KMS logic, push it to the new set of common backlight routines. This incorporates bugfixes from SNA to handle unknown backlights, but usable, gracefully. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>