diff --git a/src/freedreno/.gitlab-ci/reference/crash.log b/src/freedreno/.gitlab-ci/reference/crash.log index 765c97a40bd..94a1799fc63 100644 --- a/src/freedreno/.gitlab-ci/reference/crash.log +++ b/src/freedreno/.gitlab-ci/reference/crash.log @@ -5,7 +5,7 @@ time: 1593887022.767858793 comm: crashit cmdline: ./crashit IB1 4 5 revision: 630 (6.3.0.2) -Got gpu_id=630 +Got chip_id=0x6030002 rbbm-status: 0x00000000 ringbuffer: - id: 0 diff --git a/src/freedreno/.gitlab-ci/reference/crash_prefetch.log b/src/freedreno/.gitlab-ci/reference/crash_prefetch.log index cab1f6f6e91..eabec477aa6 100644 --- a/src/freedreno/.gitlab-ci/reference/crash_prefetch.log +++ b/src/freedreno/.gitlab-ci/reference/crash_prefetch.log @@ -6,7 +6,7 @@ comm: deqp-vk cmdline: ./deqp-vk --deqp-log-images=enable --deqp-log-filename=/home/anholt/TestResults.qpa --deqp-surface-type=pbuffer --deqp-surface-width=256 --deqp-surface-height=256 --deqp-gl-config-name=rgba8888d24s8ms0 --deqp-case=dEQP-VK.renderpass2.dedicated_allocation.attachment_allocation.roll.46 gpu-initialized: 1 revision: 618 (6.1.8.0) -Got gpu_id=618 +Got chip_id=0x6010800 rbbm-status: 0x00000000 ringbuffer: - id: 0 diff --git a/src/freedreno/.gitlab-ci/reference/prefetch-test.log b/src/freedreno/.gitlab-ci/reference/prefetch-test.log index c8b05bce293..3c43f9bfa11 100644 --- a/src/freedreno/.gitlab-ci/reference/prefetch-test.log +++ b/src/freedreno/.gitlab-ci/reference/prefetch-test.log @@ -6,7 +6,7 @@ comm: testfw_app:sq0 cmdline: ./testfw_app --gfx glfw --gl_api=gles -t gl_driver2_short gpu-initialized: 1 revision: 618 (6.1.8.0) -Got gpu_id=618 +Got chip_id=0x6010800 rbbm-status: 0x00000000 ringbuffer: - id: 0 diff --git a/src/freedreno/decode/cffdec.h b/src/freedreno/decode/cffdec.h index d277acaffa2..7ef0688532f 100644 --- a/src/freedreno/decode/cffdec.h +++ b/src/freedreno/decode/cffdec.h @@ -46,6 +46,7 @@ enum query_mode { struct cffdec_options { struct fd_dev_id dev_id; + const struct fd_dev_info *info; unsigned gpu_id; int draw_filter; int color; diff --git a/src/freedreno/decode/cffdump.c b/src/freedreno/decode/cffdump.c index 00f7b7633db..6a9b2dfa7c2 100644 --- a/src/freedreno/decode/cffdump.c +++ b/src/freedreno/decode/cffdump.c @@ -339,10 +339,10 @@ handle_file(const char *filename, int start, int end, int draw) options.dev_id.gpu_id = gpu_id; printl(2, "gpu_id: %d\n", options.dev_id.gpu_id); - const struct fd_dev_info *info = fd_dev_info(&options.dev_id); - if (!info) + options.info = fd_dev_info(&options.dev_id); + if (!options.info) break; - options.gpu_id = info->chip * 100; + options.gpu_id = options.info->chip * 100; cffdec_init(&options); got_gpu_id = 1; @@ -353,10 +353,10 @@ handle_file(const char *filename, int start, int end, int draw) options.dev_id.chip_id = parse_chip_id(ps.buf); printl(2, "chip_id: 0x%" PRIx64 "\n", options.dev_id.chip_id); - const struct fd_dev_info *info = fd_dev_info(&options.dev_id); - if (!info) + options.info = fd_dev_info(&options.dev_id); + if (!options.info) break; - options.gpu_id = info->chip * 100; + options.gpu_id = options.info->chip * 100; cffdec_init(&options); got_gpu_id = 1; diff --git a/src/freedreno/decode/crashdec.c b/src/freedreno/decode/crashdec.c index 2b6e99b5c96..256f9a99108 100644 --- a/src/freedreno/decode/crashdec.c +++ b/src/freedreno/decode/crashdec.c @@ -767,14 +767,19 @@ decode(void) if (startswith(line, "revision:")) { unsigned core, major, minor, patchid; - parseline(line, "revision: %u (%u.%u.%u.%u)", &options.gpu_id, + parseline(line, "revision: %u (%u.%u.%u.%u)", &options.dev_id.gpu_id, &core, &major, &minor, &patchid); - if (options.gpu_id == 0) { - options.gpu_id = (core * 100) + (major * 10) + minor; + options.dev_id.chip_id = (core << 24) | (major << 16) | (minor << 8) | patchid; + options.info = fd_dev_info(&options.dev_id); + if (!options.info) { + printf("Unsupported device\n"); + break; } - printf("Got gpu_id=%u\n", options.gpu_id); + options.gpu_id = options.dev_id.gpu_id; + + printf("Got chip_id=0x%"PRIx64"\n", options.dev_id.chip_id); cffdec_init(&options); diff --git a/src/freedreno/decode/crashdec.h b/src/freedreno/decode/crashdec.h index e181b5bf575..b6191c92597 100644 --- a/src/freedreno/decode/crashdec.h +++ b/src/freedreno/decode/crashdec.h @@ -74,7 +74,7 @@ is_64b(void) static inline bool is_gmu_legacy(void) { - switch (options.gpu_id) { + switch (options.dev_id.gpu_id) { case 615: case 618: case 630: