Mesa (main): radeonsi/tests: print PCI-id of GPU device under test

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 21 10:56:05 UTC 2022


Module: Mesa
Branch: main
Commit: 21b01538331a4bfc0258da0bdb00a149e0f1289d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=21b01538331a4bfc0258da0bdb00a149e0f1289d

Author: Mihai Preda <mhpreda at gmail.com>
Date:   Wed Feb 16 13:36:14 2022 +0200

radeonsi/tests: print PCI-id of GPU device under test

Allows to identify GPUs in a system with multiple devices of the same model.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15044>

---

 src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py
index 81f55a68440..d209ee9756b 100755
--- a/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py
+++ b/src/gallium/drivers/radeonsi/ci/radeonsi-run-tests.py
@@ -190,9 +190,12 @@ env["PIGLIT_PLATFORM"] = "gbm"
 if "DRI_PRIME" in env:
     print("Don't use DRI_PRIME. Instead use --gpu N")
     del env["DRI_PRIME"]
-if "gpu" in args:
-    env["DRI_PRIME"] = available_gpus[args.gpu][1]
-    env["WAFFLE_GBM_DEVICE"] = available_gpus[args.gpu][0]
+
+assert "gpu" in args, "--gpu defaults to 0"
+
+gpu_device = available_gpus[args.gpu][1]
+env["DRI_PRIME"] = gpu_device
+env["WAFFLE_GBM_DEVICE"] = available_gpus[args.gpu][0]
 
 # Use piglit's glinfo to determine the GPU name
 gpu_name = "unknown"
@@ -213,7 +216,7 @@ for line in p.stdout.decode().split("\n"):
         break
 
 output_folder = args.output_folder
-print_green("Tested GPU: '{}' ({})".format(gpu_name_full, gpu_name))
+print_green("Tested GPU: '{}' ({}) {}".format(gpu_name_full, gpu_name, gpu_device))
 print_green("Output folder: '{}'".format(output_folder))
 
 count = 1



More information about the mesa-commit mailing list