xf86-video-intel/src/sna
Chris Wilson 4953aa13b9 sna: Always sync before using mmap pointers in memcpy_copy_boxes
kgem_bo_map__(cpu|gtt) leaves the sync up to the caller, in particular
so that the obtaining the pointer and controlling the cache domains are
not conflated and can be separated. However, it does mean that the
caller can not assume that obtaining the pointer updates the cache
domains, as it does not. memcpy_copy_boxes fell into this trap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-04 13:21:04 +01:00
..
brw meson: Add meson build system 2018-02-06 13:12:33 +00:00
fb meson: Add meson build system 2018-02-06 13:12:33 +00:00
Makefile.am sna/gen9: Quick and dirty implementation 2016-04-06 17:24:01 +01:00
README
atomic.h
blt.c sna: Use GCC pragma to enable SSE2 blt routines 2016-07-29 17:41:55 +01:00
compiler.h sna: Mark sse2 routines as "fast" 2016-04-06 18:44:07 +01:00
debug.h sna: Make DBG() and ERR() non-empty 2018-02-06 13:12:33 +00:00
gen2_render.c sna: Implement i830 3DSTATE_BUFFER_INFO w/a 2017-10-18 16:07:47 +01:00
gen2_render.h
gen3_render.c sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT 2018-02-07 19:04:54 +00:00
gen3_render.h
gen4_common.c
gen4_common.h
gen4_render.c sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT 2018-02-07 19:04:54 +00:00
gen4_render.h sna/video: Add support for NV12 video in all gen4+ render paths 2017-09-27 19:00:55 +01:00
gen4_source.c
gen4_source.h
gen4_vertex.c sna: Remvoe unused code 2014-09-12 21:17:04 +01:00
gen4_vertex.h
gen5_render.c sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT 2018-02-07 19:04:54 +00:00
gen5_render.h sna/video: Add support for NV12 video in all gen4+ render paths 2017-09-27 19:00:55 +01:00
gen6_common.c
gen6_common.h sna/gen6+: Don't force a switch to BLT if the target bo cannot be blitted 2016-05-13 22:53:26 +01:00
gen6_render.c sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT 2018-02-07 19:04:54 +00:00
gen6_render.h
gen7_render.c sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT 2018-02-07 19:04:54 +00:00
gen7_render.h
gen8_eu.c sna/gen6+: Fix projective sample coordinates 2014-10-31 16:20:25 +00:00
gen8_eu.h
gen8_render.c sna/video: Actually use the NV12 shader on gen8 2018-02-14 20:49:26 +00:00
gen8_render.h sna/gen8+: Flush pipecontrols when forcing a pipeline stall 2016-04-17 16:02:30 +01:00
gen8_vertex.c
gen8_vertex.h
gen9_render.c sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT 2018-02-07 19:04:54 +00:00
gen9_render.h sna/gen8+: Flush pipecontrols when forcing a pipeline stall 2016-04-17 16:02:30 +01:00
git_version.h.in meson: Add meson build system 2018-02-06 13:12:33 +00:00
kgem.c sna: Drop redundant sync of an inactive snoop cache 2017-12-20 08:49:11 +00:00
kgem.h sna/gen8+: Discard any blt using a LINEAR buffer that is not 64byte aligned 2017-08-22 20:29:20 +01:00
kgem_debug.c
kgem_debug.h
kgem_debug_gen2.c
kgem_debug_gen3.c
kgem_debug_gen4.c Fix typos found with codespell v1.7 2015-06-09 20:46:12 +01:00
kgem_debug_gen5.c Fix typos found with codespell v1.7 2015-06-09 20:46:12 +01:00
kgem_debug_gen6.c Fix typos found with codespell v1.7 2015-06-09 20:46:12 +01:00
kgem_debug_gen7.c
meson.build meson: Add meson build system 2018-02-06 13:12:33 +00:00
rop.h
sna.h sna: Reorder vblank/flip event handling to avoid TearFree recursion 2018-04-03 19:23:26 +01:00
sna_accel.c sna: Allow a PRIME pixmap to be reused 2017-11-08 23:20:18 +00:00
sna_acpi.c Update to ABI 22 and NotifyFd 2016-07-20 11:29:20 +01:00
sna_blt.c sna: Clear damage tracking when marking as all-clear 2016-09-08 08:30:02 +01:00
sna_composite.c sna: Clear damage tracking when marking as all-clear 2016-09-08 08:30:02 +01:00
sna_cpu.c
sna_cpuid.h configure: check for cpuid.h 2014-08-31 11:51:46 +01:00
sna_damage.c
sna_damage.h sna/damage: Clear all-damaged NULL pointer on destroy 2016-01-25 16:03:27 +00:00
sna_display.c sna: Reorder vblank/flip event handling to avoid TearFree recursion 2018-04-03 19:23:26 +01:00
sna_display_fake.c sna: Handle xf86Randr12 gamma changes in xorg-xserver-1.19 2016-11-30 23:54:05 +00:00
sna_dri2.c sna/dri2: Clip application of damage to windowed swapbuffers 2018-03-28 19:42:06 +01:00
sna_dri3.c sna/dri3: Flush the DRI3 pixmap bo before reporting the fd to the client 2016-08-23 09:06:52 +01:00
sna_driver.c sna: Force posting of shadow updates for NotifyFd 2018-04-01 13:27:49 +01:00
sna_glyphs.c sna: Avoid using NULL pointer inside DBG 2015-06-02 09:15:09 +01:00
sna_gradient.c
sna_io.c sna: Prefer direct writes if the target is LLC 2015-08-07 16:45:38 +01:00
sna_module.h
sna_present.c sna: Reorder vblank/flip event handling to avoid TearFree recursion 2018-04-03 19:23:26 +01:00
sna_reg.h
sna_render.c sna: Always sync before using mmap pointers in memcpy_copy_boxes 2018-04-04 13:21:04 +01:00
sna_render.h sna/video: Add support for NV12 video in all gen4+ render paths 2017-09-27 19:00:55 +01:00
sna_render_inline.h sna: Implement i830 3DSTATE_BUFFER_INFO w/a 2017-10-18 16:07:47 +01:00
sna_stream.c
sna_threads.c sna: Tweak number of threads for short areas 2014-07-04 12:43:55 +01:00
sna_tiling.c sna: Fix tiling trapezoids 2015-06-12 12:09:58 +01:00
sna_transform.c sna/transform: Correctly check for imprecise fractional translations 2014-11-20 13:26:29 +00:00
sna_trapezoids.c sna/trapezoids: Check the pixmap is wrapped before deferencing it 2014-12-12 09:40:51 +00:00
sna_trapezoids.h sna/trapezoids: Prefer GPU for AddTraps() 2014-10-21 20:30:21 +01:00
sna_trapezoids_boxes.c Fix typos found with codespell v1.7 2015-06-09 20:46:12 +01:00
sna_trapezoids_imprecise.c test: Add a fidelity test for triangle edge rendering 2015-05-18 13:14:42 +01:00
sna_trapezoids_mono.c test: Add a fidelity test for triangle edge rendering 2015-05-18 13:14:42 +01:00
sna_trapezoids_precise.c test: Add a fidelity test for triangle edge rendering 2015-05-18 13:14:42 +01:00
sna_vertex.c
sna_video.c sna/video: Add NV12 video copy funcs 2017-09-27 19:00:55 +01:00
sna_video.h sna: Add XV_COLORSPACE attribute support for sprite Xv adaptors 2018-03-02 15:17:21 +00:00
sna_video_hwmc.c intel: Store pointer to struct intel_device 2014-10-08 13:59:55 +01:00
sna_video_hwmc.h
sna_video_overlay.c sna/video: ValidateGC before use 2016-01-26 12:50:13 +00:00
sna_video_sprite.c sna: Add XV_COLORSPACE attribute support for sprite Xv adaptors 2018-03-02 15:17:21 +00:00
sna_video_textured.c sna/video: Expose NV12 support for the textured Xv adaptor on gen4+ 2017-09-27 19:01:05 +01:00
xassert.h sna/present: Report BadValue if target_msc exceeds last known msc by 1<<32 2016-03-22 22:54:36 +00:00

README

SandyBridge's New Acceleration
------------------------------

The guiding principle behind the design is to avoid GPU context switches.
On SandyBridge (and beyond), these are especially pernicious because the
RENDER and BLT engine are now on different rings and require
synchronisation of the various execution units when switching contexts.
They were not cheap on early generation, but with the increasing
complexity of the GPU, avoiding such serialisations is important.

Furthermore, we try very hard to avoid migrating between the CPU and GPU.
Every pixmap (apart from temporary "scratch" surfaces which we intend to
use on the GPU) is created in system memory. All operations are then done
upon this shadow copy until we are forced to move it onto the GPU. Such
migration can only be first triggered by: setting the pixmap as the
scanout (we obviously need a GPU buffer here), using the pixmap as a DRI
buffer (the client expects to perform hardware acceleration and we do not
want to disappoint) and lastly using the pixmap as a RENDER target. This
last is chosen because when we know we are going to perform hardware
acceleration and will continue to do so without fallbacks, using the GPU
is much, much faster than the CPU. The heuristic I chose therefore was
that if the application uses RENDER, i.e. cairo, then it will only be
using those paths and not intermixing core drawing operations and so
unlikely to trigger a fallback.

The complicating case is front-buffer rendering. So in order to accommodate
using RENDER on an application whilst running xterm without a composite
manager redirecting all the pixmaps to backing surfaces, we have to
perform damage tracking to avoid excess migration of portions of the
buffer.