diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2024-08-29 15:03:54 +0300 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2024-08-30 12:25:10 +0200 |
commit | 6121239034b662632bd6ed2cdbe68b4236b84693 (patch) | |
tree | d5a57b793972933ec7930558857b0425961823dc /src/gallium | |
parent | 56d048a4ac4c2675d5e5adb308b3cd8bddf848b5 (diff) |
iris: fix utrace compute end timestamp reads on Gfx20
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30923>
(cherry picked from commit 91b3ae71d71789c0846d592c83782b6885c48e2a)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_utrace.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_utrace.c b/src/gallium/drivers/iris/iris_utrace.c index 477e620b68d..907c45c937e 100644 --- a/src/gallium/drivers/iris/iris_utrace.c +++ b/src/gallium/drivers/iris/iris_utrace.c @@ -57,7 +57,19 @@ union iris_utrace_timestamp { * [2] = 32b Context Timestamp End * [3] = 32b Global Timestamp End" */ - uint32_t compute_walker[4]; + uint32_t gfx125_postsync_data[4]; + + /* Timestamp written by COMPUTE_WALKER::PostSync + * + * BSpec 56591: + * + * "The timestamp layout : + * [0] = 64b Context Timestamp Start + * [1] = 64b Global Timestamp Start + * [2] = 64b Context Timestamp End + * [3] = 64b Global Timestamp End" + */ + uint64_t gfx20_postsync_data[4]; }; static void * @@ -139,8 +151,15 @@ iris_utrace_read_ts(struct u_trace_context *utctx, if (ts[idx].timestamp == U_TRACE_NO_TIMESTAMP) return U_TRACE_NO_TIMESTAMP; - /* Detect a 16bytes timestamp write */ - if (ts[idx].compute_walker[2] != 0 || ts[idx].compute_walker[3] != 0) { + /* Detect a 16/32 bytes timestamp write */ + if (ts[idx].gfx20_postsync_data[1] != 0 || + ts[idx].gfx20_postsync_data[2] != 0 || + ts[idx].gfx20_postsync_data[3] != 0) { + if (screen->devinfo->ver >= 20) { + return intel_device_info_timebase_scale(screen->devinfo, + ts[idx].gfx20_postsync_data[3]); + } + /* The timestamp written by COMPUTE_WALKER::PostSync only as 32bits. We * need to rebuild the full 64bits using the previous timestamp. We * assume that utrace is reading the timestamp in order. Anyway @@ -149,7 +168,7 @@ iris_utrace_read_ts(struct u_trace_context *utctx, */ uint64_t timestamp = (ice->utrace.last_full_timestamp & 0xffffffff00000000) | - (uint64_t) ts[idx].compute_walker[3]; + (uint64_t) ts[idx].gfx125_postsync_data[3]; return intel_device_info_timebase_scale(screen->devinfo, timestamp); } |