iris: disable repacking for compression for applicable gen
authorDongwon Kim <dongwon.kim@intel.com>
Thu, 27 Jun 2019 16:54:36 +0000 (09:54 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Mon, 8 Jul 2019 17:54:38 +0000 (10:54 -0700)
set bit15 (Disable Repacking for Compression) of CACHE_MODE_0 register
if the gen attribute, 'disable_ccs_repack' is set.

Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/gallium/drivers/iris/iris_state.c

index e853523dba33c2d72f780c42f7abd9ad0eed6e82..90f1d478401b25364bb5e5ee847eb3edc037caa0 100644 (file)
@@ -748,6 +748,17 @@ iris_init_render_context(struct iris_screen *screen,
       }
       iris_emit_lri(batch, SLICE_COMMON_ECO_CHICKEN1, reg_val);
 
+      /* Hardware specification recommends disabling repacking for the
+       * compatibility with decompression mechanism in display controller.
+       */
+      if (devinfo->disable_ccs_repack) {
+         iris_pack_state(GENX(CACHE_MODE_0), &reg_val, reg) {
+            reg.DisableRepackingforCompression = true;
+            reg.DisableRepackingforCompressionMask = true;
+         }
+         iris_emit_lri(batch, CACHE_MODE_0, reg_val);
+      }
+
       // XXX: 3D_MODE?
 #endif