amd, radeonsi: Add code to enable gfx11.5
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 18 Sep 2023 19:47:59 +0000 (21:47 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 20 Oct 2023 07:32:34 +0000 (07:32 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25278>

src/amd/common/ac_gpu_info.c
src/amd/common/ac_nir_lower_ngg.c
src/amd/common/amd_family.c
src/amd/common/amd_family.h
src/gallium/drivers/radeonsi/si_state.c

index 4d99554..57f232c 100644 (file)
@@ -856,9 +856,14 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
          identify_chip(GFX1103_R1);
          identify_chip(GFX1103_R2);
          break;
+      case FAMILY_GFX1150:
+         identify_chip(GFX1150);
+         break;
       }
 
-      if (info->ip[AMD_IP_GFX].ver_major == 11)
+      if (info->ip[AMD_IP_GFX].ver_major == 11 && info->ip[AMD_IP_GFX].ver_minor == 5)
+         info->gfx_level = GFX11_5;
+      else if (info->ip[AMD_IP_GFX].ver_major == 11)
          info->gfx_level = GFX11;
       else if (info->ip[AMD_IP_GFX].ver_major == 10 && info->ip[AMD_IP_GFX].ver_minor == 3)
          info->gfx_level = GFX10_3;
index 3af4891..5cc8c62 100644 (file)
@@ -2329,7 +2329,7 @@ export_vertex_params_gfx11(nir_builder *b, nir_def *export_tid, nir_def *num_exp
 
 static bool must_wait_attr_ring(enum amd_gfx_level gfx_level, bool has_param_exports)
 {
-   return gfx_level == GFX11 && has_param_exports;
+   return (gfx_level == GFX11 || gfx_level == GFX11_5) && has_param_exports;
 }
 
 static void
index 39dda07..aff7df3 100644 (file)
@@ -95,6 +95,8 @@ const char *ac_get_family_name(enum radeon_family family)
       return "GFX1103_R1";
    case CHIP_GFX1103_R2:
       return "GFX1103_R2";
+   case CHIP_GFX1150:
+      return "GFX1150";
    default:
       unreachable("Unknown GPU family");
    }
@@ -219,6 +221,8 @@ const char *ac_get_llvm_processor_name(enum radeon_family family)
    case CHIP_GFX1103_R1:
    case CHIP_GFX1103_R2:
       return "gfx1103";
+   case CHIP_GFX1150:
+      return "gfx1150";
    default:
       return "";
    }
index 3b7a3d7..09d9089 100644 (file)
@@ -119,6 +119,7 @@ enum radeon_family
    CHIP_NAVI33,         /* Radeon 7600, 7700S (mobile) */
    CHIP_GFX1103_R1,
    CHIP_GFX1103_R2,
+   CHIP_GFX1150,
    CHIP_LAST,
 };
 
@@ -139,6 +140,7 @@ enum amd_gfx_level
    GFX10,
    GFX10_3,
    GFX11,
+   GFX11_5,
 
    NUM_GFX_VERSIONS,
 };
index 89bb631..88b43d8 100644 (file)
@@ -6068,6 +6068,11 @@ static void gfx10_init_gfx_preamble_state(struct si_context *sctx)
    si_pm4_set_reg(pm4, R_028C48_PA_SC_BINNER_CNTL_1,
                   S_028C48_MAX_ALLOC_COUNT(sscreen->info.pbb_max_alloc_count - 1) |
                   S_028C48_MAX_PRIM_PER_BATCH(1023));
+
+   if (sctx->gfx_level >= GFX11_5)
+      si_pm4_set_reg(pm4, R_028C54_PA_SC_BINNER_CNTL_2,
+                     S_028C54_ENABLE_PING_PONG_BIN_ORDER(1));
+
    /* Break up a pixel wave if it contains deallocs for more than
     * half the parameter cache.
     *