iris: implement WaEnableStateCacheRedirectToCS
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 18 Apr 2019 10:57:57 +0000 (11:57 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 18 Apr 2019 16:43:08 +0000 (17:43 +0100)
This 3d performance workaround was initially put in the kernel but the
media driver requires different settings so the register has been
whitelisted in i915 [1] and userspace drivers are left initializing it as
they wish.

[1] : https://patchwork.freedesktop.org/series/59494/

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/gallium/drivers/iris/iris_state.c
src/intel/genxml/gen11.xml

index 8d5383598d2261432bb1f0e3c1de1185f3798aaf..2c85ba3778a6520a811d9ff70d590a4ef5a6c725 100644 (file)
@@ -721,6 +721,13 @@ iris_init_render_context(struct iris_screen *screen,
       }
       iris_emit_lri(batch, COMMON_SLICE_CHICKEN3, reg_val);
 
+      iris_pack_state(GENX(SLICE_COMMON_ECO_CHICKEN1), &reg_val, reg) {
+         reg.StateCacheRedirectToCSSectionEnable = true;
+         reg.StateCacheRedirectToCSSectionEnableMask = true;
+      }
+      iris_emit_lri(batch, SLICE_COMMON_ECO_CHICKEN1, reg_val);
+
+
       // XXX: 3D_MODE?
 #endif
 
index 83e03f6f7f0d09c27ba5029d9acf1f3466377389..243752abafcd33feba076a8bede3de0492b5966f 100644 (file)
     <field name="SFBE Done" start="25" end="25" type="bool"/>
   </register>
 
+  <register name="SLICE_COMMON_ECO_CHICKEN1" length="1" num="0x731c">
+    <field name="State Cache Redirect To CS Section Enable" start="11" end="11" type="bool"/>
+    <field name="State Cache Redirect To CS Section Enable Mask" start="27" end="27" type="bool"/>
+  </register>
+
   <register name="SO_NUM_PRIMS_WRITTEN0" length="2" num="0x5200">
     <field name="Num Prims Written Count" start="0" end="63" type="uint"/>
   </register>