All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t 1/6] lib/i915: Report unknown device as the future
@ 2020-07-10  9:32 ` Chris Wilson
  0 siblings, 0 replies; 16+ messages in thread
From: Chris Wilson @ 2020-07-10  9:32 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 21f7a9570..dfa43f490 100644
--- a/lib/intel_device_info.c
+++ b/lib/intel_device_info.c
@@ -447,11 +447,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.27.0

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

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

end of thread, other threads:[~2020-07-10 14:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10  9:32 [Intel-gfx] [PATCH i-g-t 1/6] lib/i915: Report unknown device as the future Chris Wilson
2020-07-10  9:32 ` [igt-dev] " Chris Wilson
2020-07-10  9:32 ` [Intel-gfx] [PATCH i-g-t 2/6] tools: Use the gt number stored in the device info Chris Wilson
2020-07-10  9:32   ` [igt-dev] " Chris Wilson
2020-07-10  9:32 ` [Intel-gfx] [PATCH i-g-t 3/6] lib/i915: Pick a subtest conformant name for an unknown engine Chris Wilson
2020-07-10  9:32   ` [igt-dev] " Chris Wilson
2020-07-10  9:32 ` [Intel-gfx] [PATCH i-g-t 4/6] i915/gem_close: Adapt to allow duplicate handles Chris Wilson
2020-07-10  9:32   ` [igt-dev] " Chris Wilson
2020-07-10 14:11   ` [Intel-gfx] " Tvrtko Ursulin
2020-07-10 14:11     ` Tvrtko Ursulin
2020-07-10  9:32 ` [Intel-gfx] [PATCH i-g-t 5/6] i915/gem_exec_schedule: Try to spot unfairness Chris Wilson
2020-07-10  9:32   ` [igt-dev] " Chris Wilson
2020-07-10  9:32 ` [Intel-gfx] [PATCH i-g-t 6/6] i915/gem_softpin: Active rebinds Chris Wilson
2020-07-10  9:32   ` [igt-dev] " Chris Wilson
2020-07-10 10:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] lib/i915: Report unknown device as the future Patchwork
2020-07-10 12:06 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.