From 6866765cb3726ab97e75d946ae5e8df510a143c8 Mon Sep 17 00:00:00 2001 From: Dongwon Kim Date: Thu, 27 Jun 2019 09:54:36 -0700 Subject: [PATCH] iris: disable repacking for compression for applicable gen 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 Reviewed-by: Anuj Phogat --- src/gallium/drivers/iris/iris_state.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index e853523dba3..90f1d478401 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -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), ®_val, reg) { + reg.DisableRepackingforCompression = true; + reg.DisableRepackingforCompressionMask = true; + } + iris_emit_lri(batch, CACHE_MODE_0, reg_val); + } + // XXX: 3D_MODE? #endif -- 2.30.2