Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib: intel: report GT size from the database if available
@ 2018-03-20 13:47 Lionel Landwerlin
  2018-03-20 13:47 ` [igt-dev] [PATCH i-g-t 2/2] tests/perf: print out GT size if unknown Lionel Landwerlin
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Lionel Landwerlin @ 2018-03-20 13:47 UTC (permalink / raw)
  To: igt-dev

The scheme if getting the GT size from the PCI-id doesn't work anymore
on Coffeelake.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105451, https://bugs.freedesktop.org/show_bug.cgi?id=101740
---
 lib/intel_device_info.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/intel_device_info.c b/lib/intel_device_info.c
index 1c710733..c104c9c4 100644
--- a/lib/intel_device_info.c
+++ b/lib/intel_device_info.c
@@ -410,8 +410,17 @@ unsigned intel_gen(uint16_t devid)
  */
 unsigned intel_gt(uint16_t devid)
 {
+	const struct intel_device_info *devinfo = intel_get_device_info(devid);
 	unsigned mask = intel_gen(devid);
 
+	/* If in the database, just use that information. */
+	if (devinfo->gt != 0)
+		return devinfo->gt - 1;
+
+	/*
+	 * This scheme doesn't work on Coffeelake, we should probably
+	 * not rely on this anymore.
+	 */
 	if (mask >= 8)
 		mask = 0xf;
 	else if (mask >= 6)
-- 
2.16.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-15  9:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 13:47 [igt-dev] [PATCH i-g-t 1/2] lib: intel: report GT size from the database if available Lionel Landwerlin
2018-03-20 13:47 ` [igt-dev] [PATCH i-g-t 2/2] tests/perf: print out GT size if unknown Lionel Landwerlin
2018-03-20 16:14 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib: intel: report GT size from the database if available Patchwork
2018-03-20 19:10 ` [igt-dev] ✗ Fi.CI.IGT: warning " Patchwork
2018-05-14 13:15 ` [igt-dev] [PATCH i-g-t 1/2] " Lionel Landwerlin
2018-05-14 15:41   ` Chris Wilson
2018-05-14 15:50     ` Lionel Landwerlin
2018-05-14 16:15       ` Chris Wilson
2018-05-15  9:18         ` Lionel Landwerlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox