intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t 1/4] lib/i915: Identify Rocketlake
@ 2020-07-24 17:06 Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 2/4] lib/i915: Report unknown device as the future Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2020-07-24 17:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Chris Wilson

commit a048d54f58dd ("lib: Sync i915 PCI ids") added the ids for
Rocketlake, but no identification tables.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2217
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/intel_chipset.h     | 2 ++
 lib/intel_device_info.c | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index 929fac530..aab823a17 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -73,6 +73,7 @@ struct intel_device_info {
 	bool is_icelake : 1;
 	bool is_elkhartlake : 1;
 	bool is_tigerlake : 1;
+	bool is_rocketlake : 1;
 	const char *codename;
 };
 
@@ -172,6 +173,7 @@ void intel_check_pch(void);
 #define IS_CANNONLAKE(devid)	(intel_get_device_info(devid)->is_cannonlake)
 #define IS_ICELAKE(devid)	(intel_get_device_info(devid)->is_icelake)
 #define IS_TIGERLAKE(devid)	(intel_get_device_info(devid)->is_tigerlake)
+#define IS_ROCKETLAKE(devid)	(intel_get_device_info(devid)->is_rocketlake)
 
 #define IS_GEN(devid, x)	(intel_get_device_info(devid)->gen & (1u << ((x)-1)))
 #define AT_LEAST_GEN(devid, x)	(intel_get_device_info(devid)->gen & -(1u << ((x)-1)))
diff --git a/lib/intel_device_info.c b/lib/intel_device_info.c
index 21f7a9570..6c9ac388c 100644
--- a/lib/intel_device_info.c
+++ b/lib/intel_device_info.c
@@ -321,6 +321,12 @@ static const struct intel_device_info intel_tigerlake_info = {
 	.codename = "tigerlake"
 };
 
+static const struct intel_device_info intel_rocketlake_info = {
+	.gen = BIT(11),
+	.is_rocketlake = true,
+	.codename = "rocketlake"
+};
+
 static const struct pci_id_match intel_device_match[] = {
 	INTEL_I810_IDS(&intel_i810_info),
 	INTEL_I815_IDS(&intel_i815_info),
@@ -405,6 +411,7 @@ static const struct pci_id_match intel_device_match[] = {
 	INTEL_EHL_IDS(&intel_elkhartlake_info),
 
 	INTEL_TGL_12_IDS(&intel_tigerlake_info),
+	INTEL_RKL_IDS(&intel_rocketlake_info),
 
 	INTEL_VGA_DEVICE(PCI_MATCH_ANY, &intel_generic_info),
 };
-- 
2.28.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] [PATCH i-g-t 2/4] lib/i915: Report unknown device as the future
  2020-07-24 17:06 [Intel-gfx] [PATCH i-g-t 1/4] lib/i915: Identify Rocketlake Chris Wilson
@ 2020-07-24 17:06 ` Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 3/4] tools: Use the gt number stored in the device info Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 4/4] lib/i915: Pick a subtest conformant name for an unknown engine Chris Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2020-07-24 17:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Chris Wilson

Since we likely know all the old devices, an unknown device is most
likely a future device, so use -1u instead of 0 for its generation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/intel_device_info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/intel_device_info.c b/lib/intel_device_info.c
index 6c9ac388c..eee7cac94 100644
--- a/lib/intel_device_info.c
+++ b/lib/intel_device_info.c
@@ -454,11 +454,11 @@ out:
  * Computes the Intel GFX generation for the given device id.
  *
  * Returns:
- * The GFX generation on successful lookup, 0 on failure.
+ * The GFX generation on successful lookup, -1u on failure.
  */
 unsigned intel_gen(uint16_t devid)
 {
-	return ffs(intel_get_device_info(devid)->gen);
+	return ffs(intel_get_device_info(devid)->gen) ?: -1u;
 }
 
 /**
-- 
2.28.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] [PATCH i-g-t 3/4] tools: Use the gt number stored in the device info
  2020-07-24 17:06 [Intel-gfx] [PATCH i-g-t 1/4] lib/i915: Identify Rocketlake Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 2/4] lib/i915: Report unknown device as the future Chris Wilson
@ 2020-07-24 17:06 ` Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 4/4] lib/i915: Pick a subtest conformant name for an unknown engine Chris Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2020-07-24 17:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Chris Wilson

Don't use the encoded information within the PCI-ID for the GT value, as
the rules keep changing. Use the device info instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/intel_chipset.h       |  1 -
 lib/intel_device_info.c   | 23 -----------------------
 tools/intel_l3_parity.c   |  5 +++--
 tools/intel_reg_checker.c |  5 +++++
 4 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index aab823a17..18f860ca1 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -80,7 +80,6 @@ struct intel_device_info {
 const struct intel_device_info *intel_get_device_info(uint16_t devid) __attribute__((pure));
 
 unsigned intel_gen(uint16_t devid) __attribute__((pure));
-unsigned intel_gt(uint16_t devid) __attribute__((pure));
 
 extern enum pch_type intel_pch;
 
diff --git a/lib/intel_device_info.c b/lib/intel_device_info.c
index eee7cac94..e57204438 100644
--- a/lib/intel_device_info.c
+++ b/lib/intel_device_info.c
@@ -460,26 +460,3 @@ unsigned intel_gen(uint16_t devid)
 {
 	return ffs(intel_get_device_info(devid)->gen) ?: -1u;
 }
-
-/**
- * intel_gt:
- * @devid: pci device id
- *
- * Computes the Intel GFX GT size for the given device id.
- *
- * Returns:
- * The GT size.
- */
-unsigned intel_gt(uint16_t devid)
-{
-	unsigned mask = intel_gen(devid);
-
-	if (mask >= 8)
-		mask = 0xf;
-	else if (mask >= 6)
-		mask = 0x3;
-	else
-		mask = 0;
-
-	return (devid >> 4) & mask;
-}
diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c
index 340f94b1a..484dd0281 100644
--- a/tools/intel_l3_parity.c
+++ b/tools/intel_l3_parity.c
@@ -44,10 +44,11 @@
 #include "intel_l3_parity.h"
 
 static unsigned int devid;
+
 /* L3 size is always a function of banks. The number of banks cannot be
  * determined by number of slices however */
 static inline int num_banks(void) {
-	switch (intel_gt(devid)) {
+	switch (intel_get_device_info(devid)->gt) {
 	case 2: return 8;
 	case 1: return 4;
 	default: return 2;
@@ -61,7 +62,7 @@ static inline int num_banks(void) {
 #define MAX_ROW (1<<12)
 #define MAX_BANKS_PER_SLICE 4
 #define NUM_REGS (MAX_BANKS_PER_SLICE * NUM_SUBBANKS)
-#define MAX_SLICES (intel_gt(devid) > 1 ? 2 : 1)
+#define MAX_SLICES (intel_get_device_info(devid)->gt > 1 ? 2 : 1)
 #define REAL_MAX_SLICES 2
 /* TODO support SLM config */
 #define L3_SIZE ((MAX_ROW * 4) * NUM_SUBBANKS *  num_banks())
diff --git a/tools/intel_reg_checker.c b/tools/intel_reg_checker.c
index 3f90de824..2aefabc67 100644
--- a/tools/intel_reg_checker.c
+++ b/tools/intel_reg_checker.c
@@ -143,6 +143,11 @@ check_gfx_mode(void)
 	check_perf_bit(gfx_mode, 13, "Flush TLB Invalidation Mode", true);
 }
 
+static unsigned intel_gt(uint16_t __devid)
+{
+	return intel_get_device_info(__devid)->gt;
+}
+
 static void
 check_gt_mode(void)
 {
-- 
2.28.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] [PATCH i-g-t 4/4] lib/i915: Pick a subtest conformant name for an unknown engine
  2020-07-24 17:06 [Intel-gfx] [PATCH i-g-t 1/4] lib/i915: Identify Rocketlake Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 2/4] lib/i915: Report unknown device as the future Chris Wilson
  2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 3/4] tools: Use the gt number stored in the device info Chris Wilson
@ 2020-07-24 17:06 ` Chris Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2020-07-24 17:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Chris Wilson

IGT disallows ':' in its subtest names, and as we use the engine name
for dynamic subtest names, pick a name that doesn't accidentally cause
IGT to assert (even when those tests are not being run).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/i915/gem_engine_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index 76222186c..63e1b7ddc 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -136,7 +136,7 @@ static void init_engine(struct intel_execution_engine2 *e2,
 	} else {
 		igt_debug("found unknown engine (%d, %d)\n", class, instance);
 		e2->flags = -1;
-		ret = snprintf(e2->name, sizeof(e2->name), "%u:%u",
+		ret = snprintf(e2->name, sizeof(e2->name), "c%u_%u",
 			       class, instance);
 	}
 
-- 
2.28.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2020-07-24 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 17:06 [Intel-gfx] [PATCH i-g-t 1/4] lib/i915: Identify Rocketlake Chris Wilson
2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 2/4] lib/i915: Report unknown device as the future Chris Wilson
2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 3/4] tools: Use the gt number stored in the device info Chris Wilson
2020-07-24 17:06 ` [Intel-gfx] [PATCH i-g-t 4/4] lib/i915: Pick a subtest conformant name for an unknown engine Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).