1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright © 2021 Igalia S.L. 3bf215546Sopenharmony_ci * SPDX-License-Identifier: MIT 4bf215546Sopenharmony_ci */ 5bf215546Sopenharmony_ci 6bf215546Sopenharmony_ci#include "tu_device.h" 7bf215546Sopenharmony_ci#include "tu_perfetto.h" 8bf215546Sopenharmony_ci 9bf215546Sopenharmony_ci/* Including tu_device.h in tu_perfetto.cc doesn't work, so 10bf215546Sopenharmony_ci * we need some helper methods to access tu_device. 11bf215546Sopenharmony_ci */ 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_cistruct tu_perfetto_state * 14bf215546Sopenharmony_citu_device_get_perfetto_state(struct tu_device *dev) 15bf215546Sopenharmony_ci{ 16bf215546Sopenharmony_ci return &dev->perfetto; 17bf215546Sopenharmony_ci} 18bf215546Sopenharmony_ci 19bf215546Sopenharmony_ciuint32_t 20bf215546Sopenharmony_citu_u_trace_submission_data_get_submit_id(const struct tu_u_trace_submission_data *data) 21bf215546Sopenharmony_ci{ 22bf215546Sopenharmony_ci return data->submission_id; 23bf215546Sopenharmony_ci} 24