From: Dongwon Kim Date: Thu, 27 Jun 2019 16:54:36 +0000 (-0700) Subject: iris: disable repacking for compression for applicable gen X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6866765cb3726ab97e75d946ae5e8df510a143c8;p=mesa.git 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 --- 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