summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/v3d/v3d_sched.c
diff options
context:
space:
mode:
authorMaíra Canal <mcanal@igalia.com>2023-11-30 17:40:32 +0100
committerMaíra Canal <mcanal@igalia.com>2023-12-01 13:37:48 +0100
commit1fe0879efc8f623816c7a825d853d2140c88cb2d (patch)
treeba99d0aca4051904c89d2b6895f0e586a49d63ad /drivers/gpu/drm/v3d/v3d_sched.c
parentdrm/v3d: Use v3d_get_extensions() to parse CPU job data (diff)
downloadlinux-1fe0879efc8f623816c7a825d853d2140c88cb2d.tar.xz
linux-1fe0879efc8f623816c7a825d853d2140c88cb2d.zip
drm/v3d: Create tracepoints to track the CPU job
Create tracepoints to track the three major events of a CPU job lifetime: 1. Submission of a `v3d_submit_cpu` IOCTL 2. Beginning of the execution of a CPU job 3. Ending of the execution of a CPU job Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-11-mcanal@igalia.com
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_sched.c')
-rw-r--r--drivers/gpu/drm/v3d/v3d_sched.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
index c89e92fc614c..ebbd00840a73 100644
--- a/drivers/gpu/drm/v3d/v3d_sched.c
+++ b/drivers/gpu/drm/v3d/v3d_sched.c
@@ -288,8 +288,12 @@ v3d_cpu_job_run(struct drm_sched_job *sched_job)
file->start_ns[V3D_CPU] = local_clock();
v3d->queue[V3D_CPU].start_ns = file->start_ns[V3D_CPU];
+ trace_v3d_cpu_job_begin(&v3d->drm, job->job_type);
+
cpu_job_function[job->job_type](job);
+ trace_v3d_cpu_job_end(&v3d->drm, job->job_type);
+
runtime = local_clock() - file->start_ns[V3D_CPU];
file->enabled_ns[V3D_CPU] += runtime;