[Mesa-dev] [PATCH 01/10] intel: common: add flag to identify platforms by name

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Jun 15 00:38:26 UTC 2017


The perf infrastructure needs to identify specific platforms, not just
generations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/common/gen_device_info.c | 23 +++++++++++++++++------
 src/intel/common/gen_device_info.h |  3 +++
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/intel/common/gen_device_info.c b/src/intel/common/gen_device_info.c
index 75284a66419..fee112ce25b 100644
--- a/src/intel/common/gen_device_info.c
+++ b/src/intel/common/gen_device_info.c
@@ -412,7 +412,6 @@ static const struct gen_device_info gen_device_info_chv = {
 
 #define GEN9_LP_FEATURES                           \
    GEN9_FEATURES,                                  \
-   .is_broxton = 1,                                \
    .gt = 1,                                        \
    .has_llc = false,                               \
    .num_slices = 1,                                \
@@ -463,6 +462,7 @@ static const struct gen_device_info gen_device_info_chv = {
 
 static const struct gen_device_info gen_device_info_skl_gt1 = {
    GEN9_FEATURES, .gt = 1,
+   .is_skylake = true,
    .num_slices = 1,
    .l3_banks = 2,
    .urb.size = 192,
@@ -470,18 +470,21 @@ static const struct gen_device_info gen_device_info_skl_gt1 = {
 
 static const struct gen_device_info gen_device_info_skl_gt2 = {
    GEN9_FEATURES, .gt = 2,
+   .is_skylake = true,
    .num_slices = 1,
    .l3_banks = 4,
 };
 
 static const struct gen_device_info gen_device_info_skl_gt3 = {
    GEN9_FEATURES, .gt = 3,
+   .is_skylake = true,
    .num_slices = 2,
    .l3_banks = 8,
 };
 
 static const struct gen_device_info gen_device_info_skl_gt4 = {
    GEN9_FEATURES, .gt = 4,
+   .is_skylake = true,
    .num_slices = 3,
    .l3_banks = 12,
    /* From the "L3 Allocation and Programming" documentation:
@@ -497,11 +500,13 @@ static const struct gen_device_info gen_device_info_skl_gt4 = {
 
 static const struct gen_device_info gen_device_info_bxt = {
    GEN9_LP_FEATURES,
+   .is_broxton = true,
    .l3_banks = 2,
 };
 
 static const struct gen_device_info gen_device_info_bxt_2x6 = {
    GEN9_LP_FEATURES_2X6,
+   .is_broxton = true,
    .l3_banks = 1,
 };
 /*
@@ -570,12 +575,14 @@ static const struct gen_device_info gen_device_info_kbl_gt4 = {
 
 static const struct gen_device_info gen_device_info_glk = {
    GEN9_LP_FEATURES,
+   .is_geminilake = true,
    .l3_banks = 2,
 };
 
 /*TODO: Initialize l3_banks when we know the number. */
 static const struct gen_device_info gen_device_info_glk_2x6 = {
-   GEN9_LP_FEATURES_2X6
+   GEN9_LP_FEATURES_2X6,
+   .is_geminilake = true,
 };
 
 #define GEN10_HW_INFO                               \
@@ -606,22 +613,26 @@ static const struct gen_device_info gen_device_info_glk_2x6 = {
 
 static const struct gen_device_info gen_device_info_cnl_2x8 = {
    /* GT0.5 */
-   GEN10_FEATURES(1, 1, 2)
+   GEN10_FEATURES(1, 1, 2),
+   .is_cannonlake = true,
 };
 
 static const struct gen_device_info gen_device_info_cnl_3x8 = {
    /* GT1 */
-   GEN10_FEATURES(1, 1, 3)
+   GEN10_FEATURES(1, 1, 3),
+   .is_cannonlake = true,
 };
 
 static const struct gen_device_info gen_device_info_cnl_4x8 = {
    /* GT 1.5 */
-   GEN10_FEATURES(1, 2, 6)
+   GEN10_FEATURES(1, 2, 6),
+   .is_cannonlake = true,
 };
 
 static const struct gen_device_info gen_device_info_cnl_5x8 = {
    /* GT2 */
-   GEN10_FEATURES(2, 2, 6)
+   GEN10_FEATURES(2, 2, 6),
+   .is_cannonlake = true,
 };
 
 bool
diff --git a/src/intel/common/gen_device_info.h b/src/intel/common/gen_device_info.h
index 62076305194..2dd3d1b7688 100644
--- a/src/intel/common/gen_device_info.h
+++ b/src/intel/common/gen_device_info.h
@@ -40,8 +40,11 @@ struct gen_device_info
    bool is_baytrail;
    bool is_haswell;
    bool is_cherryview;
+   bool is_skylake;
    bool is_broxton;
    bool is_kabylake;
+   bool is_geminilake;
+   bool is_cannonlake;
 
    bool has_hiz_and_separate_stencil;
    bool must_use_separate_stencil;
-- 
2.11.0



More information about the mesa-dev mailing list