summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
AgeCommit message (Collapse)Author
2013-05-14sna: Propagate clear color when replacing by a CopyAreaChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-14sna: Attempt to discard overwritten operations before CopyAreaChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-09sna: Handle cached upload buffers for partial migration to GPUChris Wilson
Since the extended use of move_area_to_gpu for partial migration of render sources, we exposed the lack of handling of upload caches along that path. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-01sna: Page align requests to userptrChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-24sna: Prevent accessing an uninitialised region in move_area_to_gpu()Chris Wilson
If we skip the migration, we need to avoid using the unitialiased region. There is no bad consequence as both branches of the if are no-ops, but it does silence the static checkers and should make the predicate cheaper. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-18sna: Rephrase initialisation without a specific backendChris Wilson
"generic" sounds more impressive than "no" 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-12sna: Refine assertion about the existence of CPU damage when GPU damagedChris Wilson
One particular buffer type is quite cunning and simultaneously sets both CPU/GPU as all damaged (the upload buffer) so be aware when making bold assertions. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-08sna: Remove assertions for mapped GPU bo if priv->cpu after GPU bo creationChris Wilson
The condition that we have a mapped GPU bo iff priv->cpu is only true if we have a GPU bo at the time of using the CPU -- if we create the GPU bo during move_to_gpu, then that assertion is bogus. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-06sna: Improve assertions to detect rogue priv->cpu statusChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-25Remove the GeneralSocket upon CloseScreenChris Wilson
Be neat and tidy in case we are shutdown but the server is not regenerated (e.g. a hot-unplug). Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-23sna: Fix an assertion to check the correct boChris Wilson
After syncing the GPU bo for use, that's what we should test as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-22sna: Fix assertions that the pixmap points into the CPU bo for fallbacksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-22sna: Fix computation of clip extents for stipplingChris Wilson
The clip extents for the stippled BLT missed applying the drawable offset to the lower-right corner, so inevitably every operation ended up being clipped. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62618 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-21sna/dri: Disable assertion and associated bookkeepingChris Wilson
Due to long standing ignored bugs in DRI2, we have to accept breakage in the driver. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62614 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-18sna: Skip processing an all-clipped-out glyphChris Wilson
Along the slow path, skip all processing of glyphs that are not visible. This is important as the slow path handles the per-glyph redirection case, which is much more expensive. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-16sna/dri: Clear flush flag upon bo destroyChris Wilson
Fixes sanity checks that we do not leak the flushing status, nor invoke an operation upon an unflushed bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-14sna: Consider placement hints when choosing userptr read pathChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-14sna: Use userptr downloads for incomplete GPU damaged pixmapsChris Wilson
If the pixmap is not wholly damaged, but still contains the region to be read, then use userptr (if available). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-14sna: Add a few more assertions to track userptr through the cachesChris Wilson
i.e. make sure they don't end up in any caches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-12sna: Improve asserts that the CPU bo is not busy after synchronisationChris Wilson
Taking into account that we may not do a full synchronisation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-11sna: Improve sna_copy_boxes DBG by printing the bo handlesChris Wilson
The handles of the bo are easier to track through the DBG as they are more often printed than then their addresses. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-11sna: Only allocate addition space if we need pixel dataChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-11sna: Tighten checking for coherent mapsChris Wilson
Remember all the special cases where we can use a CPU mmap as a temporary substitute for a GTT mapping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-10sna: Tweak CPU mappings to be only used if a read is requiredChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-06sna: Disable read-read optimisationsChris Wilson
There is still a lurking issue, so punt on the optimisation for now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61628 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-06sna: Lighten the wakeup handler slightlyChris Wilson
As the wakeup handler is called more frequently, we want to avoid any of the more heavyweight processing. So trim the wakeup handler down to the check to see if the GPU is idle and so we should immediately flush what we have currently queued. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Assert that the pixmap is not pinned before releasing the GPU boChris Wilson
Nothing suspicious in this set, just an extra dab of paranoia. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: The GPU bo submit is still required before mapping for inplace operationsChris Wilson
As we may choose to force the stall as we would be doing a read-back in any event... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Use drawable_gc_flags() to select placement for PolyArcChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Fix deference of just nullified GPU bo in previous commitChris Wilson
One last minute refactor too far, combining the too if(priv->gpu_bo) blocks forgot that the first block tried to free gpu_bo... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Refactor the is-mappable test for inplace operationsChris Wilson
By moving the test into the common function for creating a mappable GPU bo, we can also consider recreating that bo when desirable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Prefer GPU for self-copies when undamaged on the CPUChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-04sna: Ensure we do not attempt to operate inplace on a very large pixmapChris Wilson
Otherwise we will fail to map it into the GTT. In theory, this should just result in the same fallback paths, but pushing that knowledge up further should help us make better decisions. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that inplace operations are done on coherent mapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that when caching a pixmap header the pScreen matchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that we do not resurrect stale pixmap across a server regenChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=56608 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Track number of pixmaps allocated whilst counting bo leaksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-27sna: Migrate dirty tracking across ScreenPixmap updatesChris Wilson
Otherwise chaos ensues: Invalid read of size 8 ==8647== at 0x8477BC1: has_offload_slaves.isra.38 (sna_accel.c:14402) ==8647== by 0x84958E7: sna_accel_block_handler (sna_accel.c:13729) ==8647== by 0x164B13: BlockHandler (dixutils.c:387) ==8647== by 0x2B5273: WaitForSomething (WaitFor.c:210) ==8647== by 0x160790: Dispatch (dispatch.c:357) ==8647== by 0x14F549: main (main.c:298) ==8647== Address 0xf3383e8 is 24 bytes inside a block of size 152 free'd ==8647== at 0x4C2BA6C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8647== by 0x2403DF: damageDestroyPixmap (damage.c:1549) ==8647== by 0x1FFD88: XvDestroyPixmap (xvmain.c:372) ==8647== by 0x1FE789: ShmDestroyPixmap (shm.c:273) ==8647== by 0x8507C24: _sna_dri_destroy_buffer (sna_dri.c:448) ==8647== by 0x289986: do_get_buffers (dri2.c:521) ==8647== by 0x289C0F: DRI2GetBuffersWithFormat (dri2.c:690) ==8647== by 0x28B68F: ProcDRI2Dispatch (dri2ext.c:306) ==8647== by 0x160A40: Dispatch (dispatch.c:428) ==8647== by 0x14F549: main (main.c:298) ==8647== ==8647== Invalid read of size 8 ==8647== at 0x8477BCA: has_offload_slaves.isra.38 (regionstr.h:74) ==8647== by 0x84958E7: sna_accel_block_handler (sna_accel.c:13729) ==8647== by 0x164B13: BlockHandler (dixutils.c:387) ==8647== by 0x2B5273: WaitForSomething (WaitFor.c:210) ==8647== by 0x160790: Dispatch (dispatch.c:357) ==8647== by 0x14F549: main (main.c:298) ==8647== Address 0xdfdfdfdfdfdfdfe7 is not stack'd, malloc'd or (recently) free'd Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Improve handling of migrated userptr boChris Wilson
Superficially fixes gimp-2.9 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-25sna: Detect available instruction sets at runtimeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22sna: Optimise mmap of GPU bo for read-read operationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-22sna: Avoid migrating and making the GPU bo busy prior to mmapping itChris Wilson
References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1131134 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-20sna: Honour LinearFramebufferChris Wilson
The Option was untested, and unsurprisingly was broken. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-19sna: Assert that the GPU damage is NULL before destroy a proxyChris Wilson
If the GPU bo is a proxy, then it really is a pointer into a upload buffer for CPU data. In these cases, there should never be any GPU damage lying around. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-18sna: Assert that the gpu_bo exists if it is entirely damagedChris Wilson
This should help catch the error slightly earlier. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-18sna: A couple more assertions that we forcibly attach pixmaps correctlyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-13sna: Avoid stalling on a SHM upload when otherwise idleChris Wilson
Fixes regresion from commit 09ea1f4402b3bd0e411b90eb5575b3ff066d7356 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jan 10 16:26:24 2013 +0000 sna: Prefer to use the GPU for copies from SHM onto tiled destinations As the stalls on IVB 64-bit machines at least greatly offset the benefits. As those earlier measurements were made on the same IVB machine but running in 32-bit mode, I need to double-check whether or not this is another 32-bit peculiarity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-12sna: Prefer inplace readback if the GPU doesn't support cacheable BLTsChris Wilson
As we must perform the GTT reads anyway, first see if we can copy directly to the destination. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>