From 2aa3dc83399a16588ba06ec1718ed709f55bb8d9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 29 Jun 2016 12:11:28 +0100 Subject: intel_chipset: Replace lookup of GT size with computation Instead of a large if-chain for matching devid to GT, we can just compute it directly from the encoded devid. Signed-off-by: Chris Wilson --- tools/intel_reg_checker.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'tools/intel_reg_checker.c') diff --git a/tools/intel_reg_checker.c b/tools/intel_reg_checker.c index 2d6da70c..6bde63ec 100644 --- a/tools/intel_reg_checker.c +++ b/tools/intel_reg_checker.c @@ -162,16 +162,17 @@ check_gt_mode(void) if (gen == 6) check_perf_bit(gt_mode, 8, "Full Rate Sampler Disable", false); - /* For DevSmallGT, this bit must be set, which means disable - * hashing. - */ - if (devid == PCI_CHIP_SANDYBRIDGE_GT1 || - devid == PCI_CHIP_SANDYBRIDGE_M_GT1) - check_bit(gt_mode, 6, "WIZ Hashing disable", true); - else if (gen == 6) - check_perf_bit(gt_mode, 6, "WIZ Hashing disable", false); - if (gen == 6) { + /* For DevSmallGT, this bit must be set, which means disable + * hashing. + */ + if (intel_gt(devid) == 0) + check_bit(gt_mode, 6, + "WIZ Hashing disable", true); + else + check_perf_bit(gt_mode, 6, + "WIZ Hashing disable", false); + check_perf_bit(gt_mode, 5, "TD Four Row Dispatch Disable", false); check_perf_bit(gt_mode, 4, "Full Size URB Disable", false); -- cgit v1.2.3