diff options
author | Francisco Jerez <currojerez@riseup.net> | 2015-09-03 18:23:19 +0300 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2015-12-09 13:57:40 +0200 |
commit | 1fc797e8e408522cfbd3fa9f81d4fb33acccb034 (patch) | |
tree | a4d5555f197a5985e69346ac7326a61221b19f31 /src/mesa/drivers/dri/i965/intel_batchbuffer.h | |
parent | 09d9638dd04ae7d34d331cb7af0bc5888f48806f (diff) | |
download | external_mesa3d-1fc797e8e408522cfbd3fa9f81d4fb33acccb034.zip external_mesa3d-1fc797e8e408522cfbd3fa9f81d4fb33acccb034.tar.gz external_mesa3d-1fc797e8e408522cfbd3fa9f81d4fb33acccb034.tar.bz2 |
i965: Work around L3 state leaks during context switches.
This is going to require some rather intrusive kernel changes to fix
properly, in the meantime (and forever on at least pre-v4.1 kernels)
we'll have to restore the hardware defaults at the end of every batch
in which the L3 configuration was changed to avoid interfering with
the DDX and GL clients that use an older non-L3-aware version of Mesa.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
v2: Optimize look-up of the default configuration by assuming it's the
first entry of the L3 config array in order to avoid an FPS
regression in GpuTest Triangle and SynMark OglBatch2-7 on most
affected platforms.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h index 2b177d3..f473690 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h @@ -30,8 +30,12 @@ extern "C" { * - 5 dwords for initial mi_flush * - 2 dwords for CC state setup * - 5 dwords for the required pipe control at the end + * - Restoring L3 configuration: (24 dwords = 96 bytes) + * - 2*6 dwords for two PIPE_CONTROL flushes. + * - 7 dwords for L3 configuration set-up. + * - 5 dwords for L3 atomic set-up (on HSW). */ -#define BATCH_RESERVED 152 +#define BATCH_RESERVED 248 struct intel_batchbuffer; |