i965: Consolidate GEN9 LP definition
authorBen Widawsky <ben@bwidawsk.net>
Thu, 10 Nov 2016 18:20:12 +0000 (10:20 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Nov 2016 01:34:37 +0000 (17:34 -0800)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/common/gen_device_info.c

index 51fdf342324d6b187dae45587597c559096bfb0c..b8d92278d73489c2ac20192234a8cd8d0d57f729 100644 (file)
@@ -346,6 +346,44 @@ static const struct gen_device_info gen_device_info_chv = {
       .max_gs_entries = 640,                        \
    }
 
+#define GEN9_LP_FEATURES                           \
+   GEN9_FEATURES,                                  \
+   .is_broxton = 1,                                \
+   .gt = 1,                                        \
+   .has_llc = false,                               \
+   .num_slices = 1,                                \
+   .max_vs_threads = 112,                          \
+   .max_tcs_threads = 112,                         \
+   .max_tes_threads = 112,                         \
+   .max_gs_threads = 112,                          \
+   .max_cs_threads = 6 * 6,                        \
+   .urb = {                                        \
+      .size = 192,                                 \
+      .min_vs_entries = 34,                        \
+      .min_ds_entries = 34,                        \
+      .max_vs_entries = 704,                       \
+      .max_tcs_entries = 256,                      \
+      .max_tes_entries = 416,                      \
+      .max_gs_entries = 256,                       \
+   }
+
+#define GEN9_LP_FEATURES_2X6                       \
+   GEN9_LP_FEATURES,                               \
+   .max_vs_threads = 56,                           \
+   .max_tcs_threads = 56,                          \
+   .max_tes_threads = 56,                          \
+   .max_gs_threads = 56,                           \
+   .max_cs_threads = 6 * 6,                        \
+   .urb = {                                        \
+      .size = 128,                                 \
+      .min_vs_entries = 34,                        \
+      .min_ds_entries = 34,                        \
+      .max_vs_entries = 352,                       \
+      .max_tcs_entries = 128,                      \
+      .max_tes_entries = 208,                      \
+      .max_gs_entries = 128,                       \
+   }
+
 static const struct gen_device_info gen_device_info_skl_gt1 = {
    GEN9_FEATURES, .gt = 1,
    .num_slices = 1,
@@ -377,49 +415,11 @@ static const struct gen_device_info gen_device_info_skl_gt4 = {
 };
 
 static const struct gen_device_info gen_device_info_bxt = {
-   GEN9_FEATURES,
-   .is_broxton = 1,
-   .gt = 1,
-   .has_llc = false,
-
-   .num_slices = 1,
-   .max_vs_threads = 112,
-   .max_tcs_threads = 112,
-   .max_tes_threads = 112,
-   .max_gs_threads = 112,
-   .max_cs_threads = 6 * 6,
-   .urb = {
-      .size = 192,
-      .min_vs_entries = 34,
-      .min_ds_entries = 34,
-      .max_vs_entries = 704,
-      .max_tcs_entries = 256,
-      .max_tes_entries = 416,
-      .max_gs_entries = 256,
-   }
+   GEN9_LP_FEATURES
 };
 
 static const struct gen_device_info gen_device_info_bxt_2x6 = {
-   GEN9_FEATURES,
-   .is_broxton = 1,
-   .gt = 1,
-   .has_llc = false,
-
-   .num_slices = 1,
-   .max_vs_threads = 56, /* XXX: guess */
-   .max_tcs_threads = 56, /* XXX: guess */
-   .max_tes_threads = 56,
-   .max_gs_threads = 56,
-   .max_cs_threads = 6 * 6,
-   .urb = {
-      .size = 128,
-      .min_vs_entries = 34,
-      .min_ds_entries = 34,
-      .max_vs_entries = 352,
-      .max_tcs_entries = 128,
-      .max_tes_entries = 208,
-      .max_gs_entries = 128,
-   }
+   GEN9_LP_FEATURES_2X6
 };
 /*
  * Note: for all KBL SKUs, the PRM says SKL for GS entries, not SKL+.
@@ -476,49 +476,11 @@ static const struct gen_device_info gen_device_info_kbl_gt4 = {
 };
 
 static const struct gen_device_info gen_device_info_glk = {
-   GEN9_FEATURES,
-   .is_broxton = 1,
-   .gt = 1,
-   .has_llc = false,
-
-   .num_slices = 1,
-   .max_vs_threads = 112,
-   .max_tcs_threads = 112,
-   .max_tes_threads = 112,
-   .max_gs_threads = 112,
-   .max_cs_threads = 6 * 6,
-   .urb = {
-      .size = 192,
-      .min_vs_entries = 34,
-      .min_ds_entries = 34,
-      .max_vs_entries = 704,
-      .max_tcs_entries = 256,
-      .max_tes_entries = 416,
-      .max_gs_entries = 256,
-   }
+   GEN9_LP_FEATURES
 };
 
 static const struct gen_device_info gen_device_info_glk_2x6 = {
-   GEN9_FEATURES,
-   .is_broxton = 1,
-   .gt = 1,
-   .has_llc = false,
-
-   .num_slices = 1,
-   .max_vs_threads = 56, /* XXX: guess */
-   .max_tcs_threads = 56, /* XXX: guess */
-   .max_tes_threads = 56,
-   .max_gs_threads = 56,
-   .max_cs_threads = 6 * 6,
-   .urb = {
-      .size = 128,
-      .min_vs_entries = 34,
-      .min_ds_entries = 34,
-      .max_vs_entries = 352,
-      .max_tcs_entries = 128,
-      .max_tes_entries = 208,
-      .max_gs_entries = 128,
-   }
+   GEN9_LP_FEATURES_2X6
 };
 
 bool