summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2022-12-15 08:43:37 -0800
committerMarge Bot <emma+marge@anholt.net>2022-12-17 19:14:12 +0000
commit995c64ddcbbf0c9dc17e23fd7bb4726980718dfc (patch)
tree7dbb473a7f5990888e18fba720a6f4fbb58c6009
parentbe6d21ed56a02b4343442c3bf2b314fcdc5c34e2 (diff)
downloadmesa-995c64ddcbbf0c9dc17e23fd7bb4726980718dfc.tar.gz
freedreno/drm/virtio: More tracepoints
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
-rw-r--r--src/freedreno/drm/freedreno_pipe.c2
-rw-r--r--src/freedreno/drm/freedreno_priv.h1
-rw-r--r--src/freedreno/drm/virtio/virtio_bo.c2
-rw-r--r--src/freedreno/drm/virtio/virtio_device.c2
-rw-r--r--src/freedreno/drm/virtio/virtio_pipe.c2
5 files changed, 9 insertions, 0 deletions
diff --git a/src/freedreno/drm/freedreno_pipe.c b/src/freedreno/drm/freedreno_pipe.c
index 4f655247ce0..b81b2907c77 100644
--- a/src/freedreno/drm/freedreno_pipe.c
+++ b/src/freedreno/drm/freedreno_pipe.c
@@ -279,6 +279,7 @@ fd_fence_del_locked(struct fd_fence *f)
void
fd_fence_flush(struct fd_fence *f)
{
+ MESA_TRACE_FUNC();
/*
* TODO we could simplify this to remove the flush_sync part of
* fd_pipe_sp_flush() and just rely on the util_queue_fence_wait()
@@ -290,5 +291,6 @@ fd_fence_flush(struct fd_fence *f)
int
fd_fence_wait(struct fd_fence *f)
{
+ MESA_TRACE_FUNC();
return fd_pipe_wait(f->pipe, f);
}
diff --git a/src/freedreno/drm/freedreno_priv.h b/src/freedreno/drm/freedreno_priv.h
index 7cc3d9b37a6..6c4a473d01c 100644
--- a/src/freedreno/drm/freedreno_priv.h
+++ b/src/freedreno/drm/freedreno_priv.h
@@ -41,6 +41,7 @@
#include "util/hash_table.h"
#include "util/list.h"
#include "util/log.h"
+#include "util/perf/cpu_trace.h"
#include "util/simple_mtx.h"
#include "util/slab.h"
#include "util/u_atomic.h"
diff --git a/src/freedreno/drm/virtio/virtio_bo.c b/src/freedreno/drm/virtio/virtio_bo.c
index 9c96a9423f3..c46df75d4d2 100644
--- a/src/freedreno/drm/virtio/virtio_bo.c
+++ b/src/freedreno/drm/virtio/virtio_bo.c
@@ -91,6 +91,7 @@ virtio_bo_cpu_prep_guest(struct fd_bo *bo)
static int
virtio_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
{
+ MESA_TRACE_FUNC();
int ret;
/*
@@ -193,6 +194,7 @@ virtio_bo_set_name(struct fd_bo *bo, const char *fmt, va_list ap)
static void
bo_upload(struct fd_bo *bo, unsigned off, void *src, unsigned len)
{
+ MESA_TRACE_FUNC();
unsigned req_len = sizeof(struct msm_ccmd_gem_upload_req) + align(len, 4);
struct virtio_bo *virtio_bo = to_virtio_bo(bo);
diff --git a/src/freedreno/drm/virtio/virtio_device.c b/src/freedreno/drm/virtio/virtio_device.c
index 2e8f52dd58d..8578328225b 100644
--- a/src/freedreno/drm/virtio/virtio_device.c
+++ b/src/freedreno/drm/virtio/virtio_device.c
@@ -332,6 +332,7 @@ virtio_execbuf_flush(struct fd_device *dev)
int
virtio_execbuf(struct fd_device *dev, struct msm_ccmd_req *req, bool sync)
{
+ MESA_TRACE_FUNC();
struct virtio_device *virtio_dev = to_virtio_device(dev);
int fence_fd, ret = 0;
@@ -388,6 +389,7 @@ virtio_host_sync(struct fd_device *dev, const struct msm_ccmd_req *req)
int
virtio_simple_ioctl(struct fd_device *dev, unsigned cmd, void *_req)
{
+ MESA_TRACE_FUNC();
unsigned req_len = sizeof(struct msm_ccmd_ioctl_simple_req);
unsigned rsp_len = sizeof(struct msm_ccmd_ioctl_simple_rsp);
diff --git a/src/freedreno/drm/virtio/virtio_pipe.c b/src/freedreno/drm/virtio/virtio_pipe.c
index bb54442cbfb..2c9fd6d7b70 100644
--- a/src/freedreno/drm/virtio/virtio_pipe.c
+++ b/src/freedreno/drm/virtio/virtio_pipe.c
@@ -48,6 +48,7 @@ query_param(struct fd_pipe *pipe, uint32_t param, uint64_t *value)
static int
query_queue_param(struct fd_pipe *pipe, uint32_t param, uint64_t *value)
{
+ MESA_TRACE_FUNC();
struct msm_ccmd_submitqueue_query_req req = {
.hdr = MSM_CCMD(SUBMITQUEUE_QUERY, sizeof(req)),
.queue_id = to_virtio_pipe(pipe)->queue_id,
@@ -118,6 +119,7 @@ virtio_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
static int
virtio_pipe_wait(struct fd_pipe *pipe, const struct fd_fence *fence, uint64_t timeout)
{
+ MESA_TRACE_FUNC();
struct msm_ccmd_wait_fence_req req = {
.hdr = MSM_CCMD(WAIT_FENCE, sizeof(req)),
.queue_id = to_virtio_pipe(pipe)->queue_id,