intel/l3: Make DG1 urb-size exception more generic
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 9 Dec 2021 18:11:37 +0000 (10:11 -0800)
committerMarge Bot <emma+marge@anholt.net>
Sat, 11 Dec 2021 00:09:50 +0000 (00:09 +0000)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14136>

src/intel/common/intel_l3_config.c

index c7c6b30..9fcb326 100644 (file)
@@ -351,9 +351,14 @@ unsigned
 intel_get_l3_config_urb_size(const struct intel_device_info *devinfo,
                              const struct intel_l3_config *cfg)
 {
-   /* We don't have to program the URB size in DG1, it's a fixed value. */
-   if (devinfo->platform == INTEL_PLATFORM_DG1)
+   /* We don't have to program the URB size for some platforms. It's a fixed
+    * value.
+    */
+   if (cfg == NULL) {
+      ASSERTED const struct intel_l3_list *const list = get_l3_list(devinfo);
+      assert(list->length == 0);
       return devinfo->urb.size;
+   }
 
    /* From the SKL "L3 Allocation and Programming" documentation:
     *