xf86-video-intel/src/sna
Chris Wilson fe6ab444ad sna: Initialise the per-CRTC shadow bo on first use
When we create the shadow pixmap for the CRTC, we should copy the
framebuffer contents into the shadow before we show it the first time.
This saves us from showing stale contents until the next redrawn in the
BlockHandler - with the proviso that we can do the copy on the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-24 07:56:31 +01:00
..
brw sna: Emit assertions with FatalError 2014-09-10 11:58:11 +01:00
fb sna: Silence compiler warnings for discarding const Region points 2014-06-11 11:02:05 +01:00
Makefile.am sna: Emit assertions with FatalError 2014-09-10 11:58:11 +01:00
README
atomic.h
blt.c sna: Micro-optimise unswizzling tiling/detiling 2014-06-28 14:18:23 +01:00
compiler.h
gen2_render.c sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
gen2_render.h
gen3_render.c sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
gen3_render.h
gen4_common.c
gen4_common.h
gen4_render.c sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
gen4_render.h sna/gen4,5: Fix setting pipe control cache flush bits 2014-02-03 10:04:15 +00: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: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
gen5_render.h
gen6_common.c sna: Tweak deletion of used buffers 2013-10-31 13:35:37 +00:00
gen6_common.h sna/gen8: Check for WT support before attempting to use the WT mocs 2014-06-13 08:27:05 +01:00
gen6_render.c sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
gen6_render.h
gen7_render.c sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
gen7_render.h
gen8_eu.c sna/gen8: Initial backend for Broadwell 2013-12-11 21:39:40 +00:00
gen8_eu.h sna/gen8: Initial backend for Broadwell 2013-12-11 21:39:40 +00:00
gen8_render.c sna/gen8: Update DBG output of surface offset 2014-09-19 11:00:39 +01:00
gen8_render.h sna/gen8: Initial backend for Broadwell 2013-12-11 21:39:40 +00:00
gen8_vertex.c sna/gen3+: Allow for spill when aligning vertices 2014-01-24 14:21:44 +00:00
gen8_vertex.h sna/gen8: Initial backend for Broadwell 2013-12-11 21:39:40 +00:00
kgem.c sna: Last ditch attempt to make extra large batches fit 2014-09-15 11:41:38 +01:00
kgem.h sna: Avoid u16 underflow when computing reserved batch space 2014-09-08 12:50:29 +01:00
kgem_debug.c sna: Expand debugging to cover gen8 BLT variations 2014-06-10 21:31:05 +01:00
kgem_debug.h
kgem_debug_gen2.c Remove uneeded headers 2013-11-25 10:04:47 +00:00
kgem_debug_gen3.c
kgem_debug_gen4.c
kgem_debug_gen5.c
kgem_debug_gen6.c
kgem_debug_gen7.c
rop.h
sna.h sna: Last ditch attempt to make extra large batches fit 2014-09-15 11:41:38 +01:00
sna_accel.c sna: Constify argument to box_from_seg() 2014-09-16 20:26:28 +01:00
sna_acpi.c
sna_blt.c sna/blt: Fix computation of remainaing boxes on gen8+ 2014-09-12 08:24:06 +01:00
sna_composite.c sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +01:00
sna_cpu.c Silence CLang (almost) 2014-05-28 13:34:53 +01:00
sna_cpuid.h configure: check for cpuid.h 2014-08-31 11:51:46 +01:00
sna_damage.c sna: Mark up const boxes to keep the compiler happy 2014-06-20 16:23:18 +01:00
sna_damage.h sna: Prune damage that covers the entire target Pixmap 2014-09-10 16:55:14 +01:00
sna_display.c sna: Initialise the per-CRTC shadow bo on first use 2014-09-24 07:56:31 +01:00
sna_display_fake.c sna: Fix attaching to a headless configuration 2014-08-26 11:43:28 +01:00
sna_dri2.c sna/dri2: Decouple the Client event link on Drawable free 2014-09-21 16:44:25 +01:00
sna_dri3.c sna/dri3: Don't forget to add SHM pixmaps to the list of exported DRI3 bo 2014-07-22 09:00:46 +01:00
sna_driver.c sna: Emit assertions with FatalError 2014-09-10 11:58:11 +01:00
sna_glyphs.c sna/glyphs: Prevent NULL vfunc deref with glyphs 2014-09-09 08:12:45 +01:00
sna_gradient.c
sna_io.c sna/io: Initialise return code to catch early segfaults 2014-09-15 12:08:59 +01:00
sna_module.h
sna_present.c sna/present: Make DBG statements uniform before present_event_notify() 2014-09-24 07:37:32 +01:00
sna_reg.h sna: Emit points using the BLT primitive when appropriate 2014-03-10 14:54:38 +00:00
sna_render.c sna: Avoid stalls when promoting to the GPU before an operation 2014-09-12 16:57:16 +01:00
sna_render.h sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo 2014-06-30 21:18:43 +01:00
sna_render_inline.h sna: Leave more Pixmap breadcrumbs in DBG 2014-09-02 19:15:49 +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/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo 2014-06-30 21:18:43 +01:00
sna_transform.c sna: Fix logic inversion in use of imprecise transform conversion 2014-03-17 07:56:39 +00:00
sna_trapezoids.c sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo 2014-06-30 21:18:43 +01:00
sna_trapezoids.h traps 2014-09-22 08:54:57 +01:00
sna_trapezoids_boxes.c sna: Prune damage that covers the entire target Pixmap 2014-09-10 16:55:14 +01:00
sna_trapezoids_imprecise.c traps 2014-09-22 08:54:57 +01:00
sna_trapezoids_mono.c sna: Silence compiler warnings for discarding const Region points 2014-06-11 11:02:05 +01:00
sna_trapezoids_precise.c sna: Remvoe unused code 2014-09-12 21:17:04 +01:00
sna_vertex.c
sna_video.c sna: Emit assertions with FatalError 2014-09-10 11:58:11 +01:00
sna_video.h Prepare for spurious Xv ABI changes 2014-08-08 08:26:08 +01:00
sna_video_hwmc.c
sna_video_hwmc.h
sna_video_overlay.c Prepare for spurious Xv ABI changes 2014-08-08 08:26:08 +01:00
sna_video_sprite.c Prepare for spurious Xv ABI changes 2014-08-08 08:26:08 +01:00
sna_video_textured.c Prepare for spurious Xv ABI changes 2014-08-08 08:26:08 +01:00
xassert.h sna: Fix include guard 2014-09-12 21:16:12 +01: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.