[4/5] iris: disable repacking for compression for applicable gen

Submitted by Dongwon Kim on June 27, 2019, 4:54 p.m.

Details

Message ID 20190627165437.20961-4-dongwon.kim@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Dongwon Kim June 27, 2019, 4:54 p.m.
set bit15 (Disable Rebacking 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>
---
 src/gallium/drivers/iris/iris_state.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index bf31f31f3e4..ce25f1ffcb3 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -755,6 +755,16 @@  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

Comments

On Thu, Jun 27, 2019 at 9:55 AM Dongwon Kim <dongwon.kim@intel.com> wrote:
>
> set bit15 (Disable Rebacking for Compression) of CACHE_MODE_0 register
Repacking
> if the gen attribute, 'disable_ccs_repack' is set.
>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> ---
>  src/gallium/drivers/iris/iris_state.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
> index bf31f31f3e4..ce25f1ffcb3 100644
> --- a/src/gallium/drivers/iris/iris_state.c
> +++ b/src/gallium/drivers/iris/iris_state.c
> @@ -755,6 +755,16 @@ 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
> --
> 2.17.1
>