Mesa (master): i965/icl: Define and use icl mocs settings

Anuj Phogat aphogat at kemper.freedesktop.org
Fri Feb 16 01:05:06 UTC 2018


Module: Mesa
Branch: master
Commit: d6b26649a6af8dee47a28b98df457b995e946722
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6b26649a6af8dee47a28b98df457b995e946722

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Wed May 10 10:49:04 2017 -0700

i965/icl: Define and use icl mocs settings

Gen11 MOCS settings are duplicate of Gen10 MOCS settings.

Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_state.h            | 6 ++++++
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 ++
 src/mesa/drivers/dri/i965/genX_state_upload.c    | 4 +++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index dd3c3c36d2..9acb625740 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -386,6 +386,12 @@ void gen11_init_atoms(struct brw_context *brw);
 /* TC=LLC/eLLC, LeCC=PTE, LRUM=3, L3CC=WB */
 #define CNL_MOCS_PTE (1 << 1)
 
+/* Ice Lake uses same MOCS settings as Cannonlake */
+/* TC=LLC/eLLC, LeCC=WB, LRUM=3, L3CC=WB */
+#define ICL_MOCS_WB  (2 << 1)
+/* TC=LLC/eLLC, LeCC=PTE, LRUM=3, L3CC=WB */
+#define ICL_MOCS_PTE (1 << 1)
+
 uint32_t brw_get_bo_mocs(const struct gen_device_info *devinfo,
                          struct brw_bo *bo);
 
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 92ac1e45a3..44c87df17d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -60,6 +60,7 @@ uint32_t wb_mocs[] = {
    [8] = BDW_MOCS_WB,
    [9] = SKL_MOCS_WB,
    [10] = CNL_MOCS_WB,
+   [11] = ICL_MOCS_WB,
 };
 
 uint32_t pte_mocs[] = {
@@ -67,6 +68,7 @@ uint32_t pte_mocs[] = {
    [8] = BDW_MOCS_PTE,
    [9] = SKL_MOCS_PTE,
    [10] = CNL_MOCS_PTE,
+   [11] = ICL_MOCS_PTE,
 };
 
 uint32_t
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 3cb8256807..b171c4f171 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -334,7 +334,9 @@ genX(emit_vertex_buffer_state)(struct brw_context *brw,
 #endif
 #endif
 
-#if GEN_GEN == 10
+#if GEN_GEN == 11
+      .VertexBufferMOCS = ICL_MOCS_WB,
+#elif GEN_GEN == 10
       .VertexBufferMOCS = CNL_MOCS_WB,
 #elif GEN_GEN == 9
       .VertexBufferMOCS = SKL_MOCS_WB,




More information about the mesa-commit mailing list