Mesa (main): freedreno/crashdec: Fallback to chip_id for GPU id

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 1 18:20:52 UTC 2021


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

Author: Rob Clark <robdclark at chromium.org>
Date:   Wed Nov 24 15:03:20 2021 -0800

freedreno/crashdec: Fallback to chip_id for GPU id

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13937>

---

 src/freedreno/decode/crashdec.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/decode/crashdec.c b/src/freedreno/decode/crashdec.c
index 19d110b2b48..1ebf74de987 100644
--- a/src/freedreno/decode/crashdec.c
+++ b/src/freedreno/decode/crashdec.c
@@ -713,7 +713,15 @@ decode(void)
    while ((line = popline())) {
       printf("%s", line);
       if (startswith(line, "revision:")) {
-         parseline(line, "revision: %u", &options.gpu_id);
+         unsigned core, major, minor, patchid;
+
+         parseline(line, "revision: %u (%u.%u.%u.%u)", &options.gpu_id,
+                   &core, &major, &minor, &patchid);
+
+         if (options.gpu_id == 0) {
+            options.gpu_id = (core * 100) + (major * 10) + minor;
+         }
+
          printf("Got gpu_id=%u\n", options.gpu_id);
 
          cffdec_init(&options);



More information about the mesa-commit mailing list