anv: Add warning about mismatch between query queues

Cc: 24.2 <mesa-stable>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30652>
This commit is contained in:
José Roberto de Souza 2024-08-19 11:13:17 -07:00 committed by Marge Bot
parent c5d79d533a
commit 0a19d92ca5
3 changed files with 8 additions and 0 deletions

View file

@ -1332,6 +1332,10 @@ anv_queue_exec_locked(struct anv_queue *queue,
}
}
if (perf_query_pool && device->perf_queue != queue)
debug_warn_once("Mismatch between queue that OA stream was open and "
"queue were query will be executed.");
result =
device->kmd_backend->queue_exec_locked(
queue,

View file

@ -92,6 +92,7 @@ void
anv_device_perf_init(struct anv_device *device)
{
device->perf_fd = -1;
device->perf_queue = NULL;
}
void
@ -127,6 +128,8 @@ anv_device_perf_open(struct anv_device *device, struct anv_queue *queue, uint64_
ret = intel_perf_stream_open(device->physical->perf, device->fd,
context_or_exec_queue_id, metric_id,
period_exponent, true, true);
if (ret >= 0)
device->perf_queue = queue;
return ret;
}

View file

@ -1953,6 +1953,7 @@ struct anv_device {
struct anv_cmd_buffer *cmd_buffer_being_decoded;
int perf_fd; /* -1 if no opened */
struct anv_queue *perf_queue;
struct intel_aux_map_context *aux_map_ctx;