From 8ff33a756d14a7daf7a5efd7abceccbfa6b570e3 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 20 Jul 2024 08:47:04 -0700 Subject: [PATCH] freedreno/cffdec: Fix a7xx CP_EVENT_WRITE decoding Signed-off-by: Rob Clark Part-of: --- src/freedreno/.gitlab-ci/reference/crash.log | 2 +- .../.gitlab-ci/reference/crash_prefetch.log | 2 +- .../.gitlab-ci/reference/prefetch-test.log | 18 +++++++++--------- src/freedreno/decode/cffdec.c | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/freedreno/.gitlab-ci/reference/crash.log b/src/freedreno/.gitlab-ci/reference/crash.log index b7753907f38..9d6d1f22623 100644 --- a/src/freedreno/.gitlab-ci/reference/crash.log +++ b/src/freedreno/.gitlab-ci/reference/crash.log @@ -1730,7 +1730,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x1 } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 00000001 registers-gmu: 00000001 GMU_ICACHE_CONFIG: 0x1 diff --git a/src/freedreno/.gitlab-ci/reference/crash_prefetch.log b/src/freedreno/.gitlab-ci/reference/crash_prefetch.log index 56a1f8bb113..2c671e67832 100644 --- a/src/freedreno/.gitlab-ci/reference/crash_prefetch.log +++ b/src/freedreno/.gitlab-ci/reference/crash_prefetch.log @@ -13162,7 +13162,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x3dc3f } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 0003dc3f opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 diff --git a/src/freedreno/.gitlab-ci/reference/prefetch-test.log b/src/freedreno/.gitlab-ci/reference/prefetch-test.log index b0fe6979a47..ee461065288 100644 --- a/src/freedreno/.gitlab-ci/reference/prefetch-test.log +++ b/src/freedreno/.gitlab-ci/reference/prefetch-test.log @@ -2471,7 +2471,7 @@ got cmdszdw=438 { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x152b } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 0000152b opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -146993,7 +146993,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x152c } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 0000152c opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147050,7 +147050,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x152d } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 0000152d opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147099,7 +147099,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x152e } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 0000152e opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147150,7 +147150,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x152f } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 0000152f opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147207,7 +147207,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x1530 } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 00001530 opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147256,7 +147256,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x1531 } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 00001531 opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147307,7 +147307,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x1532 } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 00001532 opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 @@ -147364,7 +147364,7 @@ ESTIMATED CRASH LOCATION! { ADDR_0_LO = 0x4 } { ADDR_0_HI = 0x10000 } { 3 = 0x1533 } - event (null) + event CACHE_FLUSH_TS 0000000000000000: 0000: 70460004 80000004 00000004 00010000 00001533 opcode: CP_WHERE_AM_I (62) (3 dwords) 0000000000000000: 0000: 70620002 00011000 00010000 diff --git a/src/freedreno/decode/cffdec.c b/src/freedreno/decode/cffdec.c index da12cc627e8..349173a646c 100644 --- a/src/freedreno/decode/cffdec.c +++ b/src/freedreno/decode/cffdec.c @@ -1900,7 +1900,7 @@ static void dump_register_summary(int level); static void cp_event_write(uint32_t *dwords, uint32_t sizedwords, int level) { - const char *name = rnn_enumname(rnn, "vgt_event_type", dwords[0]); + const char *name = rnn_enumname(rnn, "vgt_event_type", dwords[0] & 0xff); printl(2, "%sevent %s\n", levels[level], name); if (name && (options->info->chip > 5)) { @@ -2955,6 +2955,7 @@ static const struct type3_op { /* for a7xx */ CP(THREAD_CONTROL, cp_set_thread_control), CP(CONTEXT_REG_BUNCH2, cp_context_reg_bunch2), + CP(EVENT_WRITE7, cp_event_write), }; static void