* Re: [PATCH 00/11] v4l2: Add tracing for stateless codecs
From: Nicolas Dufresne @ 2026-04-28 19:52 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-1-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 5527 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> Hi !
>
> This patchset aims to improve codec event tracing in v4l2.
>
> The traces added in visl by Daniel Almeida are moved to the global trace
> events and slightly reworked to be printed in a more consistent format.
>
> To each trace are also added a tgid and fd fields, helping userspace track
> different decoding sessions (contexts) based on the given file descriptor
> used by the given process id.
>
> Also for better tracking, stream on and stream off events are added as
> well as HW run and HW done events to track decoder core usage.
>
> Finally, add a show_fdinfo callback on video device files, allowing drivers
> to expose usage information.
> Currently only used for frame buffer memory usage.
>
> The main focus is to be able to generate perfetto traces to show VPU usage,
> a perfetto producer using this can be found at [1].
>
> [1]:
> https://gitlab.collabora.com/detlev/hantro-perf/-/tree/hantro-improved-info
I would recommend renaming this repo, as its not really evolving toward
something truly hantro specific anymore, same goes for the code below appart
from the run/done traces and the fdinfo that has to be opted in.
There is effectively a bit of an overlap with the v4l2-tracer, but there is also
advantages having it in the kernel, as you source all the event, for the entire
system, in one place, so I'm fine with that. Considering the possible large
overhead of the full trace, I'd like to see the ability to filter what we want
to trace, with some level of granularity. Maybe we only need decode_params for
specific use case to be debugged, and don't care about large scaling list/matrix
? I would also like to see some Documentation on the tracing, so that its usage
is not only explained in a tool.
To Hans, there is nice tools idea in there, the perfetto producer is simply C++,
and the v4l2top utility is Rust. Would you see these as tools v4l2-utils ? For
the rust part, we can either leave the build independent, and cargo would be
used to build and run, or we can implement a meson wrapper around cargo. But I
don't believe its a good idea to use native rustc support in meson for that one
because of the large number of third party crate needed.
I like the direction, hope the feedback suite you well.
Nicolas
>
> Detlev Casanova (11):
> media: Move visl traces to v4l2-core
> media: Reformat v4l2-requests trace event printk
> media: Add tgid and fd fields in v4l2_fh struct
> media: Add tgid and fd to the v4l2-requests trace fields
> media: Add missing types to v4l2_ctrl_ptr
> media: Trace the stateless controls when set in v4l2-ctrls-core.c
> media: Add stream on/off traces and run them in the ioctl
> media: Add HW run/done trace events
> media: hantro: Add v4l2_hw run/done traces
> media: v4l2: Add callback for show_fdinfo
> media: hantro: Add fdinfo callback
>
> drivers/media/platform/verisilicon/hantro.h | 2 +
> .../media/platform/verisilicon/hantro_drv.c | 25 +
> .../media/platform/verisilicon/hantro_v4l2.c | 10 +-
> .../verisilicon/rockchip_vpu981_regs.h | 1 +
> .../platform/verisilicon/rockchip_vpu_hw.c | 4 +
> drivers/media/test-drivers/visl/Makefile | 2 +-
> drivers/media/test-drivers/visl/visl-dec.c | 76 -
> .../media/test-drivers/visl/visl-trace-av1.h | 314 ---
> .../media/test-drivers/visl/visl-trace-fwht.h | 66 -
> .../media/test-drivers/visl/visl-trace-h264.h | 349 ----
> .../media/test-drivers/visl/visl-trace-hevc.h | 464 -----
> .../test-drivers/visl/visl-trace-mpeg2.h | 99 -
> .../test-drivers/visl/visl-trace-points.c | 11 -
> .../media/test-drivers/visl/visl-trace-vp8.h | 156 --
> .../media/test-drivers/visl/visl-trace-vp9.h | 292 ---
> drivers/media/v4l2-core/v4l2-ctrls-api.c | 10 +
> drivers/media/v4l2-core/v4l2-ctrls-core.c | 114 +
> drivers/media/v4l2-core/v4l2-dev.c | 10 +
> drivers/media/v4l2-core/v4l2-fh.c | 1 +
> drivers/media/v4l2-core/v4l2-ioctl.c | 37 +-
> drivers/media/v4l2-core/v4l2-trace.c | 48 +
> include/media/v4l2-ctrls.h | 19 +
> include/media/v4l2-dev.h | 1 +
> include/media/v4l2-fh.h | 4 +
> include/trace/events/v4l2.h | 58 +
> include/trace/events/v4l2_requests.h | 1836 +++++++++++++++++
> 26 files changed, 2178 insertions(+), 1831 deletions(-)
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-av1.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-fwht.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-h264.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-hevc.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-mpeg2.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-points.c
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-vp8.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-vp9.h
> create mode 100644 include/trace/events/v4l2_requests.h
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 11/11] media: hantro: Add fdinfo callback
From: Nicolas Dufresne @ 2026-04-28 19:41 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-12-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 4001 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> The fdinfo shows the number of buffers in each queue and the total amount
> of video buffer memory.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Notice that the FD info is not linked with all the ftrace work, and could have
been kept separate. I think overall that this fdinfo implementation is a bit
limited, and lack helpers or introducing of common statistics that would be
opted in by other drivers. I would hold on that until we have a bigger and
robust plan.
Nicolas
> ---
> drivers/media/platform/verisilicon/hantro.h | 1 +
> drivers/media/platform/verisilicon/hantro_drv.c | 15 +++++++++++++++
> drivers/media/platform/verisilicon/hantro_v4l2.c | 10 +++++++++-
> 3 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/verisilicon/hantro.h
> b/drivers/media/platform/verisilicon/hantro.h
> index d5cddc783688..9e9fc0658586 100644
> --- a/drivers/media/platform/verisilicon/hantro.h
> +++ b/drivers/media/platform/verisilicon/hantro.h
> @@ -268,6 +268,7 @@ struct hantro_ctx {
> const struct hantro_codec_ops *codec_ops;
> struct hantro_postproc_ctx postproc;
> bool need_postproc;
> + u64 stats_buf_memory;
>
> /* Specific for particular codec modes. */
> union {
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c
> b/drivers/media/platform/verisilicon/hantro_drv.c
> index 8dd26ca32459..86d316a8a3e8 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -17,6 +17,7 @@
> #include <linux/platform_device.h>
> #include <linux/pm.h>
> #include <linux/pm_runtime.h>
> +#include <linux/seq_file.h>
> #include <linux/slab.h>
> #include <linux/videodev2.h>
> #include <linux/workqueue.h>
> @@ -711,6 +712,19 @@ static int hantro_release(struct file *filp)
> return 0;
> }
>
> +static void hantro_show_fdinfo(struct seq_file *m, struct file *filp)
> +{
> + struct hantro_ctx *ctx =
> + container_of(filp->private_data, struct hantro_ctx, fh);
> +
> + struct vb2_queue *src_q = v4l2_m2m_get_src_vq(ctx->fh.m2m_ctx);
> + struct vb2_queue *dst_q = v4l2_m2m_get_dst_vq(ctx->fh.m2m_ctx);
> +
> + seq_printf(m, "src-queued-count: %04u\n", src_q->queued_count);
> + seq_printf(m, "dst-queued-count: %04u\n", dst_q->queued_count);
> + seq_printf(m, "buf-size: %llu\n", ctx->stats_buf_memory);
> +}
> +
> static const struct v4l2_file_operations hantro_fops = {
> .owner = THIS_MODULE,
> .open = hantro_open,
> @@ -718,6 +732,7 @@ static const struct v4l2_file_operations hantro_fops = {
> .poll = v4l2_m2m_fop_poll,
> .unlocked_ioctl = video_ioctl2,
> .mmap = v4l2_m2m_fop_mmap,
> + .show_fdinfo = hantro_show_fdinfo,
> };
>
> static const struct of_device_id of_hantro_match[] = {
> diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c
> b/drivers/media/platform/verisilicon/hantro_v4l2.c
> index fcf3bd9bcda2..6d129613ea3d 100644
> --- a/drivers/media/platform/verisilicon/hantro_v4l2.c
> +++ b/drivers/media/platform/verisilicon/hantro_v4l2.c
> @@ -820,18 +820,26 @@ hantro_queue_setup(struct vb2_queue *vq, unsigned int
> *num_buffers,
> return -EINVAL;
> }
>
> + ctx->stats_buf_memory = 0;
> +
> if (*num_planes) {
> if (*num_planes != pixfmt->num_planes)
> return -EINVAL;
> - for (i = 0; i < pixfmt->num_planes; ++i)
> + for (i = 0; i < pixfmt->num_planes; ++i) {
> if (sizes[i] < pixfmt->plane_fmt[i].sizeimage)
> return -EINVAL;
> + ctx->stats_buf_memory += pixfmt-
> >plane_fmt[i].sizeimage;
> + }
> +
> + ctx->stats_buf_memory *= *num_buffers;
> +
> return 0;
> }
>
> *num_planes = pixfmt->num_planes;
> for (i = 0; i < pixfmt->num_planes; ++i)
> sizes[i] = pixfmt->plane_fmt[i].sizeimage;
> +
> return 0;
> }
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 06/11] media: Trace the stateless controls when set in v4l2-ctrls-core.c
From: Nicolas Dufresne @ 2026-04-28 19:37 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-7-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 13188 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> Also remove the trace from visl as the generic v4l2-requests traces can
> now be used instead.
>
> It allows all stateless drivers to inherit traceability, with just a small
> overhead when disabled in userspace.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> drivers/media/test-drivers/visl/visl-dec.c | 74 -------------
> drivers/media/v4l2-core/v4l2-ctrls-api.c | 10 ++
> drivers/media/v4l2-core/v4l2-ctrls-core.c | 114 +++++++++++++++++++++
> include/media/v4l2-ctrls.h | 15 +++
> 4 files changed, 139 insertions(+), 74 deletions(-)
>
> diff --git a/drivers/media/test-drivers/visl/visl-dec.c b/drivers/media/test-drivers/visl/visl-dec.c
> index fc216da17048..9517830fb3e8 100644
> --- a/drivers/media/test-drivers/visl/visl-dec.c
> +++ b/drivers/media/test-drivers/visl/visl-dec.c
> @@ -12,7 +12,6 @@
> #include <linux/workqueue.h>
> #include <media/v4l2-mem2mem.h>
> #include <media/tpg/v4l2-tpg.h>
> -#include <trace/events/v4l2_requests.h>
>
> #define LAST_BUF_IDX (V4L2_AV1_REF_LAST_FRAME - V4L2_AV1_REF_LAST_FRAME)
> #define LAST2_BUF_IDX (V4L2_AV1_REF_LAST2_FRAME - V4L2_AV1_REF_LAST_FRAME)
> @@ -486,78 +485,6 @@ static void visl_tpg_fill(struct visl_ctx *ctx, struct visl_run *run)
> }
> }
>
> -static void visl_trace_ctrls(struct visl_ctx *ctx, struct visl_run *run)
> -{
> - int i;
> - struct v4l2_fh *fh = &ctx->fh;
> -
> - switch (ctx->current_codec) {
> - default:
> - case VISL_CODEC_NONE:
> - break;
> - case VISL_CODEC_FWHT:
> - trace_v4l2_ctrl_fwht_params(fh->tgid, fh->fd, run->fwht.params);
> - break;
> - case VISL_CODEC_MPEG2:
> - trace_v4l2_ctrl_mpeg2_sequence(fh->tgid, fh->fd, run->mpeg2.seq);
> - trace_v4l2_ctrl_mpeg2_picture(fh->tgid, fh->fd, run->mpeg2.pic);
> - trace_v4l2_ctrl_mpeg2_quantisation(fh->tgid, fh->fd, run->mpeg2.quant);
> - break;
> - case VISL_CODEC_VP8:
> - trace_v4l2_ctrl_vp8_frame(fh->tgid, fh->fd, run->vp8.frame);
> - trace_v4l2_ctrl_vp8_entropy(fh->tgid, fh->fd, run->vp8.frame);
> - break;
> - case VISL_CODEC_VP9:
> - trace_v4l2_ctrl_vp9_frame(fh->tgid, fh->fd, run->vp9.frame);
> - trace_v4l2_ctrl_vp9_compressed_hdr(fh->tgid, fh->fd, run->vp9.probs);
> - trace_v4l2_ctrl_vp9_compressed_coeff(fh->tgid, fh->fd, run->vp9.probs);
> - trace_v4l2_vp9_mv_probs(fh->tgid, fh->fd, &run->vp9.probs->mv);
> - break;
> - case VISL_CODEC_H264:
> - trace_v4l2_ctrl_h264_sps(fh->tgid, fh->fd, run->h264.sps);
> - trace_v4l2_ctrl_h264_pps(fh->tgid, fh->fd, run->h264.pps);
> - trace_v4l2_ctrl_h264_scaling_matrix(fh->tgid, fh->fd, run->h264.sm);
> - trace_v4l2_ctrl_h264_slice_params(fh->tgid, fh->fd, run->h264.spram);
> -
> - for (i = 0; i < ARRAY_SIZE(run->h264.spram->ref_pic_list0); i++)
> - trace_v4l2_h264_ref_pic_list0(fh->tgid, fh->fd,
> - &run->h264.spram->ref_pic_list0[i], i);
> - for (i = 0; i < ARRAY_SIZE(run->h264.spram->ref_pic_list0); i++)
> - trace_v4l2_h264_ref_pic_list1(fh->tgid, fh->fd,
> - &run->h264.spram->ref_pic_list1[i], i);
> -
> - trace_v4l2_ctrl_h264_decode_params(fh->tgid, fh->fd, run->h264.dpram);
> -
> - for (i = 0; i < ARRAY_SIZE(run->h264.dpram->dpb); i++)
> - trace_v4l2_h264_dpb_entry(fh->tgid, fh->fd, &run->h264.dpram->dpb[i], i);
> -
> - trace_v4l2_ctrl_h264_pred_weights(fh->tgid, fh->fd, run->h264.pwht);
> - break;
> - case VISL_CODEC_HEVC:
> - trace_v4l2_ctrl_hevc_sps(fh->tgid, fh->fd, run->hevc.sps);
> - trace_v4l2_ctrl_hevc_pps(fh->tgid, fh->fd, run->hevc.pps);
> - trace_v4l2_ctrl_hevc_slice_params(fh->tgid, fh->fd, run->hevc.spram);
> - trace_v4l2_ctrl_hevc_scaling_matrix(fh->tgid, fh->fd, run->hevc.sm);
> - trace_v4l2_ctrl_hevc_decode_params(fh->tgid, fh->fd, run->hevc.dpram);
> -
> - for (i = 0; i < ARRAY_SIZE(run->hevc.dpram->dpb); i++)
> - trace_v4l2_hevc_dpb_entry(fh->tgid, fh->fd, &run->hevc.dpram->dpb[i]);
> -
> -
> - trace_v4l2_hevc_pred_weight_table(fh->tgid, fh->fd,
> - &run->hevc.spram->pred_weight_table);
> - trace_v4l2_ctrl_hevc_ext_sps_lt_rps(fh->tgid, fh->fd, run->hevc.rps_lt);
> - trace_v4l2_ctrl_hevc_ext_sps_st_rps(fh->tgid, fh->fd, run->hevc.rps_st);
> - break;
> - case VISL_CODEC_AV1:
> - trace_v4l2_ctrl_av1_sequence(fh->tgid, fh->fd, run->av1.seq);
> - trace_v4l2_ctrl_av1_frame(fh->tgid, fh->fd, run->av1.frame);
> - trace_v4l2_ctrl_av1_film_grain(fh->tgid, fh->fd, run->av1.grain);
> - trace_v4l2_ctrl_av1_tile_group_entry(fh->tgid, fh->fd, run->av1.tge);
> - break;
> - }
> -}
> -
> void visl_device_run(void *priv)
> {
> struct visl_ctx *ctx = priv;
> @@ -634,7 +561,6 @@ void visl_device_run(void *priv)
> run.dst->sequence, run.dst->vb2_buf.timestamp);
>
> visl_tpg_fill(ctx, &run);
> - visl_trace_ctrls(ctx, &run);
>
> if (bitstream_trace_frame_start > -1 &&
> run.dst->sequence >= bitstream_trace_frame_start &&
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls-api.c b/drivers/media/v4l2-core/v4l2-ctrls-api.c
> index 0078a04c5445..8a814eec7a30 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls-api.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls-api.c
> @@ -524,6 +524,12 @@ int v4l2_g_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct video_device *vdev,
> }
> EXPORT_SYMBOL(v4l2_g_ext_ctrls);
>
> +static void trace_ext_ctrl(struct v4l2_fh *fh, const struct v4l2_ctrl *ctrl)
> +{
> + if (ctrl->type_ops->trace)
> + ctrl->type_ops->trace(fh, ctrl, ctrl->p_cur);
> +}
> +
> /* Validate a new control */
> static int validate_new(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr p_new)
> {
> @@ -713,6 +719,10 @@ int try_set_ext_ctrls_common(struct v4l2_fh *fh,
> idx = helpers[idx].next;
> } while (!ret && idx);
> }
> +
> + if (set)
> + trace_ext_ctrl(fh, master);
> +
> v4l2_ctrl_unlock(master);
> }
>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> index 79a157975f70..6165e36d8879 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> @@ -10,8 +10,11 @@
> #include <linux/slab.h>
> #include <media/v4l2-ctrls.h>
> #include <media/v4l2-event.h>
> +#include <media/v4l2-fh.h>
> #include <media/v4l2-fwnode.h>
>
> +#include <trace/events/v4l2_requests.h>
> +
> #include "v4l2-ctrls-priv.h"
>
> static const union v4l2_ctrl_ptr ptr_null;
> @@ -1462,12 +1465,123 @@ int v4l2_ctrl_type_op_validate(const struct v4l2_ctrl *ctrl,
> }
> EXPORT_SYMBOL(v4l2_ctrl_type_op_validate);
>
> +void v4l2_ctrl_type_op_trace(const struct v4l2_fh *fh,
> + const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr)
> +{
> + int i = 0;
> +
> + switch ((u32)ctrl->type) {
> + case V4L2_CTRL_TYPE_FWHT_PARAMS:
> + trace_v4l2_ctrl_fwht_params(fh->tgid, fh->fd, ptr.p_fwht_params);
> + break;
> + case V4L2_CTRL_TYPE_MPEG2_SEQUENCE:
> + trace_v4l2_ctrl_mpeg2_sequence(fh->tgid, fh->fd, ptr.p_mpeg2_sequence);
> + break;
> + case V4L2_CTRL_TYPE_MPEG2_PICTURE:
> + trace_v4l2_ctrl_mpeg2_picture(fh->tgid, fh->fd, ptr.p_mpeg2_picture);
> + break;
> + case V4L2_CTRL_TYPE_MPEG2_QUANTISATION:
> + trace_v4l2_ctrl_mpeg2_quantisation(fh->tgid, fh->fd, ptr.p_mpeg2_quantisation);
> + break;
> + case V4L2_CTRL_TYPE_VP8_FRAME:
> + trace_v4l2_ctrl_vp8_frame(fh->tgid, fh->fd, ptr.p_vp8_frame);
> + trace_v4l2_ctrl_vp8_entropy(fh->tgid, fh->fd, ptr.p_vp8_frame);
> + break;
> + case V4L2_CTRL_TYPE_VP9_FRAME:
> + trace_v4l2_ctrl_vp9_frame(fh->tgid, fh->fd, ptr.p_vp9_frame);
> + break;
> + case V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR:
> + trace_v4l2_ctrl_vp9_compressed_hdr(fh->tgid, fh->fd,
> + ptr.p_vp9_compressed_hdr_probs);
> + trace_v4l2_ctrl_vp9_compressed_coeff(fh->tgid, fh->fd,
> + ptr.p_vp9_compressed_hdr_probs);
> + trace_v4l2_vp9_mv_probs(fh->tgid, fh->fd, &ptr.p_vp9_compressed_hdr_probs->mv);
> + break;
> + case V4L2_CTRL_TYPE_H264_SPS:
> + trace_v4l2_ctrl_h264_sps(fh->tgid, fh->fd, ptr.p_h264_sps);
> + break;
> + case V4L2_CTRL_TYPE_H264_PPS:
> + trace_v4l2_ctrl_h264_pps(fh->tgid, fh->fd, ptr.p_h264_pps);
> + break;
> + case V4L2_CTRL_TYPE_H264_SCALING_MATRIX:
> + trace_v4l2_ctrl_h264_scaling_matrix(fh->tgid, fh->fd, ptr.p_h264_scaling_matrix);
> + break;
> + case V4L2_CTRL_TYPE_H264_SLICE_PARAMS:
> + {
> + struct v4l2_ctrl_h264_slice_params *sp = ptr.p_h264_slice_params;
> +
> + trace_v4l2_ctrl_h264_slice_params(fh->tgid, fh->fd, sp);
> +
> + for (i = 0; i < ARRAY_SIZE(sp->ref_pic_list0); i++)
> + trace_v4l2_h264_ref_pic_list0(fh->tgid, fh->fd, &sp->ref_pic_list0[i], i);
> + for (i = 0; i < ARRAY_SIZE(sp->ref_pic_list1); i++)
> + trace_v4l2_h264_ref_pic_list1(fh->tgid, fh->fd, &sp->ref_pic_list1[i], i);
> +
> + break;
> + }
> + case V4L2_CTRL_TYPE_H264_DECODE_PARAMS:
> + {
> + struct v4l2_ctrl_h264_decode_params *dp = ptr.p_h264_decode_params;
> +
> + trace_v4l2_ctrl_h264_decode_params(fh->tgid, fh->fd, dp);
> +
> + for (i = 0; i < ARRAY_SIZE(dp->dpb); i++)
> + trace_v4l2_h264_dpb_entry(fh->tgid, fh->fd, &dp->dpb[i], i);
> +
> + break;
> + }
> + case V4L2_CTRL_TYPE_H264_PRED_WEIGHTS:
> + trace_v4l2_ctrl_h264_pred_weights(fh->tgid, fh->fd, ptr.p_h264_pred_weights);
> + break;
> + case V4L2_CTRL_TYPE_HEVC_SPS:
> + trace_v4l2_ctrl_hevc_sps(fh->tgid, fh->fd, ptr.p_hevc_sps);
> + break;
> + case V4L2_CTRL_TYPE_HEVC_PPS:
> + trace_v4l2_ctrl_hevc_pps(fh->tgid, fh->fd, ptr.p_hevc_pps);
> + break;
> + case V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS:
> + trace_v4l2_ctrl_hevc_slice_params(fh->tgid, fh->fd, ptr.p_hevc_slice_params);
> + trace_v4l2_hevc_pred_weight_table(fh->tgid, fh->fd,
> + &ptr.p_hevc_slice_params->pred_weight_table);
> + break;
> + case V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX:
> + trace_v4l2_ctrl_hevc_scaling_matrix(fh->tgid, fh->fd, ptr.p_hevc_scaling_matrix);
> + break;
> + case V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS:
> + {
> + struct v4l2_ctrl_hevc_decode_params *dp = ptr.p_hevc_decode_params;
> +
> + trace_v4l2_ctrl_hevc_decode_params(fh->tgid, fh->fd, dp);
> +
> + for (i = 0; i < ARRAY_SIZE(dp->dpb); i++)
> + trace_v4l2_hevc_dpb_entry(fh->tgid, fh->fd, &dp->dpb[i]);
> +
> + break;
> + }
> + case V4L2_CTRL_TYPE_AV1_SEQUENCE:
> + trace_v4l2_ctrl_av1_sequence(fh->tgid, fh->fd, ptr.p_av1_sequence);
> + break;
> + case V4L2_CTRL_TYPE_AV1_FRAME:
> + trace_v4l2_ctrl_av1_frame(fh->tgid, fh->fd, ptr.p_av1_frame);
> + break;
> + case V4L2_CTRL_TYPE_AV1_FILM_GRAIN:
> + trace_v4l2_ctrl_av1_film_grain(fh->tgid, fh->fd, ptr.p_av1_film_grain);
> + break;
> + case V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY:
> + trace_v4l2_ctrl_av1_tile_group_entry(fh->tgid, fh->fd, ptr.p_av1_tile_group_entry);
> + break;
Some controls are pretty generic, so what about these, the non compound ?
Nicolas
> + }
> +
> +}
> +EXPORT_SYMBOL(v4l2_ctrl_type_op_trace);
> +
> static const struct v4l2_ctrl_type_ops std_type_ops = {
> .equal = v4l2_ctrl_type_op_equal,
> .init = v4l2_ctrl_type_op_init,
> .minimum = v4l2_ctrl_type_op_minimum,
> .maximum = v4l2_ctrl_type_op_maximum,
> .log = v4l2_ctrl_type_op_log,
> + .trace = v4l2_ctrl_type_op_trace,
> .validate = v4l2_ctrl_type_op_validate,
> };
>
> diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
> index a2b4c96a9a6f..57c4bb999b7b 100644
> --- a/include/media/v4l2-ctrls.h
> +++ b/include/media/v4l2-ctrls.h
> @@ -140,6 +140,7 @@ struct v4l2_ctrl_ops {
> * @minimum: set the value to the minimum value of the control.
> * @maximum: set the value to the maximum value of the control.
> * @log: log the value.
> + * @trace: trace the value of the control with Ftrace.
> * @validate: validate the value for ctrl->new_elems array elements.
> * Return 0 on success and a negative value otherwise.
> */
> @@ -153,6 +154,8 @@ struct v4l2_ctrl_type_ops {
> void (*maximum)(const struct v4l2_ctrl *ctrl, u32 idx,
> union v4l2_ctrl_ptr ptr);
> void (*log)(const struct v4l2_ctrl *ctrl);
> + void (*trace)(const struct v4l2_fh *fh,
> + const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr);
> int (*validate)(const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr);
> };
>
> @@ -1627,6 +1630,18 @@ void v4l2_ctrl_type_op_init(const struct v4l2_ctrl *ctrl, u32 from_idx,
> */
> void v4l2_ctrl_type_op_log(const struct v4l2_ctrl *ctrl);
>
> +/**
> + * v4l2_ctrl_type_op_trace - Default v4l2_ctrl_type_ops trace callback.
> + *
> + * @fh: The v4l2_fh of the current context.
> + * @ctrl: The v4l2_ctrl pointer.
> + * @ptr: The v4l2 control value.
> + *
> + * Return: void
> + */
> +void v4l2_ctrl_type_op_trace(const struct v4l2_fh *fh,
> + const struct v4l2_ctrl *ctrl, union v4l2_ctrl_ptr ptr);
> +
> /**
> * v4l2_ctrl_type_op_validate - Default v4l2_ctrl_type_ops validate callback.
> *
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 05/11] media: Add missing types to v4l2_ctrl_ptr
From: Nicolas Dufresne @ 2026-04-28 19:33 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-6-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> The v4l2_ctrl_ptr union contains pointers for all control types, but
> v4l2_ctrl_hevc_decode_params and v4l2_ctrl_hevc_scaling_matrix are missing.
>
> Add them.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> include/media/v4l2-ctrls.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
> index 327976b14d50..a2b4c96a9a6f 100644
> --- a/include/media/v4l2-ctrls.h
> +++ b/include/media/v4l2-ctrls.h
> @@ -49,6 +49,8 @@ struct video_device;
> * @p_hevc_sps: Pointer to an HEVC sequence parameter
> set structure.
> * @p_hevc_pps: Pointer to an HEVC picture parameter
> set structure.
> * @p_hevc_slice_params: Pointer to an HEVC slice parameters
> structure.
> + * @p_hevc_decode_params: Pointer to an HEVC decode parameters
> structure.
> + * @p_hevc_scaling_matrix Pointer to an HEVC scaling matrix structure.
> * @p_hdr10_cll: Pointer to an HDR10 Content Light Level
> structure.
> * @p_hdr10_mastering: Pointer to an HDR10 Mastering Display
> structure.
> * @p_area: Pointer to an area.
> @@ -81,6 +83,8 @@ union v4l2_ctrl_ptr {
> struct v4l2_ctrl_hevc_sps *p_hevc_sps;
> struct v4l2_ctrl_hevc_pps *p_hevc_pps;
> struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
> + struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params;
> + struct v4l2_ctrl_hevc_scaling_matrix *p_hevc_scaling_matrix;
> struct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;
> struct v4l2_ctrl_vp9_frame *p_vp9_frame;
> struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 04/11] media: Add tgid and fd to the v4l2-requests trace fields
From: Nicolas Dufresne @ 2026-04-28 19:32 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-5-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 53197 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> With these fields, userspace can better track which trace event matches
> with a given stream.
>
> Even though the trace shows the PID (based on current->tgid), trace
> functions could be called from other contexts, therefore showing the wrong
> PID, or none at all.
>
> These will ensure that the trace event can be matched with the PID/FD that
> opened and configured the video device file.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> drivers/media/test-drivers/visl/visl-dec.c | 68 +--
> include/trace/events/v4l2_requests.h | 622 +++++++++++++--------
> 2 files changed, 439 insertions(+), 251 deletions(-)
>
> diff --git a/drivers/media/test-drivers/visl/visl-dec.c b/drivers/media/test-drivers/visl/visl-dec.c
> index d49208e83726..fc216da17048 100644
> --- a/drivers/media/test-drivers/visl/visl-dec.c
> +++ b/drivers/media/test-drivers/visl/visl-dec.c
> @@ -489,67 +489,71 @@ static void visl_tpg_fill(struct visl_ctx *ctx, struct visl_run *run)
> static void visl_trace_ctrls(struct visl_ctx *ctx, struct visl_run *run)
> {
> int i;
> + struct v4l2_fh *fh = &ctx->fh;
>
> switch (ctx->current_codec) {
> default:
> case VISL_CODEC_NONE:
> break;
> case VISL_CODEC_FWHT:
> - trace_v4l2_ctrl_fwht_params(run->fwht.params);
> + trace_v4l2_ctrl_fwht_params(fh->tgid, fh->fd, run->fwht.params);
> break;
> case VISL_CODEC_MPEG2:
> - trace_v4l2_ctrl_mpeg2_sequence(run->mpeg2.seq);
> - trace_v4l2_ctrl_mpeg2_picture(run->mpeg2.pic);
> - trace_v4l2_ctrl_mpeg2_quantisation(run->mpeg2.quant);
> + trace_v4l2_ctrl_mpeg2_sequence(fh->tgid, fh->fd, run->mpeg2.seq);
> + trace_v4l2_ctrl_mpeg2_picture(fh->tgid, fh->fd, run->mpeg2.pic);
> + trace_v4l2_ctrl_mpeg2_quantisation(fh->tgid, fh->fd, run->mpeg2.quant);
> break;
> case VISL_CODEC_VP8:
> - trace_v4l2_ctrl_vp8_frame(run->vp8.frame);
> - trace_v4l2_ctrl_vp8_entropy(run->vp8.frame);
> + trace_v4l2_ctrl_vp8_frame(fh->tgid, fh->fd, run->vp8.frame);
> + trace_v4l2_ctrl_vp8_entropy(fh->tgid, fh->fd, run->vp8.frame);
> break;
> case VISL_CODEC_VP9:
> - trace_v4l2_ctrl_vp9_frame(run->vp9.frame);
> - trace_v4l2_ctrl_vp9_compressed_hdr(run->vp9.probs);
> - trace_v4l2_ctrl_vp9_compressed_coeff(run->vp9.probs);
> - trace_v4l2_vp9_mv_probs(&run->vp9.probs->mv);
> + trace_v4l2_ctrl_vp9_frame(fh->tgid, fh->fd, run->vp9.frame);
> + trace_v4l2_ctrl_vp9_compressed_hdr(fh->tgid, fh->fd, run->vp9.probs);
> + trace_v4l2_ctrl_vp9_compressed_coeff(fh->tgid, fh->fd, run->vp9.probs);
> + trace_v4l2_vp9_mv_probs(fh->tgid, fh->fd, &run->vp9.probs->mv);
> break;
> case VISL_CODEC_H264:
> - trace_v4l2_ctrl_h264_sps(run->h264.sps);
> - trace_v4l2_ctrl_h264_pps(run->h264.pps);
> - trace_v4l2_ctrl_h264_scaling_matrix(run->h264.sm);
> - trace_v4l2_ctrl_h264_slice_params(run->h264.spram);
> + trace_v4l2_ctrl_h264_sps(fh->tgid, fh->fd, run->h264.sps);
> + trace_v4l2_ctrl_h264_pps(fh->tgid, fh->fd, run->h264.pps);
> + trace_v4l2_ctrl_h264_scaling_matrix(fh->tgid, fh->fd, run->h264.sm);
> + trace_v4l2_ctrl_h264_slice_params(fh->tgid, fh->fd, run->h264.spram);
>
> for (i = 0; i < ARRAY_SIZE(run->h264.spram->ref_pic_list0); i++)
> - trace_v4l2_h264_ref_pic_list0(&run->h264.spram->ref_pic_list0[i], i);
> + trace_v4l2_h264_ref_pic_list0(fh->tgid, fh->fd,
> + &run->h264.spram->ref_pic_list0[i], i);
> for (i = 0; i < ARRAY_SIZE(run->h264.spram->ref_pic_list0); i++)
> - trace_v4l2_h264_ref_pic_list1(&run->h264.spram->ref_pic_list1[i], i);
> + trace_v4l2_h264_ref_pic_list1(fh->tgid, fh->fd,
> + &run->h264.spram->ref_pic_list1[i], i);
>
> - trace_v4l2_ctrl_h264_decode_params(run->h264.dpram);
> + trace_v4l2_ctrl_h264_decode_params(fh->tgid, fh->fd, run->h264.dpram);
>
> for (i = 0; i < ARRAY_SIZE(run->h264.dpram->dpb); i++)
> - trace_v4l2_h264_dpb_entry(&run->h264.dpram->dpb[i], i);
> + trace_v4l2_h264_dpb_entry(fh->tgid, fh->fd, &run->h264.dpram->dpb[i], i);
>
> - trace_v4l2_ctrl_h264_pred_weights(run->h264.pwht);
> + trace_v4l2_ctrl_h264_pred_weights(fh->tgid, fh->fd, run->h264.pwht);
> break;
> case VISL_CODEC_HEVC:
> - trace_v4l2_ctrl_hevc_sps(run->hevc.sps);
> - trace_v4l2_ctrl_hevc_pps(run->hevc.pps);
> - trace_v4l2_ctrl_hevc_slice_params(run->hevc.spram);
> - trace_v4l2_ctrl_hevc_scaling_matrix(run->hevc.sm);
> - trace_v4l2_ctrl_hevc_decode_params(run->hevc.dpram);
> + trace_v4l2_ctrl_hevc_sps(fh->tgid, fh->fd, run->hevc.sps);
> + trace_v4l2_ctrl_hevc_pps(fh->tgid, fh->fd, run->hevc.pps);
> + trace_v4l2_ctrl_hevc_slice_params(fh->tgid, fh->fd, run->hevc.spram);
> + trace_v4l2_ctrl_hevc_scaling_matrix(fh->tgid, fh->fd, run->hevc.sm);
> + trace_v4l2_ctrl_hevc_decode_params(fh->tgid, fh->fd, run->hevc.dpram);
>
> for (i = 0; i < ARRAY_SIZE(run->hevc.dpram->dpb); i++)
> - trace_v4l2_hevc_dpb_entry(&run->hevc.dpram->dpb[i]);
> + trace_v4l2_hevc_dpb_entry(fh->tgid, fh->fd, &run->hevc.dpram->dpb[i]);
>
> - trace_v4l2_hevc_pred_weight_table(&run->hevc.spram->pred_weight_table);
> - trace_v4l2_ctrl_hevc_ext_sps_lt_rps(run->hevc.rps_lt);
> - trace_v4l2_ctrl_hevc_ext_sps_st_rps(run->hevc.rps_st);
>
> + trace_v4l2_hevc_pred_weight_table(fh->tgid, fh->fd,
> + &run->hevc.spram->pred_weight_table);
> + trace_v4l2_ctrl_hevc_ext_sps_lt_rps(fh->tgid, fh->fd, run->hevc.rps_lt);
> + trace_v4l2_ctrl_hevc_ext_sps_st_rps(fh->tgid, fh->fd, run->hevc.rps_st);
> break;
> case VISL_CODEC_AV1:
> - trace_v4l2_ctrl_av1_sequence(run->av1.seq);
> - trace_v4l2_ctrl_av1_frame(run->av1.frame);
> - trace_v4l2_ctrl_av1_film_grain(run->av1.grain);
> - trace_v4l2_ctrl_av1_tile_group_entry(run->av1.tge);
> + trace_v4l2_ctrl_av1_sequence(fh->tgid, fh->fd, run->av1.seq);
> + trace_v4l2_ctrl_av1_frame(fh->tgid, fh->fd, run->av1.frame);
> + trace_v4l2_ctrl_av1_film_grain(fh->tgid, fh->fd, run->av1.grain);
> + trace_v4l2_ctrl_av1_tile_group_entry(fh->tgid, fh->fd, run->av1.tge);
> break;
> }
> }
> diff --git a/include/trace/events/v4l2_requests.h b/include/trace/events/v4l2_requests.h
> index 34f4a74df5ea..ab6718f40e28 100644
> --- a/include/trace/events/v4l2_requests.h
> +++ b/include/trace/events/v4l2_requests.h
> @@ -10,12 +10,18 @@
>
> /* AV1 controls */
> DECLARE_EVENT_CLASS(v4l2_ctrl_av1_seq_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_sequence *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_sequence, s)),
> - TP_fast_assign(__entry->s = *s;),
> - TP_printk("flags = %s, seq_profile = %u, order_hint_bits = %u, bit_depth = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_sequence *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_av1_sequence, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s;),
> + TP_printk("tgid = %u, fd = %u, "
> + "flags = %s, seq_profile = %u, order_hint_bits = %u, bit_depth = %u, "
> "max_frame_width_minus_1 = %u, max_frame_height_minus_1 = %u",
> + __entry->tgid, __entry->fd,
> __print_flags(__entry->s.flags, "|",
> {V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE, "STILL_PICTURE"},
> {V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK, "USE_128X128_SUPERBLOCK"},
> @@ -46,11 +52,17 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_seq_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_av1_tge_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_tile_group_entry *t),
> - TP_ARGS(t),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_tile_group_entry, t)),
> - TP_fast_assign(__entry->t = *t;),
> - TP_printk("tile_offset = %u, tile_size = %u, tile_row = %u, tile_col = %u",
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_tile_group_entry *t),
> + TP_ARGS(tgid, fd, t),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_av1_tile_group_entry, t)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->t = *t;),
> + TP_printk("tgid = %u, fd = %u, "
> + "tile_offset = %u, tile_size = %u, tile_row = %u, tile_col = %u",
> + __entry->tgid, __entry->fd,
> __entry->t.tile_offset,
> __entry->t.tile_size,
> __entry->t.tile_row,
> @@ -59,11 +71,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_tge_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_av1_frame_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("tile_info.flags = %s, tile_info.context_update_tile_id = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_frame *f),
> + TP_ARGS(tgid, fd, f),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_av1_frame, f)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->f = *f;),
> + TP_printk("tgid = %u, fd = %u, "
> + "tile_info.flags = %s, tile_info.context_update_tile_id = %u, "
> "tile_info.tile_cols = %u, tile_info.tile_rows = %u, "
> "tile_info.mi_col_starts = %s, tile_info.mi_row_starts = %s, "
> "tile_info.width_in_sbs_minus_1 = %s, tile_info.height_in_sbs_minus_1 = %s, "
> @@ -87,6 +104,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_frame_tmpl,
> "render_width_minus_1 = %u, render_height_minus_1 = %u, current_frame_id = %u, "
> "buffer_removal_time = %s, order_hints = %s, reference_frame_ts = %s, "
> "ref_frame_idx = %s, refresh_frame_flags = %u",
> + __entry->tgid, __entry->fd,
> __print_flags(__entry->f.tile_info.flags, "|",
> {V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING, "UNIFORM_TILE_SPACING"}),
> __entry->f.tile_info.context_update_tile_id,
> @@ -222,11 +240,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_frame_tmpl,
>
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_av1_film_grain_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_film_grain *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_film_grain, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("flags = %s, cr_mult = %u, grain_seed = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_film_grain *f),
> + TP_ARGS(tgid, fd, f),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_av1_film_grain, f)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->f = *f;),
> + TP_printk("tgid = %u, fd = %u, "
> + "flags = %s, cr_mult = %u, grain_seed = %u, "
> "film_grain_params_ref_idx = %u, num_y_points = %u, point_y_value = %s, "
> "point_y_scaling = %s, num_cb_points = %u, point_cb_value = %s, "
> "point_cb_scaling = %s, num_cr_points = %u, point_cr_value = %s, "
> @@ -235,6 +258,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_film_grain_tmpl,
> "ar_coeffs_cr_plus_128 = %s, ar_coeff_shift_minus_6 = %u, "
> "grain_scale_shift = %u, cb_mult = %u, cb_luma_mult = %u, cr_luma_mult = %u, "
> "cb_offset = %u, cr_offset = %u",
> + __entry->tgid, __entry->fd,
> __print_flags(__entry->f.flags, "|",
> {V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN, "APPLY_GRAIN"},
> {V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN, "UPDATE_GRAIN"},
> @@ -287,31 +311,32 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_film_grain_tmpl,
> )
>
> DEFINE_EVENT(v4l2_ctrl_av1_seq_tmpl, v4l2_ctrl_av1_sequence,
> - TP_PROTO(const struct v4l2_ctrl_av1_sequence *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_sequence *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_ctrl_av1_frame_tmpl, v4l2_ctrl_av1_frame,
> - TP_PROTO(const struct v4l2_ctrl_av1_frame *f),
> - TP_ARGS(f)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_frame *f),
> + TP_ARGS(tgid, fd, f)
> );
>
> DEFINE_EVENT(v4l2_ctrl_av1_tge_tmpl, v4l2_ctrl_av1_tile_group_entry,
> - TP_PROTO(const struct v4l2_ctrl_av1_tile_group_entry *t),
> - TP_ARGS(t)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_tile_group_entry *t),
> + TP_ARGS(tgid, fd, t)
> );
>
> DEFINE_EVENT(v4l2_ctrl_av1_film_grain_tmpl, v4l2_ctrl_av1_film_grain,
> - TP_PROTO(const struct v4l2_ctrl_av1_film_grain *f),
> - TP_ARGS(f)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_av1_film_grain *f),
> + TP_ARGS(tgid, fd, f)
> );
>
> /* FWHT controls */
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_fwht_params *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> __field(u64, backward_ref_ts)
> __field(u32, version)
> __field(u32, width)
> @@ -322,7 +347,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> __field(u32, ycbcr_enc)
> __field(u32, quantization)
> ),
> - TP_fast_assign(
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> __entry->backward_ref_ts = p->backward_ref_ts;
> __entry->version = p->version;
> __entry->width = p->width;
> @@ -333,7 +359,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> __entry->ycbcr_enc = p->ycbcr_enc;
> __entry->quantization = p->quantization;
> ),
> - TP_printk("backward_ref_ts = %llu, "
> + TP_printk("tgid = %u, fd = %u, "
> + "backward_ref_ts = %llu, "
> "version = %u, "
> "width = %u, "
> "height = %u, "
> @@ -342,6 +369,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> "xfer_func = %u, "
> "ycbcr_enc = %u, "
> "quantization = %u",
> + __entry->tgid, __entry->fd,
> __entry->backward_ref_ts, __entry->version, __entry->width, __entry->height,
> __print_flags(__entry->flags, "|",
> {V4L2_FWHT_FL_IS_INTERLACED, "IS_INTERLACED"},
> @@ -361,18 +389,23 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> );
>
> DEFINE_EVENT(v4l2_ctrl_fwht_params_tmpl, v4l2_ctrl_fwht_params,
> - TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_fwht_params *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> /* H264 controls */
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_h264_sps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_sps *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_sps, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("profile_idc = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_sps *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_h264_sps, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s),
> + TP_printk("tgid = %u, fd = %u, "
> + "profile_idc = %u, "
> "constraint_set_flags = %s, "
> "level_idc = %u, "
> "seq_parameter_set_id = %u, "
> @@ -390,6 +423,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_sps_tmpl,
> "pic_width_in_mbs_minus1 = %u, "
> "pic_height_in_map_units_minus1 = %u, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->s.profile_idc,
> __print_flags(__entry->s.constraint_set_flags, "|",
> {V4L2_H264_SPS_CONSTRAINT_SET0_FLAG, "CONSTRAINT_SET0_FLAG"},
> @@ -427,11 +461,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_sps_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_pps *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pps, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("pic_parameter_set_id = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_pps *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_h264_pps, p)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->p = *p),
> + TP_printk("tgid = %u, fd = %u, "
> + "pic_parameter_set_id = %u, "
> "seq_parameter_set_id = %u, "
> "num_slice_groups_minus1 = %u, "
> "num_ref_idx_l0_default_active_minus1 = %u, "
> @@ -442,6 +481,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pps_tmpl,
> "chroma_qp_index_offset = %d, "
> "second_chroma_qp_index_offset = %d, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->p.pic_parameter_set_id,
> __entry->p.seq_parameter_set_id,
> __entry->p.num_slice_groups_minus1,
> @@ -465,11 +505,17 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pps_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_h264_scaling_matrix_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_scaling_matrix *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_scaling_matrix, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("scaling_list_4x4 = {%s}, scaling_list_8x8 = {%s}",
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_scaling_matrix *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_h264_scaling_matrix, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s),
> + TP_printk("tgid = %u, fd = %u, "
> + "scaling_list_4x4 = {%s}, scaling_list_8x8 = {%s}",
> + __entry->tgid, __entry->fd,
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->s.scaling_list_4x4,
> sizeof(__entry->s.scaling_list_4x4),
> @@ -482,11 +528,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_scaling_matrix_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pred_weights_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_pred_weights *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pred_weights, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("luma_log2_weight_denom = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_pred_weights *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_h264_pred_weights, p)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->p = *p),
> + TP_printk("tgid = %u, fd = %u, "
> + "luma_log2_weight_denom = %u, "
> "chroma_log2_weight_denom = %u, "
> "weight_factor[0].luma_weight = %s, "
> "weight_factor[0].luma_offset = %s, "
> @@ -496,6 +547,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pred_weights_tmpl,
> "weight_factor[1].luma_offset = %s, "
> "weight_factor[1].chroma_weight = {%s}, "
> "weight_factor[1].chroma_offset = {%s}",
> + __entry->tgid, __entry->fd,
> __entry->p.luma_log2_weight_denom,
> __entry->p.chroma_log2_weight_denom,
> __print_array(__entry->p.weight_factors[0].luma_weight,
> @@ -530,11 +582,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pred_weights_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_h264_slice_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_slice_params *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_slice_params, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("header_bit_size = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_slice_params *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_h264_slice_params, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s),
> + TP_printk("tgid = %u, fd = %u, "
> + "header_bit_size = %u, "
> "first_mb_in_slice = %u, "
> "slice_type = %s, "
> "colour_plane_id = %u, "
> @@ -548,6 +605,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_slice_params_tmpl,
> "num_ref_idx_l0_active_minus1 = %u, "
> "num_ref_idx_l1_active_minus1 = %u, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->s.header_bit_size,
> __entry->s.first_mb_in_slice,
> __print_symbolic(__entry->s.slice_type,
> @@ -573,12 +631,18 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_slice_params_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_h264_reference_tmpl,
> - TP_PROTO(const struct v4l2_h264_reference *r, int i),
> - TP_ARGS(r, i),
> - TP_STRUCT__entry(__field_struct(struct v4l2_h264_reference, r)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_h264_reference *r, int i),
> + TP_ARGS(tgid, fd, r, i),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_h264_reference, r)
> __field(int, i)),
> - TP_fast_assign(__entry->r = *r; __entry->i = i;),
> - TP_printk("[%d]: fields = %s, index = %u",
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->r = *r; __entry->i = i;),
> + TP_printk("tgid = %u, fd = %u, "
> + "[%d]: fields = %s, index = %u",
> + __entry->tgid, __entry->fd,
> __entry->i,
> __print_flags(__entry->r.fields, "|",
> {V4L2_H264_TOP_FIELD_REF, "TOP_FIELD_REF"},
> @@ -589,11 +653,16 @@ DECLARE_EVENT_CLASS(v4l2_h264_reference_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_h264_decode_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_decode_params *d),
> - TP_ARGS(d),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_decode_params, d)),
> - TP_fast_assign(__entry->d = *d),
> - TP_printk("nal_ref_idc = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_decode_params *d),
> + TP_ARGS(tgid, fd, d),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_h264_decode_params, d)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->d = *d),
> + TP_printk("tgid = %u, fd = %u, "
> + "nal_ref_idc = %u, "
> "frame_num = %u, "
> "top_field_order_cnt = %d, "
> "bottom_field_order_cnt = %d, "
> @@ -606,6 +675,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_decode_params_tmpl,
> "pic_order_cnt_bit_size = %u, "
> "slice_group_change_cycle = %u, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->d.nal_ref_idc,
> __entry->d.frame_num,
> __entry->d.top_field_order_cnt,
> @@ -628,13 +698,19 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_decode_params_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_h264_dpb_entry_tmpl,
> - TP_PROTO(const struct v4l2_h264_dpb_entry *e, int i),
> - TP_ARGS(e, i),
> - TP_STRUCT__entry(__field_struct(struct v4l2_h264_dpb_entry, e)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_h264_dpb_entry *e, int i),
> + TP_ARGS(tgid, fd, e, i),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_h264_dpb_entry, e)
> __field(int, i)),
> - TP_fast_assign(__entry->e = *e; __entry->i = i;),
> - TP_printk("[%d]: reference_ts = %llu, pic_num = %u, frame_num = %u, fields = %s "
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->e = *e; __entry->i = i;),
> + TP_printk("tgid = %u, fd = %u, "
> + "[%d]: reference_ts = %llu, pic_num = %u, frame_num = %u, fields = %s, "
> "top_field_order_cnt = %d, bottom_field_order_cnt = %d, flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->i,
> __entry->e.reference_ts,
> __entry->e.pic_num,
> @@ -654,58 +730,63 @@ DECLARE_EVENT_CLASS(v4l2_h264_dpb_entry_tmpl,
> );
>
> DEFINE_EVENT(v4l2_ctrl_h264_sps_tmpl, v4l2_ctrl_h264_sps,
> - TP_PROTO(const struct v4l2_ctrl_h264_sps *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_sps *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_ctrl_h264_pps_tmpl, v4l2_ctrl_h264_pps,
> - TP_PROTO(const struct v4l2_ctrl_h264_pps *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_pps *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> DEFINE_EVENT(v4l2_ctrl_h264_scaling_matrix_tmpl, v4l2_ctrl_h264_scaling_matrix,
> - TP_PROTO(const struct v4l2_ctrl_h264_scaling_matrix *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_scaling_matrix *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_ctrl_h264_pred_weights_tmpl, v4l2_ctrl_h264_pred_weights,
> - TP_PROTO(const struct v4l2_ctrl_h264_pred_weights *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_pred_weights *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> DEFINE_EVENT(v4l2_ctrl_h264_slice_params_tmpl, v4l2_ctrl_h264_slice_params,
> - TP_PROTO(const struct v4l2_ctrl_h264_slice_params *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_slice_params *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_h264_reference_tmpl, v4l2_h264_ref_pic_list0,
> - TP_PROTO(const struct v4l2_h264_reference *r, int i),
> - TP_ARGS(r, i)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_h264_reference *r, int i),
> + TP_ARGS(tgid, fd, r, i)
> );
>
> DEFINE_EVENT(v4l2_h264_reference_tmpl, v4l2_h264_ref_pic_list1,
> - TP_PROTO(const struct v4l2_h264_reference *r, int i),
> - TP_ARGS(r, i)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_h264_reference *r, int i),
> + TP_ARGS(tgid, fd, r, i)
> );
>
> DEFINE_EVENT(v4l2_ctrl_h264_decode_params_tmpl, v4l2_ctrl_h264_decode_params,
> - TP_PROTO(const struct v4l2_ctrl_h264_decode_params *d),
> - TP_ARGS(d)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_h264_decode_params *d),
> + TP_ARGS(tgid, fd, d)
> );
>
> DEFINE_EVENT(v4l2_h264_dpb_entry_tmpl, v4l2_h264_dpb_entry,
> - TP_PROTO(const struct v4l2_h264_dpb_entry *e, int i),
> - TP_ARGS(e, i)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_h264_dpb_entry *e, int i),
> + TP_ARGS(tgid, fd, e, i)
> );
>
> /* HEVC controls */
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_sps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_sps *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_sps, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("video_parameter_set_id = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_sps *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_sps, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s),
> + TP_printk("tgid = %u, fd = %u, "
> + "video_parameter_set_id = %u, "
> "seq_parameter_set_id = %u, "
> "pic_width_in_luma_samples = %u, "
> "pic_height_in_luma_samples = %u, "
> @@ -730,6 +811,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_sps_tmpl,
> "chroma_format_idc = %u, "
> "sps_max_sub_layers_minus1 = %u, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->s.video_parameter_set_id,
> __entry->s.seq_parameter_set_id,
> __entry->s.pic_width_in_luma_samples,
> @@ -770,11 +852,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_sps_tmpl,
>
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_pps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_pps *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_pps, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("pic_parameter_set_id = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_pps *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_pps, p)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->p = *p),
> + TP_printk("tgid = %u, fd = %u, "
> + "pic_parameter_set_id = %u, "
> "num_extra_slice_header_bits = %u, "
> "num_ref_idx_l0_default_active_minus1 = %u, "
> "num_ref_idx_l1_default_active_minus1 = %u, "
> @@ -790,6 +877,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_pps_tmpl,
> "pps_tc_offset_div2 = %d, "
> "log2_parallel_merge_level_minus2 = %u, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->p.pic_parameter_set_id,
> __entry->p.num_extra_slice_header_bits,
> __entry->p.num_ref_idx_l0_default_active_minus1,
> @@ -837,11 +925,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_pps_tmpl,
>
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_slice_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_slice_params *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_slice_params, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("bit_size = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_slice_params *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_slice_params, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s),
> + TP_printk("tgid = %u, fd = %u, "
> + "bit_size = %u, "
> "data_byte_offset = %u, "
> "num_entry_point_offsets = %u, "
> "nal_unit_type = %u, "
> @@ -868,6 +961,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_slice_params_tmpl,
> "short_term_ref_pic_set_size = %u, "
> "long_term_ref_pic_set_size = %u, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->s.bit_size,
> __entry->s.data_byte_offset,
> __entry->s.num_entry_point_offsets,
> @@ -914,11 +1008,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_slice_params_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_hevc_pred_weight_table_tmpl,
> - TP_PROTO(const struct v4l2_hevc_pred_weight_table *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_hevc_pred_weight_table, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("delta_luma_weight_l0 = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_hevc_pred_weight_table *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_hevc_pred_weight_table, p)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->p = *p),
> + TP_printk("tgid = %u, fd = %u, "
> + "delta_luma_weight_l0 = %s, "
> "luma_offset_l0 = %s, "
> "delta_chroma_weight_l0 = {%s}, "
> "chroma_offset_l0 = {%s}, "
> @@ -928,6 +1027,7 @@ DECLARE_EVENT_CLASS(v4l2_hevc_pred_weight_table_tmpl,
> "chroma_offset_l1 = {%s}, "
> "luma_log2_weight_denom = %d, "
> "delta_chroma_log2_weight_denom = %d",
> + __entry->tgid, __entry->fd,
> __print_array(__entry->p.delta_luma_weight_l0,
> ARRAY_SIZE(__entry->p.delta_luma_weight_l0),
> sizeof(__entry->p.delta_luma_weight_l0[0])),
> @@ -962,16 +1062,22 @@ DECLARE_EVENT_CLASS(v4l2_hevc_pred_weight_table_tmpl,
> ))
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_scaling_matrix_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_scaling_matrix *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_scaling_matrix, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("scaling_list_4x4 = {%s}, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_scaling_matrix *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_scaling_matrix, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s),
> + TP_printk("tgid = %u, fd = %u, "
> + "scaling_list_4x4 = {%s}, "
> "scaling_list_8x8 = {%s}, "
> "scaling_list_16x16 = {%s}, "
> "scaling_list_32x32 = {%s}, "
> "scaling_list_dc_coef_16x16 = %s, "
> "scaling_list_dc_coef_32x32 = %s",
> + __entry->tgid, __entry->fd,
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->s.scaling_list_4x4,
> sizeof(__entry->s.scaling_list_4x4),
> @@ -997,11 +1103,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_scaling_matrix_tmpl,
> ))
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_decode_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_decode_params *d),
> - TP_ARGS(d),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_decode_params, d)),
> - TP_fast_assign(__entry->d = *d),
> - TP_printk("pic_order_cnt_val = %d, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_decode_params *d),
> + TP_ARGS(tgid, fd, d),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_decode_params, d)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->d = *d),
> + TP_printk("tgid = %u, fd = %u, "
> + "pic_order_cnt_val = %d, "
> "short_term_ref_pic_set_size = %u, "
> "long_term_ref_pic_set_size = %u, "
> "num_active_dpb_entries = %u, "
> @@ -1012,6 +1123,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_decode_params_tmpl,
> "poc_st_curr_after = %s, "
> "poc_lt_curr = %s, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->d.pic_order_cnt_val,
> __entry->d.short_term_ref_pic_set_size,
> __entry->d.long_term_ref_pic_set_size,
> @@ -1036,12 +1148,18 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_decode_params_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> - TP_ARGS(lt),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_lt_rps, lt)),
> - TP_fast_assign(__entry->lt = *lt),
> - TP_printk("flags = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> + TP_ARGS(tgid, fd, lt),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_ext_sps_lt_rps, lt)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->lt = *lt),
> + TP_printk("tgid = %u, fd = %u, "
> + "flags = %s, "
> "lt_ref_pic_poc_lsb_sps = %x",
> + __entry->tgid, __entry->fd,
> __print_flags(__entry->lt.flags, "|",
> {V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT, "USED_LT"}
> ),
> @@ -1050,11 +1168,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> - TP_ARGS(st),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_st_rps, st)),
> - TP_fast_assign(__entry->st = *st),
> - TP_printk("flags = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> + TP_ARGS(tgid, fd, st),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_hevc_ext_sps_st_rps, st)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->st = *st),
> + TP_printk("tgid = %u, fd = %u, "
> + "flags = %s, "
> "delta_idx_minus1 = %u, "
> "delta_rps_sign = %u, "
> "abs_delta_rps_minus1 = %u, "
> @@ -1064,6 +1187,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl,
> "use_delta_flag = %08x, "
> "delta_poc_s0_minus1 = %s, "
> "delta_poc_s1_minus1 = %s",
> + __entry->tgid, __entry->fd,
> __print_flags(__entry->st.flags, "|",
> {V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED, "INTER_REF_PIC_SET_PRED"}
> ),
> @@ -1084,14 +1208,20 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_hevc_dpb_entry_tmpl,
> - TP_PROTO(const struct v4l2_hevc_dpb_entry *e),
> - TP_ARGS(e),
> - TP_STRUCT__entry(__field_struct(struct v4l2_hevc_dpb_entry, e)),
> - TP_fast_assign(__entry->e = *e),
> - TP_printk("timestamp = %llu, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_hevc_dpb_entry *e),
> + TP_ARGS(tgid, fd, e),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_hevc_dpb_entry, e)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->e = *e),
> + TP_printk("tgid = %u, fd = %u, "
> + "timestamp = %llu, "
> "flags = %s, "
> "field_pic = %u, "
> "pic_order_cnt_val = %d",
> + __entry->tgid, __entry->fd,
> __entry->e.timestamp,
> __print_flags(__entry->e.flags, "|",
> {V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE, "LONG_TERM_REFERENCE"}
> @@ -1101,59 +1231,65 @@ DECLARE_EVENT_CLASS(v4l2_hevc_dpb_entry_tmpl,
> ))
>
> DEFINE_EVENT(v4l2_ctrl_hevc_sps_tmpl, v4l2_ctrl_hevc_sps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_sps *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_sps *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_ctrl_hevc_pps_tmpl, v4l2_ctrl_hevc_pps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_pps *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_pps *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> DEFINE_EVENT(v4l2_ctrl_hevc_slice_params_tmpl, v4l2_ctrl_hevc_slice_params,
> - TP_PROTO(const struct v4l2_ctrl_hevc_slice_params *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_slice_params *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_hevc_pred_weight_table_tmpl, v4l2_hevc_pred_weight_table,
> - TP_PROTO(const struct v4l2_hevc_pred_weight_table *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_hevc_pred_weight_table *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> DEFINE_EVENT(v4l2_ctrl_hevc_scaling_matrix_tmpl, v4l2_ctrl_hevc_scaling_matrix,
> - TP_PROTO(const struct v4l2_ctrl_hevc_scaling_matrix *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_scaling_matrix *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_ctrl_hevc_decode_params_tmpl, v4l2_ctrl_hevc_decode_params,
> - TP_PROTO(const struct v4l2_ctrl_hevc_decode_params *d),
> - TP_ARGS(d)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_decode_params *d),
> + TP_ARGS(tgid, fd, d)
> );
>
> DEFINE_EVENT(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl, v4l2_ctrl_hevc_ext_sps_lt_rps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> - TP_ARGS(lt)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> + TP_ARGS(tgid, fd, lt)
> );
>
> DEFINE_EVENT(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl, v4l2_ctrl_hevc_ext_sps_st_rps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> - TP_ARGS(st)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> + TP_ARGS(tgid, fd, st)
> );
>
> DEFINE_EVENT(v4l2_hevc_dpb_entry_tmpl, v4l2_hevc_dpb_entry,
> - TP_PROTO(const struct v4l2_hevc_dpb_entry *e),
> - TP_ARGS(e)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_hevc_dpb_entry *e),
> + TP_ARGS(tgid, fd, e)
> );
>
> /* MPEG2 controls */
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_seq_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_sequence, s)),
> - TP_fast_assign(__entry->s = *s;),
> - TP_printk("horizontal_size = %u, vertical_size = %u, vbv_buffer_size = %u, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_mpeg2_sequence *s),
> + TP_ARGS(tgid, fd, s),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_mpeg2_sequence, s)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->s = *s;),
> + TP_printk("tgid = %u, fd = %u, "
> + "horizontal_size = %u, vertical_size = %u, vbv_buffer_size = %u, "
> "profile_and_level_indication = %u, chroma_format = %u, flags = %s",
> + __entry->tgid, __entry->fd,
> __entry->s.horizontal_size,
> __entry->s.vertical_size,
> __entry->s.vbv_buffer_size,
> @@ -1165,12 +1301,18 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_seq_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_pic_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_picture, p)),
> - TP_fast_assign(__entry->p = *p;),
> - TP_printk("backward_ref_ts = %llu, forward_ref_ts = %llu, flags = %s, f_code = {%s}, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_mpeg2_picture *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_mpeg2_picture, p)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->p = *p;),
> + TP_printk("tgid = %u, fd = %u, "
> + "backward_ref_ts = %llu, forward_ref_ts = %llu, flags = %s, f_code = {%s}, "
> "picture_coding_type = %u, picture_structure = %u, intra_dc_precision = %u",
> + __entry->tgid, __entry->fd,
> __entry->p.backward_ref_ts,
> __entry->p.forward_ref_ts,
> __print_flags(__entry->p.flags, "|",
> @@ -1193,12 +1335,18 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_pic_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_quant_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q),
> - TP_ARGS(q),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_quantisation, q)),
> - TP_fast_assign(__entry->q = *q;),
> - TP_printk("intra_quantiser_matrix = %s, non_intra_quantiser_matrix = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_mpeg2_quantisation *q),
> + TP_ARGS(tgid, fd, q),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_mpeg2_quantisation, q)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->q = *q;),
> + TP_printk("tgid = %u, fd = %u, "
> + "intra_quantiser_matrix = %s, non_intra_quantiser_matrix = %s, "
> "chroma_intra_quantiser_matrix = %s, chroma_non_intra_quantiser_matrix = %s",
> + __entry->tgid, __entry->fd,
> __print_array(__entry->q.intra_quantiser_matrix,
> ARRAY_SIZE(__entry->q.intra_quantiser_matrix),
> sizeof(__entry->q.intra_quantiser_matrix[0])),
> @@ -1215,31 +1363,37 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_quant_tmpl,
> )
>
> DEFINE_EVENT(v4l2_ctrl_mpeg2_seq_tmpl, v4l2_ctrl_mpeg2_sequence,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s),
> - TP_ARGS(s)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_mpeg2_sequence *s),
> + TP_ARGS(tgid, fd, s)
> );
>
> DEFINE_EVENT(v4l2_ctrl_mpeg2_pic_tmpl, v4l2_ctrl_mpeg2_picture,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_mpeg2_picture *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> DEFINE_EVENT(v4l2_ctrl_mpeg2_quant_tmpl, v4l2_ctrl_mpeg2_quantisation,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q),
> - TP_ARGS(q)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_mpeg2_quantisation *q),
> + TP_ARGS(tgid, fd, q)
> );
>
> /* VP8 controls */
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_entropy_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("entropy.coeff_probs = {%s}, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(tgid, fd, f),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_vp8_frame, f)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->f = *f;),
> + TP_printk("tgid = %u, fd = %u, "
> + "entropy.coeff_probs = {%s}, "
> "entropy.y_mode_probs = %s, "
> "entropy.uv_mode_probs = %s, "
> "entropy.mv_probs = {%s}",
> + __entry->tgid, __entry->fd,
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->f.entropy.coeff_probs,
> sizeof(__entry->f.entropy.coeff_probs),
> @@ -1258,11 +1412,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_entropy_tmpl,
> )
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("segment.quant_update = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(tgid, fd, f),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_vp8_frame, f)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->f = *f;),
> + TP_printk("tgid = %u, fd = %u, "
> + "segment.quant_update = %s, "
> "segment.lf_update = %s, "
> "segment.segment_probs = %s, "
> "segment.flags = %s, "
> @@ -1297,6 +1456,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl,
> "golden_frame_ts = %llu, "
> "alt_frame_ts = %llu, "
> "flags = %s",
> + __entry->tgid, __entry->fd,
> __print_array(__entry->f.segment.quant_update,
> ARRAY_SIZE(__entry->f.segment.quant_update),
> sizeof(__entry->f.segment.quant_update[0])),
> @@ -1361,23 +1521,28 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl,
> );
>
> DEFINE_EVENT(v4l2_ctrl_vp8_frame_tmpl, v4l2_ctrl_vp8_frame,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(tgid, fd, f)
> );
>
> DEFINE_EVENT(v4l2_ctrl_vp8_entropy_tmpl, v4l2_ctrl_vp8_entropy,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(tgid, fd, f)
> );
>
> /* VP9 controls */
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp9_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("lf.ref_deltas = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp9_frame *f),
> + TP_ARGS(tgid, fd, f),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_vp9_frame, f)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->f = *f;),
> + TP_printk("tgid = %u, fd = %u, "
> + "lf.ref_deltas = %s, "
> "lf.mode_deltas = %s, "
> "lf.level = %u, "
> "lf.sharpness = %u, "
> @@ -1410,6 +1575,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl,
> "tile_cols_log2 = %u, "
> "tile_rows_log_2 = %u, "
> "reference_mode = %s",
> + __entry->tgid, __entry->fd,
> __print_array(__entry->f.lf.ref_deltas,
> ARRAY_SIZE(__entry->f.lf.ref_deltas),
> sizeof(__entry->f.lf.ref_deltas[0])),
> @@ -1490,11 +1656,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> - TP_fast_assign(__entry->h = *h;),
> - TP_printk("tx_mode = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(tgid, fd, h),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->h = *h;),
> + TP_printk("tgid = %u, fd = %u, "
> + "tx_mode = %s, "
> "tx8 = {%s}, "
> "tx16 = {%s}, "
> "tx32 = {%s}, "
> @@ -1508,6 +1679,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl,
> "y_mode = {%s}, "
> "uv_mode = {%s}, "
> "partition = {%s}",
> + __entry->tgid, __entry->fd,
> __print_symbolic(__entry->h.tx_mode,
> {V4L2_VP9_TX_MODE_ONLY_4X4, "TX_MODE_ONLY_4X4"},
> {V4L2_VP9_TX_MODE_ALLOW_8X8, "TX_MODE_ALLOW_8X8"},
> @@ -1566,11 +1738,17 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_coef_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> - TP_fast_assign(__entry->h = *h;),
> - TP_printk("coef = {%s}",
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(tgid, fd, h),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->h = *h;),
> + TP_printk("tgid = %u, fd = %u, "
> + "coef = {%s}",
> + __entry->tgid, __entry->fd,
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->h.coef,
> sizeof(__entry->h.coef),
> @@ -1579,11 +1757,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_coef_tmpl,
> );
>
> DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl,
> - TP_PROTO(const struct v4l2_vp9_mv_probs *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_vp9_mv_probs, p)),
> - TP_fast_assign(__entry->p = *p;),
> - TP_printk("joint = %s, "
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_vp9_mv_probs *p),
> + TP_ARGS(tgid, fd, p),
> + TP_STRUCT__entry(__field(u32, tgid)
> + __field(u32, fd)
> + __field_struct(struct v4l2_vp9_mv_probs, p)),
> + TP_fast_assign(__entry->tgid = tgid;
> + __entry->fd = fd;
> + __entry->p = *p;),
> + TP_printk("tgid = %u, fd = %u, "
> + "joint = %s, "
> "sign = %s, "
> "classes = {%s}, "
> "class0_bit = %s, "
> @@ -1592,6 +1775,7 @@ DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl,
> "fr = {%s}, "
> "class0_hp = %s, "
> "hp = %s",
> + __entry->tgid, __entry->fd,
> __print_array(__entry->p.joint,
> ARRAY_SIZE(__entry->p.joint),
> sizeof(__entry->p.joint[0])),
> @@ -1627,24 +1811,24 @@ DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl,
> );
>
> DEFINE_EVENT(v4l2_ctrl_vp9_frame_tmpl, v4l2_ctrl_vp9_frame,
> - TP_PROTO(const struct v4l2_ctrl_vp9_frame *f),
> - TP_ARGS(f)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp9_frame *f),
> + TP_ARGS(tgid, fd, f)
> );
>
> DEFINE_EVENT(v4l2_ctrl_vp9_compressed_hdr_tmpl, v4l2_ctrl_vp9_compressed_hdr,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(tgid, fd, h)
> );
>
> DEFINE_EVENT(v4l2_ctrl_vp9_compressed_coef_tmpl, v4l2_ctrl_vp9_compressed_coeff,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(tgid, fd, h)
> );
>
>
> DEFINE_EVENT(v4l2_vp9_mv_probs_tmpl, v4l2_vp9_mv_probs,
> - TP_PROTO(const struct v4l2_vp9_mv_probs *p),
> - TP_ARGS(p)
> + TP_PROTO(u32 tgid, u32 fd, const struct v4l2_vp9_mv_probs *p),
> + TP_ARGS(tgid, fd, p)
> );
>
> #endif /* if !defined(_TRACE_V4L2_REQUESTS_H_) || defined(TRACE_HEADER_MULTI_READ) */
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 03/11] media: Add tgid and fd fields in v4l2_fh struct
From: Nicolas Dufresne @ 2026-04-28 19:31 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-4-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 3783 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> These fields will be used in traces to help userspace tracing tools
> identify streams.
>
> The tgid field will keep the PID of the process that opened the video
> file.
> That is needed because trace calls can happen in IRQs, for which there is
> no current PID.
>
> The fd field helps identify the context in case the same process opens the
> video device multiple times.
> Note that the fd field is set in the __video_do_ioctl() function.
> That is because the file descriptor has not been allocated yet when
> v4l2_open() is called.
Unless someone have a better idea with this last part (in this case please
reply):
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> drivers/media/v4l2-core/v4l2-fh.c | 1 +
> drivers/media/v4l2-core/v4l2-ioctl.c | 17 +++++++++++++++++
> include/media/v4l2-fh.h | 4 ++++
> 3 files changed, 22 insertions(+)
>
> diff --git a/drivers/media/v4l2-core/v4l2-fh.c b/drivers/media/v4l2-core/v4l2-
> fh.c
> index df3ba9d4674b..86e8223b46cb 100644
> --- a/drivers/media/v4l2-core/v4l2-fh.c
> +++ b/drivers/media/v4l2-core/v4l2-fh.c
> @@ -37,6 +37,7 @@ void v4l2_fh_init(struct v4l2_fh *fh, struct video_device
> *vdev)
> INIT_LIST_HEAD(&fh->available);
> INIT_LIST_HEAD(&fh->subscribed);
> fh->sequence = -1;
> + fh->tgid = current->tgid;
> mutex_init(&fh->subscribe_lock);
> }
> EXPORT_SYMBOL_GPL(v4l2_fh_init);
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-
> core/v4l2-ioctl.c
> index 37d33d4a363d..a3b6df0571d6 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -9,6 +9,7 @@
> */
>
> #include <linux/compat.h>
> +#include <linux/fdtable.h>
> #include <linux/mm.h>
> #include <linux/module.h>
> #include <linux/slab.h>
> @@ -3061,6 +3062,16 @@ void v4l_printk_ioctl(const char *prefix, unsigned int
> cmd)
> }
> EXPORT_SYMBOL(v4l_printk_ioctl);
>
> +static int _file_iterate(const void *priv, struct file *filp, unsigned int
> fd)
> +{
> + const struct file *fh_filp = priv;
> +
> + if (fh_filp == filp)
> + return fd;
> +
> + return 0;
> +}
> +
> static long __video_do_ioctl(struct file *file,
> unsigned int cmd, void *arg)
> {
> @@ -3081,6 +3092,12 @@ static long __video_do_ioctl(struct file *file,
> return ret;
> }
>
> + if (unlikely(!vfh->fd)) {
> + vfh->fd = iterate_fd(current->files, 0, _file_iterate, file);
> + if (!vfh->fd)
> + vfh->fd = -1;
> + }
> +
> /*
> * We need to serialize streamon/off with queueing new requests.
> * These ioctls may trigger the cancellation of a streaming
> diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h
> index aad4b3689d7e..4ef4e58ab8d1 100644
> --- a/include/media/v4l2-fh.h
> +++ b/include/media/v4l2-fh.h
> @@ -28,6 +28,8 @@ struct v4l2_ctrl_handler;
> * @vdev: pointer to &struct video_device
> * @ctrl_handler: pointer to &struct v4l2_ctrl_handler
> * @prio: priority of the file handler, as defined by &enum v4l2_priority
> + * @tgid: process id that initialized the v4l2_fh
> + * @fd: file descriptor associated to this v4l2_fh for the process id in tgid
> *
> * @wait: event' s wait queue
> * @subscribe_lock: serialise changes to the subscribed list; guarantee that
> @@ -44,6 +46,8 @@ struct v4l2_fh {
> struct video_device *vdev;
> struct v4l2_ctrl_handler *ctrl_handler;
> enum v4l2_priority prio;
> + uint32_t tgid;
> + int fd;
>
> /* Events */
> wait_queue_head_t wait;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 02/11] media: Reformat v4l2-requests trace event printk
From: Nicolas Dufresne @ 2026-04-28 19:28 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-3-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 39894 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> When printing the v4l2-request traces the format was not stable.
> Sometimes using a ':' separator, sometimes with an extra space and using
> new lines.
>
> Reformat the printk calls to match the format used in v4l2.h so that
> parsers can use the same format for all events.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Could easily be done against visl now and merged early if you have time.
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> include/trace/events/v4l2_requests.h | 649 ++++++++++++++-------------
> 1 file changed, 328 insertions(+), 321 deletions(-)
>
> diff --git a/include/trace/events/v4l2_requests.h
> b/include/trace/events/v4l2_requests.h
> index 1e137d39d5fe..34f4a74df5ea 100644
> --- a/include/trace/events/v4l2_requests.h
> +++ b/include/trace/events/v4l2_requests.h
> @@ -14,8 +14,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_seq_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_sequence, s)),
> TP_fast_assign(__entry->s = *s;),
> - TP_printk("\nflags %s\nseq_profile: %u\norder_hint_bits:
> %u\nbit_depth: %u\n"
> - "max_frame_width_minus_1: %u\nmax_frame_height_minus_1:
> %u\n",
> + TP_printk("flags = %s, seq_profile = %u, order_hint_bits = %u,
> bit_depth = %u, "
> + "max_frame_width_minus_1 = %u, max_frame_height_minus_1 =
> %u",
> __print_flags(__entry->s.flags, "|",
> {V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE, "STILL_PICTURE"},
> {V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK,
> "USE_128X128_SUPERBLOCK"},
> @@ -50,7 +50,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_tge_tmpl,
> TP_ARGS(t),
> TP_STRUCT__entry(__field_struct(struct
> v4l2_ctrl_av1_tile_group_entry, t)),
> TP_fast_assign(__entry->t = *t;),
> - TP_printk("\ntile_offset: %u\n tile_size: %u\n tile_row:
> %u\ntile_col: %u\n",
> + TP_printk("tile_offset = %u, tile_size = %u, tile_row = %u, tile_col
> = %u",
> __entry->t.tile_offset,
> __entry->t.tile_size,
> __entry->t.tile_row,
> @@ -63,30 +63,30 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_frame_tmpl,
> TP_ARGS(f),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_frame, f)),
> TP_fast_assign(__entry->f = *f;),
> - TP_printk("\ntile_info.flags: %s\ntile_info.context_update_tile_id:
> %u\n"
> - "tile_info.tile_cols: %u\ntile_info.tile_rows: %u\n"
> - "tile_info.mi_col_starts: %s\ntile_info.mi_row_starts:
> %s\n"
> - "tile_info.width_in_sbs_minus_1:
> %s\ntile_info.height_in_sbs_minus_1: %s\n"
> - "tile_info.tile_size_bytes: %u\nquantization.flags: %s\n"
> - "quantization.base_q_idx: %u\nquantization.delta_q_y_dc:
> %d\n"
> - "quantization.delta_q_u_dc: %d\nquantization.delta_q_u_ac:
> %d\n"
> - "quantization.delta_q_v_dc: %d\nquantization.delta_q_v_ac:
> %d\n"
> - "quantization.qm_y: %u\nquantization.qm_u:
> %u\nquantization.qm_v: %u\n"
> - "quantization.delta_q_res: %u\nsuperres_denom:
> %u\nsegmentation.flags: %s\n"
> - "segmentation.last_active_seg_id:
> %u\nsegmentation.feature_enabled:%s\n"
> - "loop_filter.flags: %s\nloop_filter.level:
> %s\nloop_filter.sharpness: %u\n"
> - "loop_filter.ref_deltas: %s\nloop_filter.mode_deltas: %s\n"
> - "loop_filter.delta_lf_res: %u\ncdef.damping_minus_3:
> %u\ncdef.bits: %u\n"
> - "cdef.y_pri_strength: %s\ncdef.y_sec_strength: %s\n"
> - "cdef.uv_pri_strength:
> %s\ncdef.uv_sec_strength:%s\nskip_mode_frame: %s\n"
> - "primary_ref_frame: %u\nloop_restoration.flags: %s\n"
> - "loop_restoration.lr_unit_shift:
> %u\nloop_restoration.lr_uv_shift: %u\n"
> - "loop_restoration.frame_restoration_type: %s\n"
> - "loop_restoration.loop_restoration_size: %s\nflags:
> %s\norder_hint: %u\n"
> - "upscaled_width: %u\nframe_width_minus_1:
> %u\nframe_height_minus_1: %u\n"
> - "render_width_minus_1: %u\nrender_height_minus_1:
> %u\ncurrent_frame_id: %u\n"
> - "buffer_removal_time: %s\norder_hints:
> %s\nreference_frame_ts: %s\n"
> - "ref_frame_idx: %s\nrefresh_frame_flags: %u\n",
> + TP_printk("tile_info.flags = %s, tile_info.context_update_tile_id =
> %u, "
> + "tile_info.tile_cols = %u, tile_info.tile_rows = %u, "
> + "tile_info.mi_col_starts = %s, tile_info.mi_row_starts =
> %s, "
> + "tile_info.width_in_sbs_minus_1 = %s,
> tile_info.height_in_sbs_minus_1 = %s, "
> + "tile_info.tile_size_bytes = %u, quantization.flags = %s, "
> + "quantization.base_q_idx = %u, quantization.delta_q_y_dc =
> %d, "
> + "quantization.delta_q_u_dc = %d, quantization.delta_q_u_ac
> = %d, "
> + "quantization.delta_q_v_dc = %d, quantization.delta_q_v_ac
> = %d, "
> + "quantization.qm_y = %u, quantization.qm_u = %u,
> quantization.qm_v = %u, "
> + "quantization.delta_q_res = %u, superres_denom = %u,
> segmentation.flags = %s, "
> + "segmentation.last_active_seg_id = %u,
> segmentation.feature_enabled = %s, "
> + "loop_filter.flags = %s, loop_filter.level = %s,
> loop_filter.sharpness = %u, "
> + "loop_filter.ref_deltas = %s, loop_filter.mode_deltas = %s,
> "
> + "loop_filter.delta_lf_res = %u, cdef.damping_minus_3 = %u,
> cdef.bits = %u, "
> + "cdef.y_pri_strength = %s, cdef.y_sec_strength = %s, "
> + "cdef.uv_pri_strength = %s, cdef.uv_sec_strength = %s,
> skip_mode_frame = %s, "
> + "primary_ref_frame = %u, loop_restoration.flags = %s, "
> + "loop_restoration.lr_unit_shift = %u,
> loop_restoration.lr_uv_shift = %u, "
> + "loop_restoration.frame_restoration_type = %s, "
> + "loop_restoration.loop_restoration_size = %s, flags = %s,
> order_hint = %u, "
> + "upscaled_width = %u, frame_width_minus_1 = %u,
> frame_height_minus_1 = %u, "
> + "render_width_minus_1 = %u, render_height_minus_1 = %u,
> current_frame_id = %u, "
> + "buffer_removal_time = %s, order_hints = %s,
> reference_frame_ts = %s, "
> + "ref_frame_idx = %s, refresh_frame_flags = %u",
> __print_flags(__entry->f.tile_info.flags, "|",
> {V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING,
> "UNIFORM_TILE_SPACING"}),
> __entry->f.tile_info.context_update_tile_id,
> @@ -226,15 +226,15 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_av1_film_grain_tmpl,
> TP_ARGS(f),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_film_grain, f)),
> TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nflags %s\ncr_mult: %u\ngrain_seed: %u\n"
> - "film_grain_params_ref_idx: %u\nnum_y_points:
> %u\npoint_y_value: %s\n"
> - "point_y_scaling: %s\nnum_cb_points: %u\npoint_cb_value:
> %s\n"
> - "point_cb_scaling: %s\nnum_cr_points: %u\npoint_cr_value:
> %s\n"
> - "point_cr_scaling: %s\ngrain_scaling_minus_8:
> %u\nar_coeff_lag: %u\n"
> - "ar_coeffs_y_plus_128: %s\nar_coeffs_cb_plus_128: %s\n"
> - "ar_coeffs_cr_plus_128: %s\nar_coeff_shift_minus_6: %u\n"
> - "grain_scale_shift: %u\ncb_mult: %u\ncb_luma_mult:
> %u\ncr_luma_mult: %u\n"
> - "cb_offset: %u\ncr_offset: %u\n",
> + TP_printk("flags = %s, cr_mult = %u, grain_seed = %u, "
> + "film_grain_params_ref_idx = %u, num_y_points = %u,
> point_y_value = %s, "
> + "point_y_scaling = %s, num_cb_points = %u, point_cb_value =
> %s, "
> + "point_cb_scaling = %s, num_cr_points = %u, point_cr_value
> = %s, "
> + "point_cr_scaling = %s, grain_scaling_minus_8 = %u,
> ar_coeff_lag = %u, "
> + "ar_coeffs_y_plus_128 = %s, ar_coeffs_cb_plus_128 = %s, "
> + "ar_coeffs_cr_plus_128 = %s, ar_coeff_shift_minus_6 = %u, "
> + "grain_scale_shift = %u, cb_mult = %u, cb_luma_mult = %u,
> cr_luma_mult = %u, "
> + "cb_offset = %u, cr_offset = %u",
> __print_flags(__entry->f.flags, "|",
> {V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN, "APPLY_GRAIN"},
> {V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN, "UPDATE_GRAIN"},
> @@ -333,7 +333,15 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> __entry->ycbcr_enc = p->ycbcr_enc;
> __entry->quantization = p->quantization;
> ),
> - TP_printk("backward_ref_ts %llu version %u width %u height %u flags
> %s colorspace %u xfer_func %u ycbcr_enc %u quantization %u",
> + TP_printk("backward_ref_ts = %llu, "
> + "version = %u, "
> + "width = %u, "
> + "height = %u, "
> + "flags = %s, "
> + "colorspace = %u, "
> + "xfer_func = %u, "
> + "ycbcr_enc = %u, "
> + "quantization = %u",
> __entry->backward_ref_ts, __entry->version, __entry->width,
> __entry->height,
> __print_flags(__entry->flags, "|",
> {V4L2_FWHT_FL_IS_INTERLACED, "IS_INTERLACED"},
> @@ -364,24 +372,24 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_sps_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_sps, s)),
> TP_fast_assign(__entry->s = *s),
> - TP_printk("\nprofile_idc %u\n"
> - "constraint_set_flags %s\n"
> - "level_idc %u\n"
> - "seq_parameter_set_id %u\n"
> - "chroma_format_idc %u\n"
> - "bit_depth_luma_minus8 %u\n"
> - "bit_depth_chroma_minus8 %u\n"
> - "log2_max_frame_num_minus4 %u\n"
> - "pic_order_cnt_type %u\n"
> - "log2_max_pic_order_cnt_lsb_minus4 %u\n"
> - "max_num_ref_frames %u\n"
> - "num_ref_frames_in_pic_order_cnt_cycle %u\n"
> - "offset_for_ref_frame %s\n"
> - "offset_for_non_ref_pic %d\n"
> - "offset_for_top_to_bottom_field %d\n"
> - "pic_width_in_mbs_minus1 %u\n"
> - "pic_height_in_map_units_minus1 %u\n"
> - "flags %s",
> + TP_printk("profile_idc = %u, "
> + "constraint_set_flags = %s, "
> + "level_idc = %u, "
> + "seq_parameter_set_id = %u, "
> + "chroma_format_idc = %u, "
> + "bit_depth_luma_minus8 = %u, "
> + "bit_depth_chroma_minus8 = %u, "
> + "log2_max_frame_num_minus4 = %u, "
> + "pic_order_cnt_type = %u, "
> + "log2_max_pic_order_cnt_lsb_minus4 = %u, "
> + "max_num_ref_frames = %u, "
> + "num_ref_frames_in_pic_order_cnt_cycle = %u, "
> + "offset_for_ref_frame = %s, "
> + "offset_for_non_ref_pic = %d, "
> + "offset_for_top_to_bottom_field = %d, "
> + "pic_width_in_mbs_minus1 = %u, "
> + "pic_height_in_map_units_minus1 = %u, "
> + "flags = %s",
> __entry->s.profile_idc,
> __print_flags(__entry->s.constraint_set_flags, "|",
> {V4L2_H264_SPS_CONSTRAINT_SET0_FLAG,
> "CONSTRAINT_SET0_FLAG"},
> @@ -423,17 +431,17 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pps_tmpl,
> TP_ARGS(p),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pps, p)),
> TP_fast_assign(__entry->p = *p),
> - TP_printk("\npic_parameter_set_id %u\n"
> - "seq_parameter_set_id %u\n"
> - "num_slice_groups_minus1 %u\n"
> - "num_ref_idx_l0_default_active_minus1 %u\n"
> - "num_ref_idx_l1_default_active_minus1 %u\n"
> - "weighted_bipred_idc %u\n"
> - "pic_init_qp_minus26 %d\n"
> - "pic_init_qs_minus26 %d\n"
> - "chroma_qp_index_offset %d\n"
> - "second_chroma_qp_index_offset %d\n"
> - "flags %s",
> + TP_printk("pic_parameter_set_id = %u, "
> + "seq_parameter_set_id = %u, "
> + "num_slice_groups_minus1 = %u, "
> + "num_ref_idx_l0_default_active_minus1 = %u, "
> + "num_ref_idx_l1_default_active_minus1 = %u, "
> + "weighted_bipred_idc = %u, "
> + "pic_init_qp_minus26 = %d, "
> + "pic_init_qs_minus26 = %d, "
> + "chroma_qp_index_offset = %d, "
> + "second_chroma_qp_index_offset = %d, "
> + "flags = %s",
> __entry->p.pic_parameter_set_id,
> __entry->p.seq_parameter_set_id,
> __entry->p.num_slice_groups_minus1,
> @@ -461,7 +469,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_scaling_matrix_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_scaling_matrix,
> s)),
> TP_fast_assign(__entry->s = *s),
> - TP_printk("\nscaling_list_4x4 {%s}\nscaling_list_8x8 {%s}",
> + TP_printk("scaling_list_4x4 = {%s}, scaling_list_8x8 = {%s}",
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->s.scaling_list_4x4,
> sizeof(__entry->s.scaling_list_4x4),
> @@ -478,16 +486,16 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pred_weights_tmpl,
> TP_ARGS(p),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pred_weights,
> p)),
> TP_fast_assign(__entry->p = *p),
> - TP_printk("\nluma_log2_weight_denom %u\n"
> - "chroma_log2_weight_denom %u\n"
> - "weight_factor[0].luma_weight %s\n"
> - "weight_factor[0].luma_offset %s\n"
> - "weight_factor[0].chroma_weight {%s}\n"
> - "weight_factor[0].chroma_offset {%s}\n"
> - "weight_factor[1].luma_weight %s\n"
> - "weight_factor[1].luma_offset %s\n"
> - "weight_factor[1].chroma_weight {%s}\n"
> - "weight_factor[1].chroma_offset {%s}\n",
> + TP_printk("luma_log2_weight_denom = %u, "
> + "chroma_log2_weight_denom = %u, "
> + "weight_factor[0].luma_weight = %s, "
> + "weight_factor[0].luma_offset = %s, "
> + "weight_factor[0].chroma_weight = {%s}, "
> + "weight_factor[0].chroma_offset = {%s}, "
> + "weight_factor[1].luma_weight = %s, "
> + "weight_factor[1].luma_offset = %s, "
> + "weight_factor[1].chroma_weight = {%s}, "
> + "weight_factor[1].chroma_offset = {%s}",
> __entry->p.luma_log2_weight_denom,
> __entry->p.chroma_log2_weight_denom,
> __print_array(__entry->p.weight_factors[0].luma_weight,
> @@ -526,20 +534,20 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_slice_params_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_slice_params,
> s)),
> TP_fast_assign(__entry->s = *s),
> - TP_printk("\nheader_bit_size %u\n"
> - "first_mb_in_slice %u\n"
> - "slice_type %s\n"
> - "colour_plane_id %u\n"
> - "redundant_pic_cnt %u\n"
> - "cabac_init_idc %u\n"
> - "slice_qp_delta %d\n"
> - "slice_qs_delta %d\n"
> - "disable_deblocking_filter_idc %u\n"
> - "slice_alpha_c0_offset_div2 %u\n"
> - "slice_beta_offset_div2 %u\n"
> - "num_ref_idx_l0_active_minus1 %u\n"
> - "num_ref_idx_l1_active_minus1 %u\n"
> - "flags %s",
> + TP_printk("header_bit_size = %u, "
> + "first_mb_in_slice = %u, "
> + "slice_type = %s, "
> + "colour_plane_id = %u, "
> + "redundant_pic_cnt = %u, "
> + "cabac_init_idc = %u, "
> + "slice_qp_delta = %d, "
> + "slice_qs_delta = %d, "
> + "disable_deblocking_filter_idc = %u, "
> + "slice_alpha_c0_offset_div2 = %u, "
> + "slice_beta_offset_div2 = %u, "
> + "num_ref_idx_l0_active_minus1 = %u, "
> + "num_ref_idx_l1_active_minus1 = %u, "
> + "flags = %s",
> __entry->s.header_bit_size,
> __entry->s.first_mb_in_slice,
> __print_symbolic(__entry->s.slice_type,
> @@ -570,7 +578,7 @@ DECLARE_EVENT_CLASS(v4l2_h264_reference_tmpl,
> TP_STRUCT__entry(__field_struct(struct v4l2_h264_reference, r)
> __field(int, i)),
> TP_fast_assign(__entry->r = *r; __entry->i = i;),
> - TP_printk("[%d]: fields %s index %u",
> + TP_printk("[%d]: fields = %s, index = %u",
> __entry->i,
> __print_flags(__entry->r.fields, "|",
> {V4L2_H264_TOP_FIELD_REF, "TOP_FIELD_REF"},
> @@ -585,19 +593,19 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_h264_decode_params_tmpl,
> TP_ARGS(d),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_decode_params,
> d)),
> TP_fast_assign(__entry->d = *d),
> - TP_printk("\nnal_ref_idc %u\n"
> - "frame_num %u\n"
> - "top_field_order_cnt %d\n"
> - "bottom_field_order_cnt %d\n"
> - "idr_pic_id %u\n"
> - "pic_order_cnt_lsb %u\n"
> - "delta_pic_order_cnt_bottom %d\n"
> - "delta_pic_order_cnt0 %d\n"
> - "delta_pic_order_cnt1 %d\n"
> - "dec_ref_pic_marking_bit_size %u\n"
> - "pic_order_cnt_bit_size %u\n"
> - "slice_group_change_cycle %u\n"
> - "flags %s\n",
> + TP_printk("nal_ref_idc = %u, "
> + "frame_num = %u, "
> + "top_field_order_cnt = %d, "
> + "bottom_field_order_cnt = %d, "
> + "idr_pic_id = %u, "
> + "pic_order_cnt_lsb = %u, "
> + "delta_pic_order_cnt_bottom = %d, "
> + "delta_pic_order_cnt0 = %d, "
> + "delta_pic_order_cnt1 = %d, "
> + "dec_ref_pic_marking_bit_size = %u, "
> + "pic_order_cnt_bit_size = %u, "
> + "slice_group_change_cycle = %u, "
> + "flags = %s",
> __entry->d.nal_ref_idc,
> __entry->d.frame_num,
> __entry->d.top_field_order_cnt,
> @@ -625,8 +633,8 @@ DECLARE_EVENT_CLASS(v4l2_h264_dpb_entry_tmpl,
> TP_STRUCT__entry(__field_struct(struct v4l2_h264_dpb_entry, e)
> __field(int, i)),
> TP_fast_assign(__entry->e = *e; __entry->i = i;),
> - TP_printk("[%d]: reference_ts %llu, pic_num %u frame_num %u fields %s
> "
> - "top_field_order_cnt %d bottom_field_order_cnt %d flags
> %s",
> + TP_printk("[%d]: reference_ts = %llu, pic_num = %u, frame_num = %u,
> fields = %s "
> + "top_field_order_cnt = %d, bottom_field_order_cnt = %d,
> flags = %s",
> __entry->i,
> __entry->e.reference_ts,
> __entry->e.pic_num,
> @@ -642,7 +650,6 @@ DECLARE_EVENT_CLASS(v4l2_h264_dpb_entry_tmpl,
> {V4L2_H264_DPB_ENTRY_FLAG_ACTIVE, "ACTIVE"},
> {V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM, "LONG_TERM"},
> {V4L2_H264_DPB_ENTRY_FLAG_FIELD, "FIELD"})
> -
> )
> );
>
> @@ -698,31 +705,31 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_sps_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_sps, s)),
> TP_fast_assign(__entry->s = *s),
> - TP_printk("\nvideo_parameter_set_id %u\n"
> - "seq_parameter_set_id %u\n"
> - "pic_width_in_luma_samples %u\n"
> - "pic_height_in_luma_samples %u\n"
> - "bit_depth_luma_minus8 %u\n"
> - "bit_depth_chroma_minus8 %u\n"
> - "log2_max_pic_order_cnt_lsb_minus4 %u\n"
> - "sps_max_dec_pic_buffering_minus1 %u\n"
> - "sps_max_num_reorder_pics %u\n"
> - "sps_max_latency_increase_plus1 %u\n"
> - "log2_min_luma_coding_block_size_minus3 %u\n"
> - "log2_diff_max_min_luma_coding_block_size %u\n"
> - "log2_min_luma_transform_block_size_minus2 %u\n"
> - "log2_diff_max_min_luma_transform_block_size %u\n"
> - "max_transform_hierarchy_depth_inter %u\n"
> - "max_transform_hierarchy_depth_intra %u\n"
> - "pcm_sample_bit_depth_luma_minus1 %u\n"
> - "pcm_sample_bit_depth_chroma_minus1 %u\n"
> - "log2_min_pcm_luma_coding_block_size_minus3 %u\n"
> - "log2_diff_max_min_pcm_luma_coding_block_size %u\n"
> - "num_short_term_ref_pic_sets %u\n"
> - "num_long_term_ref_pics_sps %u\n"
> - "chroma_format_idc %u\n"
> - "sps_max_sub_layers_minus1 %u\n"
> - "flags %s",
> + TP_printk("video_parameter_set_id = %u, "
> + "seq_parameter_set_id = %u, "
> + "pic_width_in_luma_samples = %u, "
> + "pic_height_in_luma_samples = %u, "
> + "bit_depth_luma_minus8 = %u, "
> + "bit_depth_chroma_minus8 = %u, "
> + "log2_max_pic_order_cnt_lsb_minus4 = %u, "
> + "sps_max_dec_pic_buffering_minus1 = %u, "
> + "sps_max_num_reorder_pics = %u, "
> + "sps_max_latency_increase_plus1 = %u, "
> + "log2_min_luma_coding_block_size_minus3 = %u, "
> + "log2_diff_max_min_luma_coding_block_size = %u, "
> + "log2_min_luma_transform_block_size_minus2 = %u, "
> + "log2_diff_max_min_luma_transform_block_size = %u, "
> + "max_transform_hierarchy_depth_inter = %u, "
> + "max_transform_hierarchy_depth_intra = %u, "
> + "pcm_sample_bit_depth_luma_minus1 = %u, "
> + "pcm_sample_bit_depth_chroma_minus1 = %u, "
> + "log2_min_pcm_luma_coding_block_size_minus3 = %u, "
> + "log2_diff_max_min_pcm_luma_coding_block_size = %u, "
> + "num_short_term_ref_pic_sets = %u, "
> + "num_long_term_ref_pics_sps = %u, "
> + "chroma_format_idc = %u, "
> + "sps_max_sub_layers_minus1 = %u, "
> + "flags = %s",
> __entry->s.video_parameter_set_id,
> __entry->s.seq_parameter_set_id,
> __entry->s.pic_width_in_luma_samples,
> @@ -767,22 +774,22 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_pps_tmpl,
> TP_ARGS(p),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_pps, p)),
> TP_fast_assign(__entry->p = *p),
> - TP_printk("\npic_parameter_set_id %u\n"
> - "num_extra_slice_header_bits %u\n"
> - "num_ref_idx_l0_default_active_minus1 %u\n"
> - "num_ref_idx_l1_default_active_minus1 %u\n"
> - "init_qp_minus26 %d\n"
> - "diff_cu_qp_delta_depth %u\n"
> - "pps_cb_qp_offset %d\n"
> - "pps_cr_qp_offset %d\n"
> - "num_tile_columns_minus1 %d\n"
> - "num_tile_rows_minus1 %d\n"
> - "column_width_minus1 %s\n"
> - "row_height_minus1 %s\n"
> - "pps_beta_offset_div2 %d\n"
> - "pps_tc_offset_div2 %d\n"
> - "log2_parallel_merge_level_minus2 %u\n"
> - "flags %s",
> + TP_printk("pic_parameter_set_id = %u, "
> + "num_extra_slice_header_bits = %u, "
> + "num_ref_idx_l0_default_active_minus1 = %u, "
> + "num_ref_idx_l1_default_active_minus1 = %u, "
> + "init_qp_minus26 = %d, "
> + "diff_cu_qp_delta_depth = %u, "
> + "pps_cb_qp_offset = %d, "
> + "pps_cr_qp_offset = %d, "
> + "num_tile_columns_minus1 = %d, "
> + "num_tile_rows_minus1 = %d, "
> + "column_width_minus1 = %s, "
> + "row_height_minus1 = %s, "
> + "pps_beta_offset_div2 = %d, "
> + "pps_tc_offset_div2 = %d, "
> + "log2_parallel_merge_level_minus2 = %u, "
> + "flags = %s",
> __entry->p.pic_parameter_set_id,
> __entry->p.num_extra_slice_header_bits,
> __entry->p.num_ref_idx_l0_default_active_minus1,
> @@ -834,33 +841,33 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_slice_params_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_slice_params,
> s)),
> TP_fast_assign(__entry->s = *s),
> - TP_printk("\nbit_size %u\n"
> - "data_byte_offset %u\n"
> - "num_entry_point_offsets %u\n"
> - "nal_unit_type %u\n"
> - "nuh_temporal_id_plus1 %u\n"
> - "slice_type %u\n"
> - "colour_plane_id %u\n"
> - "slice_pic_order_cnt %d\n"
> - "num_ref_idx_l0_active_minus1 %u\n"
> - "num_ref_idx_l1_active_minus1 %u\n"
> - "collocated_ref_idx %u\n"
> - "five_minus_max_num_merge_cand %u\n"
> - "slice_qp_delta %d\n"
> - "slice_cb_qp_offset %d\n"
> - "slice_cr_qp_offset %d\n"
> - "slice_act_y_qp_offset %d\n"
> - "slice_act_cb_qp_offset %d\n"
> - "slice_act_cr_qp_offset %d\n"
> - "slice_beta_offset_div2 %d\n"
> - "slice_tc_offset_div2 %d\n"
> - "pic_struct %u\n"
> - "slice_segment_addr %u\n"
> - "ref_idx_l0 %s\n"
> - "ref_idx_l1 %s\n"
> - "short_term_ref_pic_set_size %u\n"
> - "long_term_ref_pic_set_size %u\n"
> - "flags %s",
> + TP_printk("bit_size = %u, "
> + "data_byte_offset = %u, "
> + "num_entry_point_offsets = %u, "
> + "nal_unit_type = %u, "
> + "nuh_temporal_id_plus1 = %u, "
> + "slice_type = %u, "
> + "colour_plane_id = %u, "
> + "slice_pic_order_cnt = %d, "
> + "num_ref_idx_l0_active_minus1 = %u, "
> + "num_ref_idx_l1_active_minus1 = %u, "
> + "collocated_ref_idx = %u, "
> + "five_minus_max_num_merge_cand = %u, "
> + "slice_qp_delta = %d, "
> + "slice_cb_qp_offset = %d, "
> + "slice_cr_qp_offset = %d, "
> + "slice_act_y_qp_offset = %d, "
> + "slice_act_cb_qp_offset = %d, "
> + "slice_act_cr_qp_offset = %d, "
> + "slice_beta_offset_div2 = %d, "
> + "slice_tc_offset_div2 = %d, "
> + "pic_struct = %u, "
> + "slice_segment_addr = %u, "
> + "ref_idx_l0 = %s, "
> + "ref_idx_l1 = %s, "
> + "short_term_ref_pic_set_size = %u, "
> + "long_term_ref_pic_set_size = %u, "
> + "flags = %s",
> __entry->s.bit_size,
> __entry->s.data_byte_offset,
> __entry->s.num_entry_point_offsets,
> @@ -911,16 +918,16 @@ DECLARE_EVENT_CLASS(v4l2_hevc_pred_weight_table_tmpl,
> TP_ARGS(p),
> TP_STRUCT__entry(__field_struct(struct v4l2_hevc_pred_weight_table,
> p)),
> TP_fast_assign(__entry->p = *p),
> - TP_printk("\ndelta_luma_weight_l0 %s\n"
> - "luma_offset_l0 %s\n"
> - "delta_chroma_weight_l0 {%s}\n"
> - "chroma_offset_l0 {%s}\n"
> - "delta_luma_weight_l1 %s\n"
> - "luma_offset_l1 %s\n"
> - "delta_chroma_weight_l1 {%s}\n"
> - "chroma_offset_l1 {%s}\n"
> - "luma_log2_weight_denom %d\n"
> - "delta_chroma_log2_weight_denom %d\n",
> + TP_printk("delta_luma_weight_l0 = %s, "
> + "luma_offset_l0 = %s, "
> + "delta_chroma_weight_l0 = {%s}, "
> + "chroma_offset_l0 = {%s}, "
> + "delta_luma_weight_l1 = %s, "
> + "luma_offset_l1 = %s, "
> + "delta_chroma_weight_l1 = {%s}, "
> + "chroma_offset_l1 = {%s}, "
> + "luma_log2_weight_denom = %d, "
> + "delta_chroma_log2_weight_denom = %d",
> __print_array(__entry->p.delta_luma_weight_l0,
> ARRAY_SIZE(__entry->p.delta_luma_weight_l0),
> sizeof(__entry->p.delta_luma_weight_l0[0])),
> @@ -959,12 +966,12 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_scaling_matrix_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_scaling_matrix,
> s)),
> TP_fast_assign(__entry->s = *s),
> - TP_printk("\nscaling_list_4x4 {%s}\n"
> - "scaling_list_8x8 {%s}\n"
> - "scaling_list_16x16 {%s}\n"
> - "scaling_list_32x32 {%s}\n"
> - "scaling_list_dc_coef_16x16 %s\n"
> - "scaling_list_dc_coef_32x32 %s\n",
> + TP_printk("scaling_list_4x4 = {%s}, "
> + "scaling_list_8x8 = {%s}, "
> + "scaling_list_16x16 = {%s}, "
> + "scaling_list_32x32 = {%s}, "
> + "scaling_list_dc_coef_16x16 = %s, "
> + "scaling_list_dc_coef_32x32 = %s",
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->s.scaling_list_4x4,
> sizeof(__entry->s.scaling_list_4x4),
> @@ -994,17 +1001,17 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_decode_params_tmpl,
> TP_ARGS(d),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_decode_params,
> d)),
> TP_fast_assign(__entry->d = *d),
> - TP_printk("\npic_order_cnt_val %d\n"
> - "short_term_ref_pic_set_size %u\n"
> - "long_term_ref_pic_set_size %u\n"
> - "num_active_dpb_entries %u\n"
> - "num_poc_st_curr_before %u\n"
> - "num_poc_st_curr_after %u\n"
> - "num_poc_lt_curr %u\n"
> - "poc_st_curr_before %s\n"
> - "poc_st_curr_after %s\n"
> - "poc_lt_curr %s\n"
> - "flags %s",
> + TP_printk("pic_order_cnt_val = %d, "
> + "short_term_ref_pic_set_size = %u, "
> + "long_term_ref_pic_set_size = %u, "
> + "num_active_dpb_entries = %u, "
> + "num_poc_st_curr_before = %u, "
> + "num_poc_st_curr_after = %u, "
> + "num_poc_lt_curr = %u, "
> + "poc_st_curr_before = %s, "
> + "poc_st_curr_after = %s, "
> + "poc_lt_curr = %s, "
> + "flags = %s",
> __entry->d.pic_order_cnt_val,
> __entry->d.short_term_ref_pic_set_size,
> __entry->d.long_term_ref_pic_set_size,
> @@ -1033,8 +1040,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl,
> TP_ARGS(lt),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_lt_rps,
> lt)),
> TP_fast_assign(__entry->lt = *lt),
> - TP_printk("\nflags %s\n"
> - "lt_ref_pic_poc_lsb_sps %x\n",
> + TP_printk("flags = %s, "
> + "lt_ref_pic_poc_lsb_sps = %x",
> __print_flags(__entry->lt.flags, "|",
> {V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT, "USED_LT"}
> ),
> @@ -1047,16 +1054,16 @@
> DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl,
> TP_ARGS(st),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_st_rps,
> st)),
> TP_fast_assign(__entry->st = *st),
> - TP_printk("\nflags %s\n"
> - "delta_idx_minus1: %u\n"
> - "delta_rps_sign: %u\n"
> - "abs_delta_rps_minus1: %u\n"
> - "num_negative_pics: %u\n"
> - "num_positive_pics: %u\n"
> - "used_by_curr_pic: %08x\n"
> - "use_delta_flag: %08x\n"
> - "delta_poc_s0_minus1: %s\n"
> - "delta_poc_s1_minus1: %s\n",
> + TP_printk("flags = %s, "
> + "delta_idx_minus1 = %u, "
> + "delta_rps_sign = %u, "
> + "abs_delta_rps_minus1 = %u, "
> + "num_negative_pics = %u, "
> + "num_positive_pics = %u, "
> + "used_by_curr_pic = %08x, "
> + "use_delta_flag = %08x, "
> + "delta_poc_s0_minus1 = %s, "
> + "delta_poc_s1_minus1 = %s",
> __print_flags(__entry->st.flags, "|",
> {V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED,
> "INTER_REF_PIC_SET_PRED"}
> ),
> @@ -1081,10 +1088,10 @@ DECLARE_EVENT_CLASS(v4l2_hevc_dpb_entry_tmpl,
> TP_ARGS(e),
> TP_STRUCT__entry(__field_struct(struct v4l2_hevc_dpb_entry, e)),
> TP_fast_assign(__entry->e = *e),
> - TP_printk("\ntimestamp %llu\n"
> - "flags %s\n"
> - "field_pic %u\n"
> - "pic_order_cnt_val %d\n",
> + TP_printk("timestamp = %llu, "
> + "flags = %s, "
> + "field_pic = %u, "
> + "pic_order_cnt_val = %d",
> __entry->e.timestamp,
> __print_flags(__entry->e.flags, "|",
> {V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE,
> "LONG_TERM_REFERENCE"}
> @@ -1145,8 +1152,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_seq_tmpl,
> TP_ARGS(s),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_sequence, s)),
> TP_fast_assign(__entry->s = *s;),
> - TP_printk("\nhorizontal_size %u\nvertical_size %u\nvbv_buffer_size
> %u\n"
> - "profile_and_level_indication %u\nchroma_format %u\nflags
> %s\n",
> + TP_printk("horizontal_size = %u, vertical_size = %u, vbv_buffer_size
> = %u, "
> + "profile_and_level_indication = %u, chroma_format = %u,
> flags = %s",
> __entry->s.horizontal_size,
> __entry->s.vertical_size,
> __entry->s.vbv_buffer_size,
> @@ -1162,8 +1169,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_pic_tmpl,
> TP_ARGS(p),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_picture, p)),
> TP_fast_assign(__entry->p = *p;),
> - TP_printk("\nbackward_ref_ts %llu\nforward_ref_ts %llu\nflags
> %s\nf_code {%s}\n"
> - "picture_coding_type: %u\npicture_structure
> %u\nintra_dc_precision %u\n",
> + TP_printk("backward_ref_ts = %llu, forward_ref_ts = %llu, flags = %s,
> f_code = {%s}, "
> + "picture_coding_type = %u, picture_structure = %u,
> intra_dc_precision = %u",
> __entry->p.backward_ref_ts,
> __entry->p.forward_ref_ts,
> __print_flags(__entry->p.flags, "|",
> @@ -1190,8 +1197,8 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_quant_tmpl,
> TP_ARGS(q),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_quantisation,
> q)),
> TP_fast_assign(__entry->q = *q;),
> - TP_printk("\nintra_quantiser_matrix %s\nnon_intra_quantiser_matrix
> %s\n"
> - "chroma_intra_quantiser_matrix
> %s\nchroma_non_intra_quantiser_matrix %s\n",
> + TP_printk("intra_quantiser_matrix = %s, non_intra_quantiser_matrix =
> %s, "
> + "chroma_intra_quantiser_matrix = %s,
> chroma_non_intra_quantiser_matrix = %s",
> __print_array(__entry->q.intra_quantiser_matrix,
> ARRAY_SIZE(__entry-
> >q.intra_quantiser_matrix),
> sizeof(__entry-
> >q.intra_quantiser_matrix[0])),
> @@ -1229,10 +1236,10 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_entropy_tmpl,
> TP_ARGS(f),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nentropy.coeff_probs {%s}\n"
> - "entropy.y_mode_probs %s\n"
> - "entropy.uv_mode_probs %s\n"
> - "entropy.mv_probs {%s}",
> + TP_printk("entropy.coeff_probs = {%s}, "
> + "entropy.y_mode_probs = %s, "
> + "entropy.uv_mode_probs = %s, "
> + "entropy.mv_probs = {%s}",
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->f.entropy.coeff_probs,
> sizeof(__entry->f.entropy.coeff_probs),
> @@ -1255,41 +1262,41 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl,
> TP_ARGS(f),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nsegment.quant_update %s\n"
> - "segment.lf_update %s\n"
> - "segment.segment_probs %s\n"
> - "segment.flags %s\n"
> - "lf.ref_frm_delta %s\n"
> - "lf.mb_mode_delta %s\n"
> - "lf.sharpness_level %u\n"
> - "lf.level %u\n"
> - "lf.flags %s\n"
> - "quant.y_ac_qi %u\n"
> - "quant.y_dc_delta %d\n"
> - "quant.y2_dc_delta %d\n"
> - "quant.y2_ac_delta %d\n"
> - "quant.uv_dc_delta %d\n"
> - "quant.uv_ac_delta %d\n"
> - "coder_state.range %u\n"
> - "coder_state.value %u\n"
> - "coder_state.bit_count %u\n"
> - "width %u\n"
> - "height %u\n"
> - "horizontal_scale %u\n"
> - "vertical_scale %u\n"
> - "version %u\n"
> - "prob_skip_false %u\n"
> - "prob_intra %u\n"
> - "prob_last %u\n"
> - "prob_gf %u\n"
> - "num_dct_parts %u\n"
> - "first_part_size %u\n"
> - "first_part_header_bits %u\n"
> - "dct_part_sizes %s\n"
> - "last_frame_ts %llu\n"
> - "golden_frame_ts %llu\n"
> - "alt_frame_ts %llu\n"
> - "flags %s",
> + TP_printk("segment.quant_update = %s, "
> + "segment.lf_update = %s, "
> + "segment.segment_probs = %s, "
> + "segment.flags = %s, "
> + "lf.ref_frm_delta = %s, "
> + "lf.mb_mode_delta = %s, "
> + "lf.sharpness_level = %u, "
> + "lf.level = %u, "
> + "lf.flags = %s, "
> + "quant.y_ac_qi = %u, "
> + "quant.y_dc_delta = %d, "
> + "quant.y2_dc_delta = %d, "
> + "quant.y2_ac_delta = %d, "
> + "quant.uv_dc_delta = %d, "
> + "quant.uv_ac_delta = %d, "
> + "coder_state.range = %u, "
> + "coder_state.value = %u, "
> + "coder_state.bit_count = %u, "
> + "width = %u, "
> + "height = %u, "
> + "horizontal_scale = %u, "
> + "vertical_scale = %u, "
> + "version = %u, "
> + "prob_skip_false = %u, "
> + "prob_intra = %u, "
> + "prob_last = %u, "
> + "prob_gf = %u, "
> + "num_dct_parts = %u, "
> + "first_part_size = %u, "
> + "first_part_header_bits = %u, "
> + "dct_part_sizes = %s, "
> + "last_frame_ts = %llu, "
> + "golden_frame_ts = %llu, "
> + "alt_frame_ts = %llu, "
> + "flags = %s",
> __print_array(__entry->f.segment.quant_update,
> ARRAY_SIZE(__entry->f.segment.quant_update),
> sizeof(__entry->f.segment.quant_update[0])),
> @@ -1370,39 +1377,39 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl,
> TP_ARGS(f),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_frame, f)),
> TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nlf.ref_deltas %s\n"
> - "lf.mode_deltas %s\n"
> - "lf.level %u\n"
> - "lf.sharpness %u\n"
> - "lf.flags %s\n"
> - "quant.base_q_idx %u\n"
> - "quant.delta_q_y_dc %d\n"
> - "quant.delta_q_uv_dc %d\n"
> - "quant.delta_q_uv_ac %d\n"
> - "seg.feature_data {%s}\n"
> - "seg.feature_enabled %s\n"
> - "seg.tree_probs %s\n"
> - "seg.pred_probs %s\n"
> - "seg.flags %s\n"
> - "flags %s\n"
> - "compressed_header_size %u\n"
> - "uncompressed_header_size %u\n"
> - "frame_width_minus_1 %u\n"
> - "frame_height_minus_1 %u\n"
> - "render_width_minus_1 %u\n"
> - "render_height_minus_1 %u\n"
> - "last_frame_ts %llu\n"
> - "golden_frame_ts %llu\n"
> - "alt_frame_ts %llu\n"
> - "ref_frame_sign_bias %s\n"
> - "reset_frame_context %s\n"
> - "frame_context_idx %u\n"
> - "profile %u\n"
> - "bit_depth %u\n"
> - "interpolation_filter %s\n"
> - "tile_cols_log2 %u\n"
> - "tile_rows_log_2 %u\n"
> - "reference_mode %s\n",
> + TP_printk("lf.ref_deltas = %s, "
> + "lf.mode_deltas = %s, "
> + "lf.level = %u, "
> + "lf.sharpness = %u, "
> + "lf.flags = %s, "
> + "quant.base_q_idx = %u, "
> + "quant.delta_q_y_dc = %d, "
> + "quant.delta_q_uv_dc = %d, "
> + "quant.delta_q_uv_ac = %d, "
> + "seg.feature_data = {%s}, "
> + "seg.feature_enabled = %s, "
> + "seg.tree_probs = %s, "
> + "seg.pred_probs = %s, "
> + "seg.flags = %s, "
> + "flags = %s, "
> + "compressed_header_size = %u, "
> + "uncompressed_header_size = %u, "
> + "frame_width_minus_1 = %u, "
> + "frame_height_minus_1 = %u, "
> + "render_width_minus_1 = %u, "
> + "render_height_minus_1 = %u, "
> + "last_frame_ts = %llu, "
> + "golden_frame_ts = %llu, "
> + "alt_frame_ts = %llu, "
> + "ref_frame_sign_bias = %s, "
> + "reset_frame_context = %s, "
> + "frame_context_idx = %u, "
> + "profile = %u, "
> + "bit_depth = %u, "
> + "interpolation_filter = %s, "
> + "tile_cols_log2 = %u, "
> + "tile_rows_log_2 = %u, "
> + "reference_mode = %s",
> __print_array(__entry->f.lf.ref_deltas,
> ARRAY_SIZE(__entry->f.lf.ref_deltas),
> sizeof(__entry->f.lf.ref_deltas[0])),
> @@ -1487,20 +1494,20 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl,
> TP_ARGS(h),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr,
> h)),
> TP_fast_assign(__entry->h = *h;),
> - TP_printk("\ntx_mode %s\n"
> - "tx8 {%s}\n"
> - "tx16 {%s}\n"
> - "tx32 {%s}\n"
> - "skip %s\n"
> - "inter_mode {%s}\n"
> - "interp_filter {%s}\n"
> - "is_inter %s\n"
> - "comp_mode %s\n"
> - "single_ref {%s}\n"
> - "comp_ref %s\n"
> - "y_mode {%s}\n"
> - "uv_mode {%s}\n"
> - "partition {%s}\n",
> + TP_printk("tx_mode = %s, "
> + "tx8 = {%s}, "
> + "tx16 = {%s}, "
> + "tx32 = {%s}, "
> + "skip = %s, "
> + "inter_mode = {%s}, "
> + "interp_filter = {%s}, "
> + "is_inter = %s, "
> + "comp_mode = %s, "
> + "single_ref = {%s}, "
> + "comp_ref = %s, "
> + "y_mode = {%s}, "
> + "uv_mode = {%s}, "
> + "partition = {%s}",
> __print_symbolic(__entry->h.tx_mode,
> {V4L2_VP9_TX_MODE_ONLY_4X4, "TX_MODE_ONLY_4X4"},
> {V4L2_VP9_TX_MODE_ALLOW_8X8, "TX_MODE_ALLOW_8X8"},
> @@ -1563,7 +1570,7 @@ DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_coef_tmpl,
> TP_ARGS(h),
> TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr,
> h)),
> TP_fast_assign(__entry->h = *h;),
> - TP_printk("\n coef {%s}",
> + TP_printk("coef = {%s}",
> __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> __entry->h.coef,
> sizeof(__entry->h.coef),
> @@ -1576,15 +1583,15 @@ DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl,
> TP_ARGS(p),
> TP_STRUCT__entry(__field_struct(struct v4l2_vp9_mv_probs, p)),
> TP_fast_assign(__entry->p = *p;),
> - TP_printk("\n joint %s\n"
> - "sign %s\n"
> - "classes {%s}\n"
> - "class0_bit %s\n"
> - "bits {%s}\n"
> - "class0_fr {%s}\n"
> - "fr {%s}\n"
> - "class0_hp %s\n"
> - "hp %s\n",
> + TP_printk("joint = %s, "
> + "sign = %s, "
> + "classes = {%s}, "
> + "class0_bit = %s, "
> + "bits = {%s}, "
> + "class0_fr = {%s}, "
> + "fr = {%s}, "
> + "class0_hp = %s, "
> + "hp = %s",
> __print_array(__entry->p.joint,
> ARRAY_SIZE(__entry->p.joint),
> sizeof(__entry->p.joint[0])),
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 01/11] media: Move visl traces to v4l2-core
From: Nicolas Dufresne @ 2026-04-28 19:27 UTC (permalink / raw)
To: Detlev Casanova, linux-kernel
Cc: Benjamin Gaignard, Philipp Zabel, Mauro Carvalho Chehab,
Heiko Stuebner, Daniel Almeida, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Hans Verkuil, Laurent Pinchart,
Ricardo Ribalda, Yunke Cao, Sakari Ailus, Pavan Bobba,
James Cowgill, Ma Ke, Jacopo Mondi, Daniel Scally, linux-media,
linux-rockchip, linux-arm-kernel, linux-trace-kernel, kernel
In-Reply-To: <20260212162328.192217-2-detlev.casanova@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 157842 bytes --]
Le jeudi 12 février 2026 à 11:23 -0500, Detlev Casanova a écrit :
> The visl driver defines traces for all stateless controls.
> Move those definition to a new v4l2_requests.h file and expose them for
> all drivers to use.
>
> As each event can be enabled individually in userspace, group them all in
> the same v4l2_requests event folder.
>
> Later, it can also be used by v4l2-core to trace controls as they are
> being set.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> drivers/media/test-drivers/visl/Makefile | 2 +-
> drivers/media/test-drivers/visl/visl-dec.c | 8 +-
> .../media/test-drivers/visl/visl-trace-av1.h | 314 ----
> .../media/test-drivers/visl/visl-trace-fwht.h | 66 -
> .../media/test-drivers/visl/visl-trace-h264.h | 349 ----
> .../media/test-drivers/visl/visl-trace-hevc.h | 464 -----
> .../test-drivers/visl/visl-trace-mpeg2.h | 99 -
> .../test-drivers/visl/visl-trace-points.c | 11 -
> .../media/test-drivers/visl/visl-trace-vp8.h | 156 --
> .../media/test-drivers/visl/visl-trace-vp9.h | 292 ---
> drivers/media/v4l2-core/v4l2-trace.c | 45 +
> include/trace/events/v4l2_requests.h | 1645 +++++++++++++++++
> 12 files changed, 1692 insertions(+), 1759 deletions(-)
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-av1.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-fwht.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-h264.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-hevc.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-mpeg2.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-points.c
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-vp8.h
> delete mode 100644 drivers/media/test-drivers/visl/visl-trace-vp9.h
> create mode 100644 include/trace/events/v4l2_requests.h
Might want to check if the name of that header make sense. This is tracing
compound control structures, which can't be traced generically otherwise, I
could imagine this to be extended to any compound controls ?
Nicolas
>
> diff --git a/drivers/media/test-drivers/visl/Makefile b/drivers/media/test-drivers/visl/Makefile
> index fb4d5ae1b17f..a5049e2af844 100644
> --- a/drivers/media/test-drivers/visl/Makefile
> +++ b/drivers/media/test-drivers/visl/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0+
> -visl-y := visl-core.o visl-video.o visl-dec.o visl-trace-points.o
> +visl-y := visl-core.o visl-video.o visl-dec.o
>
> ifeq ($(CONFIG_VISL_DEBUGFS),y)
> visl-y += visl-debugfs.o
> diff --git a/drivers/media/test-drivers/visl/visl-dec.c b/drivers/media/test-drivers/visl/visl-dec.c
> index 6bbf93757047..d49208e83726 100644
> --- a/drivers/media/test-drivers/visl/visl-dec.c
> +++ b/drivers/media/test-drivers/visl/visl-dec.c
> @@ -7,18 +7,12 @@
> #include "visl.h"
> #include "visl-debugfs.h"
> #include "visl-dec.h"
> -#include "visl-trace-fwht.h"
> -#include "visl-trace-mpeg2.h"
> -#include "visl-trace-vp8.h"
> -#include "visl-trace-vp9.h"
> -#include "visl-trace-h264.h"
> -#include "visl-trace-hevc.h"
> -#include "visl-trace-av1.h"
>
> #include <linux/delay.h>
> #include <linux/workqueue.h>
> #include <media/v4l2-mem2mem.h>
> #include <media/tpg/v4l2-tpg.h>
> +#include <trace/events/v4l2_requests.h>
>
> #define LAST_BUF_IDX (V4L2_AV1_REF_LAST_FRAME - V4L2_AV1_REF_LAST_FRAME)
> #define LAST2_BUF_IDX (V4L2_AV1_REF_LAST2_FRAME - V4L2_AV1_REF_LAST_FRAME)
> diff --git a/drivers/media/test-drivers/visl/visl-trace-av1.h b/drivers/media/test-drivers/visl/visl-trace-av1.h
> deleted file mode 100644
> index 09f205de53df..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-av1.h
> +++ /dev/null
> @@ -1,314 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#if !defined(_VISL_TRACE_AV1_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_AV1_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_av1_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_av1_seq_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_sequence *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_sequence, s)),
> - TP_fast_assign(__entry->s = *s;),
> - TP_printk("\nflags %s\nseq_profile: %u\norder_hint_bits: %u\nbit_depth: %u\n"
> - "max_frame_width_minus_1: %u\nmax_frame_height_minus_1: %u\n",
> - __print_flags(__entry->s.flags, "|",
> - {V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE, "STILL_PICTURE"},
> - {V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK, "USE_128X128_SUPERBLOCK"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA, "ENABLE_FILTER_INTRA"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER, "ENABLE_INTRA_EDGE_FILTER"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND, "ENABLE_INTERINTRA_COMPOUND"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND, "ENABLE_MASKED_COMPOUND"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION, "ENABLE_WARPED_MOTION"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER, "ENABLE_DUAL_FILTER"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT, "ENABLE_ORDER_HINT"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP, "ENABLE_JNT_COMP"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS, "ENABLE_REF_FRAME_MVS"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES, "ENABLE_SUPERRES"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF, "ENABLE_CDEF"},
> - {V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION, "ENABLE_RESTORATION"},
> - {V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME, "MONO_CHROME"},
> - {V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE, "COLOR_RANGE"},
> - {V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X, "SUBSAMPLING_X"},
> - {V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y, "SUBSAMPLING_Y"},
> - {V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT, "FILM_GRAIN_PARAMS_PRESENT"},
> - {V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q, "SEPARATE_UV_DELTA_Q"}),
> - __entry->s.seq_profile,
> - __entry->s.order_hint_bits,
> - __entry->s.bit_depth,
> - __entry->s.max_frame_width_minus_1,
> - __entry->s.max_frame_height_minus_1
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_av1_tge_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_tile_group_entry *t),
> - TP_ARGS(t),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_tile_group_entry, t)),
> - TP_fast_assign(__entry->t = *t;),
> - TP_printk("\ntile_offset: %u\n tile_size: %u\n tile_row: %u\ntile_col: %u\n",
> - __entry->t.tile_offset,
> - __entry->t.tile_size,
> - __entry->t.tile_row,
> - __entry->t.tile_col
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_av1_frame_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("\ntile_info.flags: %s\ntile_info.context_update_tile_id: %u\n"
> - "tile_info.tile_cols: %u\ntile_info.tile_rows: %u\n"
> - "tile_info.mi_col_starts: %s\ntile_info.mi_row_starts: %s\n"
> - "tile_info.width_in_sbs_minus_1: %s\ntile_info.height_in_sbs_minus_1: %s\n"
> - "tile_info.tile_size_bytes: %u\nquantization.flags: %s\n"
> - "quantization.base_q_idx: %u\nquantization.delta_q_y_dc: %d\n"
> - "quantization.delta_q_u_dc: %d\nquantization.delta_q_u_ac: %d\n"
> - "quantization.delta_q_v_dc: %d\nquantization.delta_q_v_ac: %d\n"
> - "quantization.qm_y: %u\nquantization.qm_u: %u\nquantization.qm_v: %u\n"
> - "quantization.delta_q_res: %u\nsuperres_denom: %u\nsegmentation.flags: %s\n"
> - "segmentation.last_active_seg_id: %u\nsegmentation.feature_enabled:%s\n"
> - "loop_filter.flags: %s\nloop_filter.level: %s\nloop_filter.sharpness: %u\n"
> - "loop_filter.ref_deltas: %s\nloop_filter.mode_deltas: %s\n"
> - "loop_filter.delta_lf_res: %u\ncdef.damping_minus_3: %u\ncdef.bits: %u\n"
> - "cdef.y_pri_strength: %s\ncdef.y_sec_strength: %s\n"
> - "cdef.uv_pri_strength: %s\ncdef.uv_sec_strength:%s\nskip_mode_frame: %s\n"
> - "primary_ref_frame: %u\nloop_restoration.flags: %s\n"
> - "loop_restoration.lr_unit_shift: %u\nloop_restoration.lr_uv_shift: %u\n"
> - "loop_restoration.frame_restoration_type: %s\n"
> - "loop_restoration.loop_restoration_size: %s\nflags: %s\norder_hint: %u\n"
> - "upscaled_width: %u\nframe_width_minus_1: %u\nframe_height_minus_1: %u\n"
> - "render_width_minus_1: %u\nrender_height_minus_1: %u\ncurrent_frame_id: %u\n"
> - "buffer_removal_time: %s\norder_hints: %s\nreference_frame_ts: %s\n"
> - "ref_frame_idx: %s\nrefresh_frame_flags: %u\n",
> - __print_flags(__entry->f.tile_info.flags, "|",
> - {V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING, "UNIFORM_TILE_SPACING"}),
> - __entry->f.tile_info.context_update_tile_id,
> - __entry->f.tile_info.tile_cols,
> - __entry->f.tile_info.tile_rows,
> - __print_array(__entry->f.tile_info.mi_col_starts,
> - ARRAY_SIZE(__entry->f.tile_info.mi_col_starts),
> - sizeof(__entry->f.tile_info.mi_col_starts[0])),
> - __print_array(__entry->f.tile_info.mi_row_starts,
> - ARRAY_SIZE(__entry->f.tile_info.mi_row_starts),
> - sizeof(__entry->f.tile_info.mi_row_starts[0])),
> - __print_array(__entry->f.tile_info.width_in_sbs_minus_1,
> - ARRAY_SIZE(__entry->f.tile_info.width_in_sbs_minus_1),
> - sizeof(__entry->f.tile_info.width_in_sbs_minus_1[0])),
> - __print_array(__entry->f.tile_info.height_in_sbs_minus_1,
> - ARRAY_SIZE(__entry->f.tile_info.height_in_sbs_minus_1),
> - sizeof(__entry->f.tile_info.height_in_sbs_minus_1[0])),
> - __entry->f.tile_info.tile_size_bytes,
> - __print_flags(__entry->f.quantization.flags, "|",
> - {V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA, "DIFF_UV_DELTA"},
> - {V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX, "USING_QMATRIX"},
> - {V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT, "DELTA_Q_PRESENT"}),
> - __entry->f.quantization.base_q_idx,
> - __entry->f.quantization.delta_q_y_dc,
> - __entry->f.quantization.delta_q_u_dc,
> - __entry->f.quantization.delta_q_u_ac,
> - __entry->f.quantization.delta_q_v_dc,
> - __entry->f.quantization.delta_q_v_ac,
> - __entry->f.quantization.qm_y,
> - __entry->f.quantization.qm_u,
> - __entry->f.quantization.qm_v,
> - __entry->f.quantization.delta_q_res,
> - __entry->f.superres_denom,
> - __print_flags(__entry->f.segmentation.flags, "|",
> - {V4L2_AV1_SEGMENTATION_FLAG_ENABLED, "ENABLED"},
> - {V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP, "UPDATE_MAP"},
> - {V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE, "TEMPORAL_UPDATE"},
> - {V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA, "UPDATE_DATA"},
> - {V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP, "SEG_ID_PRE_SKIP"}),
> - __entry->f.segmentation.last_active_seg_id,
> - __print_array(__entry->f.segmentation.feature_enabled,
> - ARRAY_SIZE(__entry->f.segmentation.feature_enabled),
> - sizeof(__entry->f.segmentation.feature_enabled[0])),
> - __print_flags(__entry->f.loop_filter.flags, "|",
> - {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED, "DELTA_ENABLED"},
> - {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE, "DELTA_UPDATE"},
> - {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT, "DELTA_LF_PRESENT"},
> - {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI, "DELTA_LF_MULTI"}),
> - __print_array(__entry->f.loop_filter.level,
> - ARRAY_SIZE(__entry->f.loop_filter.level),
> - sizeof(__entry->f.loop_filter.level[0])),
> - __entry->f.loop_filter.sharpness,
> - __print_array(__entry->f.loop_filter.ref_deltas,
> - ARRAY_SIZE(__entry->f.loop_filter.ref_deltas),
> - sizeof(__entry->f.loop_filter.ref_deltas[0])),
> - __print_array(__entry->f.loop_filter.mode_deltas,
> - ARRAY_SIZE(__entry->f.loop_filter.mode_deltas),
> - sizeof(__entry->f.loop_filter.mode_deltas[0])),
> - __entry->f.loop_filter.delta_lf_res,
> - __entry->f.cdef.damping_minus_3,
> - __entry->f.cdef.bits,
> - __print_array(__entry->f.cdef.y_pri_strength,
> - ARRAY_SIZE(__entry->f.cdef.y_pri_strength),
> - sizeof(__entry->f.cdef.y_pri_strength[0])),
> - __print_array(__entry->f.cdef.y_sec_strength,
> - ARRAY_SIZE(__entry->f.cdef.y_sec_strength),
> - sizeof(__entry->f.cdef.y_sec_strength[0])),
> - __print_array(__entry->f.cdef.uv_pri_strength,
> - ARRAY_SIZE(__entry->f.cdef.uv_pri_strength),
> - sizeof(__entry->f.cdef.uv_pri_strength[0])),
> - __print_array(__entry->f.cdef.uv_sec_strength,
> - ARRAY_SIZE(__entry->f.cdef.uv_sec_strength),
> - sizeof(__entry->f.cdef.uv_sec_strength[0])),
> - __print_array(__entry->f.skip_mode_frame,
> - ARRAY_SIZE(__entry->f.skip_mode_frame),
> - sizeof(__entry->f.skip_mode_frame[0])),
> - __entry->f.primary_ref_frame,
> - __print_flags(__entry->f.loop_restoration.flags, "|",
> - {V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR, "USES_LR"},
> - {V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR, "USES_CHROMA_LR"}),
> - __entry->f.loop_restoration.lr_unit_shift,
> - __entry->f.loop_restoration.lr_uv_shift,
> - __print_array(__entry->f.loop_restoration.frame_restoration_type,
> - ARRAY_SIZE(__entry->f.loop_restoration.frame_restoration_type),
> - sizeof(__entry->f.loop_restoration.frame_restoration_type[0])),
> - __print_array(__entry->f.loop_restoration.loop_restoration_size,
> - ARRAY_SIZE(__entry->f.loop_restoration.loop_restoration_size),
> - sizeof(__entry->f.loop_restoration.loop_restoration_size[0])),
> - __print_flags(__entry->f.flags, "|",
> - {V4L2_AV1_FRAME_FLAG_SHOW_FRAME, "SHOW_FRAME"},
> - {V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME, "SHOWABLE_FRAME"},
> - {V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE, "ERROR_RESILIENT_MODE"},
> - {V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE, "DISABLE_CDF_UPDATE"},
> - {V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS, "ALLOW_SCREEN_CONTENT_TOOLS"},
> - {V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV, "FORCE_INTEGER_MV"},
> - {V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC, "ALLOW_INTRABC"},
> - {V4L2_AV1_FRAME_FLAG_USE_SUPERRES, "USE_SUPERRES"},
> - {V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV, "ALLOW_HIGH_PRECISION_MV"},
> - {V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE, "IS_MOTION_MODE_SWITCHABLE"},
> - {V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS, "USE_REF_FRAME_MVS"},
> - {V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF,
> - "DISABLE_FRAME_END_UPDATE_CDF"},
> - {V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION, "ALLOW_WARPED_MOTION"},
> - {V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT, "REFERENCE_SELECT"},
> - {V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET, "REDUCED_TX_SET"},
> - {V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED, "SKIP_MODE_ALLOWED"},
> - {V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT, "SKIP_MODE_PRESENT"},
> - {V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE, "FRAME_SIZE_OVERRIDE"},
> - {V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT, "BUFFER_REMOVAL_TIME_PRESENT"},
> - {V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING, "FRAME_REFS_SHORT_SIGNALING"}),
> - __entry->f.order_hint,
> - __entry->f.upscaled_width,
> - __entry->f.frame_width_minus_1,
> - __entry->f.frame_height_minus_1,
> - __entry->f.render_width_minus_1,
> - __entry->f.render_height_minus_1,
> - __entry->f.current_frame_id,
> - __print_array(__entry->f.buffer_removal_time,
> - ARRAY_SIZE(__entry->f.buffer_removal_time),
> - sizeof(__entry->f.buffer_removal_time[0])),
> - __print_array(__entry->f.order_hints,
> - ARRAY_SIZE(__entry->f.order_hints),
> - sizeof(__entry->f.order_hints[0])),
> - __print_array(__entry->f.reference_frame_ts,
> - ARRAY_SIZE(__entry->f.reference_frame_ts),
> - sizeof(__entry->f.reference_frame_ts[0])),
> - __print_array(__entry->f.ref_frame_idx,
> - ARRAY_SIZE(__entry->f.ref_frame_idx),
> - sizeof(__entry->f.ref_frame_idx[0])),
> - __entry->f.refresh_frame_flags
> - )
> -);
> -
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_av1_film_grain_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_av1_film_grain *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_film_grain, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nflags %s\ncr_mult: %u\ngrain_seed: %u\n"
> - "film_grain_params_ref_idx: %u\nnum_y_points: %u\npoint_y_value: %s\n"
> - "point_y_scaling: %s\nnum_cb_points: %u\npoint_cb_value: %s\n"
> - "point_cb_scaling: %s\nnum_cr_points: %u\npoint_cr_value: %s\n"
> - "point_cr_scaling: %s\ngrain_scaling_minus_8: %u\nar_coeff_lag: %u\n"
> - "ar_coeffs_y_plus_128: %s\nar_coeffs_cb_plus_128: %s\n"
> - "ar_coeffs_cr_plus_128: %s\nar_coeff_shift_minus_6: %u\n"
> - "grain_scale_shift: %u\ncb_mult: %u\ncb_luma_mult: %u\ncr_luma_mult: %u\n"
> - "cb_offset: %u\ncr_offset: %u\n",
> - __print_flags(__entry->f.flags, "|",
> - {V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN, "APPLY_GRAIN"},
> - {V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN, "UPDATE_GRAIN"},
> - {V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA, "CHROMA_SCALING_FROM_LUMA"},
> - {V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP, "OVERLAP"},
> - {V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE, "CLIP_TO_RESTRICTED_RANGE"}),
> - __entry->f.cr_mult,
> - __entry->f.grain_seed,
> - __entry->f.film_grain_params_ref_idx,
> - __entry->f.num_y_points,
> - __print_array(__entry->f.point_y_value,
> - ARRAY_SIZE(__entry->f.point_y_value),
> - sizeof(__entry->f.point_y_value[0])),
> - __print_array(__entry->f.point_y_scaling,
> - ARRAY_SIZE(__entry->f.point_y_scaling),
> - sizeof(__entry->f.point_y_scaling[0])),
> - __entry->f.num_cb_points,
> - __print_array(__entry->f.point_cb_value,
> - ARRAY_SIZE(__entry->f.point_cb_value),
> - sizeof(__entry->f.point_cb_value[0])),
> - __print_array(__entry->f.point_cb_scaling,
> - ARRAY_SIZE(__entry->f.point_cb_scaling),
> - sizeof(__entry->f.point_cb_scaling[0])),
> - __entry->f.num_cr_points,
> - __print_array(__entry->f.point_cr_value,
> - ARRAY_SIZE(__entry->f.point_cr_value),
> - sizeof(__entry->f.point_cr_value[0])),
> - __print_array(__entry->f.point_cr_scaling,
> - ARRAY_SIZE(__entry->f.point_cr_scaling),
> - sizeof(__entry->f.point_cr_scaling[0])),
> - __entry->f.grain_scaling_minus_8,
> - __entry->f.ar_coeff_lag,
> - __print_array(__entry->f.ar_coeffs_y_plus_128,
> - ARRAY_SIZE(__entry->f.ar_coeffs_y_plus_128),
> - sizeof(__entry->f.ar_coeffs_y_plus_128[0])),
> - __print_array(__entry->f.ar_coeffs_cb_plus_128,
> - ARRAY_SIZE(__entry->f.ar_coeffs_cb_plus_128),
> - sizeof(__entry->f.ar_coeffs_cb_plus_128[0])),
> - __print_array(__entry->f.ar_coeffs_cr_plus_128,
> - ARRAY_SIZE(__entry->f.ar_coeffs_cr_plus_128),
> - sizeof(__entry->f.ar_coeffs_cr_plus_128[0])),
> - __entry->f.ar_coeff_shift_minus_6,
> - __entry->f.grain_scale_shift,
> - __entry->f.cb_mult,
> - __entry->f.cb_luma_mult,
> - __entry->f.cr_luma_mult,
> - __entry->f.cb_offset,
> - __entry->f.cr_offset
> - )
> -)
> -
> -DEFINE_EVENT(v4l2_ctrl_av1_seq_tmpl, v4l2_ctrl_av1_sequence,
> - TP_PROTO(const struct v4l2_ctrl_av1_sequence *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_av1_frame_tmpl, v4l2_ctrl_av1_frame,
> - TP_PROTO(const struct v4l2_ctrl_av1_frame *f),
> - TP_ARGS(f)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_av1_tge_tmpl, v4l2_ctrl_av1_tile_group_entry,
> - TP_PROTO(const struct v4l2_ctrl_av1_tile_group_entry *t),
> - TP_ARGS(t)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_av1_film_grain_tmpl, v4l2_ctrl_av1_film_grain,
> - TP_PROTO(const struct v4l2_ctrl_av1_film_grain *f),
> - TP_ARGS(f)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-av1
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/test-drivers/visl/visl-trace-fwht.h b/drivers/media/test-drivers/visl/visl-trace-fwht.h
> deleted file mode 100644
> index 54b119359ff5..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-fwht.h
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#if !defined(_VISL_TRACE_FWHT_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_FWHT_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_fwht_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(
> - __field(u64, backward_ref_ts)
> - __field(u32, version)
> - __field(u32, width)
> - __field(u32, height)
> - __field(u32, flags)
> - __field(u32, colorspace)
> - __field(u32, xfer_func)
> - __field(u32, ycbcr_enc)
> - __field(u32, quantization)
> - ),
> - TP_fast_assign(
> - __entry->backward_ref_ts = p->backward_ref_ts;
> - __entry->version = p->version;
> - __entry->width = p->width;
> - __entry->height = p->height;
> - __entry->flags = p->flags;
> - __entry->colorspace = p->colorspace;
> - __entry->xfer_func = p->xfer_func;
> - __entry->ycbcr_enc = p->ycbcr_enc;
> - __entry->quantization = p->quantization;
> - ),
> - TP_printk("backward_ref_ts %llu version %u width %u height %u flags %s colorspace %u xfer_func %u ycbcr_enc %u quantization %u",
> - __entry->backward_ref_ts, __entry->version, __entry->width, __entry->height,
> - __print_flags(__entry->flags, "|",
> - {V4L2_FWHT_FL_IS_INTERLACED, "IS_INTERLACED"},
> - {V4L2_FWHT_FL_IS_BOTTOM_FIRST, "IS_BOTTOM_FIRST"},
> - {V4L2_FWHT_FL_IS_ALTERNATE, "IS_ALTERNATE"},
> - {V4L2_FWHT_FL_IS_BOTTOM_FIELD, "IS_BOTTOM_FIELD"},
> - {V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED, "LUMA_IS_UNCOMPRESSED"},
> - {V4L2_FWHT_FL_CB_IS_UNCOMPRESSED, "CB_IS_UNCOMPRESSED"},
> - {V4L2_FWHT_FL_CR_IS_UNCOMPRESSED, "CR_IS_UNCOMPRESSED"},
> - {V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED, "ALPHA_IS_UNCOMPRESSED"},
> - {V4L2_FWHT_FL_I_FRAME, "I_FRAME"},
> - {V4L2_FWHT_FL_PIXENC_HSV, "PIXENC_HSV"},
> - {V4L2_FWHT_FL_PIXENC_RGB, "PIXENC_RGB"},
> - {V4L2_FWHT_FL_PIXENC_YUV, "PIXENC_YUV"}),
> - __entry->colorspace, __entry->xfer_func, __entry->ycbcr_enc,
> - __entry->quantization)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_fwht_params_tmpl, v4l2_ctrl_fwht_params,
> - TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
> - TP_ARGS(p)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-fwht
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/test-drivers/visl/visl-trace-h264.h b/drivers/media/test-drivers/visl/visl-trace-h264.h
> deleted file mode 100644
> index d84296a01deb..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-h264.h
> +++ /dev/null
> @@ -1,349 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#if !defined(_VISL_TRACE_H264_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_H264_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_h264_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_h264_sps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_sps *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_sps, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("\nprofile_idc %u\n"
> - "constraint_set_flags %s\n"
> - "level_idc %u\n"
> - "seq_parameter_set_id %u\n"
> - "chroma_format_idc %u\n"
> - "bit_depth_luma_minus8 %u\n"
> - "bit_depth_chroma_minus8 %u\n"
> - "log2_max_frame_num_minus4 %u\n"
> - "pic_order_cnt_type %u\n"
> - "log2_max_pic_order_cnt_lsb_minus4 %u\n"
> - "max_num_ref_frames %u\n"
> - "num_ref_frames_in_pic_order_cnt_cycle %u\n"
> - "offset_for_ref_frame %s\n"
> - "offset_for_non_ref_pic %d\n"
> - "offset_for_top_to_bottom_field %d\n"
> - "pic_width_in_mbs_minus1 %u\n"
> - "pic_height_in_map_units_minus1 %u\n"
> - "flags %s",
> - __entry->s.profile_idc,
> - __print_flags(__entry->s.constraint_set_flags, "|",
> - {V4L2_H264_SPS_CONSTRAINT_SET0_FLAG, "CONSTRAINT_SET0_FLAG"},
> - {V4L2_H264_SPS_CONSTRAINT_SET1_FLAG, "CONSTRAINT_SET1_FLAG"},
> - {V4L2_H264_SPS_CONSTRAINT_SET2_FLAG, "CONSTRAINT_SET2_FLAG"},
> - {V4L2_H264_SPS_CONSTRAINT_SET3_FLAG, "CONSTRAINT_SET3_FLAG"},
> - {V4L2_H264_SPS_CONSTRAINT_SET4_FLAG, "CONSTRAINT_SET4_FLAG"},
> - {V4L2_H264_SPS_CONSTRAINT_SET5_FLAG, "CONSTRAINT_SET5_FLAG"}),
> - __entry->s.level_idc,
> - __entry->s.seq_parameter_set_id,
> - __entry->s.chroma_format_idc,
> - __entry->s.bit_depth_luma_minus8,
> - __entry->s.bit_depth_chroma_minus8,
> - __entry->s.log2_max_frame_num_minus4,
> - __entry->s.pic_order_cnt_type,
> - __entry->s.log2_max_pic_order_cnt_lsb_minus4,
> - __entry->s.max_num_ref_frames,
> - __entry->s.num_ref_frames_in_pic_order_cnt_cycle,
> - __print_array(__entry->s.offset_for_ref_frame,
> - ARRAY_SIZE(__entry->s.offset_for_ref_frame),
> - sizeof(__entry->s.offset_for_ref_frame[0])),
> - __entry->s.offset_for_non_ref_pic,
> - __entry->s.offset_for_top_to_bottom_field,
> - __entry->s.pic_width_in_mbs_minus1,
> - __entry->s.pic_height_in_map_units_minus1,
> - __print_flags(__entry->s.flags, "|",
> - {V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE, "SEPARATE_COLOUR_PLANE"},
> - {V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS, "QPPRIME_Y_ZERO_TRANSFORM_BYPASS"},
> - {V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO, "DELTA_PIC_ORDER_ALWAYS_ZERO"},
> - {V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED, "GAPS_IN_FRAME_NUM_VALUE_ALLOWED"},
> - {V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY, "FRAME_MBS_ONLY"},
> - {V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD, "MB_ADAPTIVE_FRAME_FIELD"},
> - {V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE, "DIRECT_8X8_INFERENCE"}
> - ))
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_pps *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pps, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("\npic_parameter_set_id %u\n"
> - "seq_parameter_set_id %u\n"
> - "num_slice_groups_minus1 %u\n"
> - "num_ref_idx_l0_default_active_minus1 %u\n"
> - "num_ref_idx_l1_default_active_minus1 %u\n"
> - "weighted_bipred_idc %u\n"
> - "pic_init_qp_minus26 %d\n"
> - "pic_init_qs_minus26 %d\n"
> - "chroma_qp_index_offset %d\n"
> - "second_chroma_qp_index_offset %d\n"
> - "flags %s",
> - __entry->p.pic_parameter_set_id,
> - __entry->p.seq_parameter_set_id,
> - __entry->p.num_slice_groups_minus1,
> - __entry->p.num_ref_idx_l0_default_active_minus1,
> - __entry->p.num_ref_idx_l1_default_active_minus1,
> - __entry->p.weighted_bipred_idc,
> - __entry->p.pic_init_qp_minus26,
> - __entry->p.pic_init_qs_minus26,
> - __entry->p.chroma_qp_index_offset,
> - __entry->p.second_chroma_qp_index_offset,
> - __print_flags(__entry->p.flags, "|",
> - {V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE, "ENTROPY_CODING_MODE"},
> - {V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT, "BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT"},
> - {V4L2_H264_PPS_FLAG_WEIGHTED_PRED, "WEIGHTED_PRED"},
> - {V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT, "DEBLOCKING_FILTER_CONTROL_PRESENT"},
> - {V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED, "CONSTRAINED_INTRA_PRED"},
> - {V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT, "REDUNDANT_PIC_CNT_PRESENT"},
> - {V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE, "TRANSFORM_8X8_MODE"},
> - {V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT, "SCALING_MATRIX_PRESENT"}
> - ))
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_h264_scaling_matrix_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_scaling_matrix *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_scaling_matrix, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("\nscaling_list_4x4 {%s}\nscaling_list_8x8 {%s}",
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->s.scaling_list_4x4,
> - sizeof(__entry->s.scaling_list_4x4),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->s.scaling_list_8x8,
> - sizeof(__entry->s.scaling_list_8x8),
> - false)
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pred_weights_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_pred_weights *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pred_weights, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("\nluma_log2_weight_denom %u\n"
> - "chroma_log2_weight_denom %u\n"
> - "weight_factor[0].luma_weight %s\n"
> - "weight_factor[0].luma_offset %s\n"
> - "weight_factor[0].chroma_weight {%s}\n"
> - "weight_factor[0].chroma_offset {%s}\n"
> - "weight_factor[1].luma_weight %s\n"
> - "weight_factor[1].luma_offset %s\n"
> - "weight_factor[1].chroma_weight {%s}\n"
> - "weight_factor[1].chroma_offset {%s}\n",
> - __entry->p.luma_log2_weight_denom,
> - __entry->p.chroma_log2_weight_denom,
> - __print_array(__entry->p.weight_factors[0].luma_weight,
> - ARRAY_SIZE(__entry->p.weight_factors[0].luma_weight),
> - sizeof(__entry->p.weight_factors[0].luma_weight[0])),
> - __print_array(__entry->p.weight_factors[0].luma_offset,
> - ARRAY_SIZE(__entry->p.weight_factors[0].luma_offset),
> - sizeof(__entry->p.weight_factors[0].luma_offset[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.weight_factors[0].chroma_weight,
> - sizeof(__entry->p.weight_factors[0].chroma_weight),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.weight_factors[0].chroma_offset,
> - sizeof(__entry->p.weight_factors[0].chroma_offset),
> - false),
> - __print_array(__entry->p.weight_factors[1].luma_weight,
> - ARRAY_SIZE(__entry->p.weight_factors[1].luma_weight),
> - sizeof(__entry->p.weight_factors[1].luma_weight[0])),
> - __print_array(__entry->p.weight_factors[1].luma_offset,
> - ARRAY_SIZE(__entry->p.weight_factors[1].luma_offset),
> - sizeof(__entry->p.weight_factors[1].luma_offset[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.weight_factors[1].chroma_weight,
> - sizeof(__entry->p.weight_factors[1].chroma_weight),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.weight_factors[1].chroma_offset,
> - sizeof(__entry->p.weight_factors[1].chroma_offset),
> - false)
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_h264_slice_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_slice_params *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_slice_params, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("\nheader_bit_size %u\n"
> - "first_mb_in_slice %u\n"
> - "slice_type %s\n"
> - "colour_plane_id %u\n"
> - "redundant_pic_cnt %u\n"
> - "cabac_init_idc %u\n"
> - "slice_qp_delta %d\n"
> - "slice_qs_delta %d\n"
> - "disable_deblocking_filter_idc %u\n"
> - "slice_alpha_c0_offset_div2 %u\n"
> - "slice_beta_offset_div2 %u\n"
> - "num_ref_idx_l0_active_minus1 %u\n"
> - "num_ref_idx_l1_active_minus1 %u\n"
> - "flags %s",
> - __entry->s.header_bit_size,
> - __entry->s.first_mb_in_slice,
> - __print_symbolic(__entry->s.slice_type,
> - {V4L2_H264_SLICE_TYPE_P, "P"},
> - {V4L2_H264_SLICE_TYPE_B, "B"},
> - {V4L2_H264_SLICE_TYPE_I, "I"},
> - {V4L2_H264_SLICE_TYPE_SP, "SP"},
> - {V4L2_H264_SLICE_TYPE_SI, "SI"}),
> - __entry->s.colour_plane_id,
> - __entry->s.redundant_pic_cnt,
> - __entry->s.cabac_init_idc,
> - __entry->s.slice_qp_delta,
> - __entry->s.slice_qs_delta,
> - __entry->s.disable_deblocking_filter_idc,
> - __entry->s.slice_alpha_c0_offset_div2,
> - __entry->s.slice_beta_offset_div2,
> - __entry->s.num_ref_idx_l0_active_minus1,
> - __entry->s.num_ref_idx_l1_active_minus1,
> - __print_flags(__entry->s.flags, "|",
> - {V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED, "DIRECT_SPATIAL_MV_PRED"},
> - {V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH, "SP_FOR_SWITCH"})
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_h264_reference_tmpl,
> - TP_PROTO(const struct v4l2_h264_reference *r, int i),
> - TP_ARGS(r, i),
> - TP_STRUCT__entry(__field_struct(struct v4l2_h264_reference, r)
> - __field(int, i)),
> - TP_fast_assign(__entry->r = *r; __entry->i = i;),
> - TP_printk("[%d]: fields %s index %u",
> - __entry->i,
> - __print_flags(__entry->r.fields, "|",
> - {V4L2_H264_TOP_FIELD_REF, "TOP_FIELD_REF"},
> - {V4L2_H264_BOTTOM_FIELD_REF, "BOTTOM_FIELD_REF"},
> - {V4L2_H264_FRAME_REF, "FRAME_REF"}),
> - __entry->r.index
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_h264_decode_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_h264_decode_params *d),
> - TP_ARGS(d),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_decode_params, d)),
> - TP_fast_assign(__entry->d = *d),
> - TP_printk("\nnal_ref_idc %u\n"
> - "frame_num %u\n"
> - "top_field_order_cnt %d\n"
> - "bottom_field_order_cnt %d\n"
> - "idr_pic_id %u\n"
> - "pic_order_cnt_lsb %u\n"
> - "delta_pic_order_cnt_bottom %d\n"
> - "delta_pic_order_cnt0 %d\n"
> - "delta_pic_order_cnt1 %d\n"
> - "dec_ref_pic_marking_bit_size %u\n"
> - "pic_order_cnt_bit_size %u\n"
> - "slice_group_change_cycle %u\n"
> - "flags %s\n",
> - __entry->d.nal_ref_idc,
> - __entry->d.frame_num,
> - __entry->d.top_field_order_cnt,
> - __entry->d.bottom_field_order_cnt,
> - __entry->d.idr_pic_id,
> - __entry->d.pic_order_cnt_lsb,
> - __entry->d.delta_pic_order_cnt_bottom,
> - __entry->d.delta_pic_order_cnt0,
> - __entry->d.delta_pic_order_cnt1,
> - __entry->d.dec_ref_pic_marking_bit_size,
> - __entry->d.pic_order_cnt_bit_size,
> - __entry->d.slice_group_change_cycle,
> - __print_flags(__entry->d.flags, "|",
> - {V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC, "IDR_PIC"},
> - {V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC, "FIELD_PIC"},
> - {V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD, "BOTTOM_FIELD"},
> - {V4L2_H264_DECODE_PARAM_FLAG_PFRAME, "PFRAME"},
> - {V4L2_H264_DECODE_PARAM_FLAG_BFRAME, "BFRAME"})
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_h264_dpb_entry_tmpl,
> - TP_PROTO(const struct v4l2_h264_dpb_entry *e, int i),
> - TP_ARGS(e, i),
> - TP_STRUCT__entry(__field_struct(struct v4l2_h264_dpb_entry, e)
> - __field(int, i)),
> - TP_fast_assign(__entry->e = *e; __entry->i = i;),
> - TP_printk("[%d]: reference_ts %llu, pic_num %u frame_num %u fields %s "
> - "top_field_order_cnt %d bottom_field_order_cnt %d flags %s",
> - __entry->i,
> - __entry->e.reference_ts,
> - __entry->e.pic_num,
> - __entry->e.frame_num,
> - __print_flags(__entry->e.fields, "|",
> - {V4L2_H264_TOP_FIELD_REF, "TOP_FIELD_REF"},
> - {V4L2_H264_BOTTOM_FIELD_REF, "BOTTOM_FIELD_REF"},
> - {V4L2_H264_FRAME_REF, "FRAME_REF"}),
> - __entry->e.top_field_order_cnt,
> - __entry->e.bottom_field_order_cnt,
> - __print_flags(__entry->e.flags, "|",
> - {V4L2_H264_DPB_ENTRY_FLAG_VALID, "VALID"},
> - {V4L2_H264_DPB_ENTRY_FLAG_ACTIVE, "ACTIVE"},
> - {V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM, "LONG_TERM"},
> - {V4L2_H264_DPB_ENTRY_FLAG_FIELD, "FIELD"})
> -
> - )
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_h264_sps_tmpl, v4l2_ctrl_h264_sps,
> - TP_PROTO(const struct v4l2_ctrl_h264_sps *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_h264_pps_tmpl, v4l2_ctrl_h264_pps,
> - TP_PROTO(const struct v4l2_ctrl_h264_pps *p),
> - TP_ARGS(p)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_h264_scaling_matrix_tmpl, v4l2_ctrl_h264_scaling_matrix,
> - TP_PROTO(const struct v4l2_ctrl_h264_scaling_matrix *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_h264_pred_weights_tmpl, v4l2_ctrl_h264_pred_weights,
> - TP_PROTO(const struct v4l2_ctrl_h264_pred_weights *p),
> - TP_ARGS(p)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_h264_slice_params_tmpl, v4l2_ctrl_h264_slice_params,
> - TP_PROTO(const struct v4l2_ctrl_h264_slice_params *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_h264_reference_tmpl, v4l2_h264_ref_pic_list0,
> - TP_PROTO(const struct v4l2_h264_reference *r, int i),
> - TP_ARGS(r, i)
> -);
> -
> -DEFINE_EVENT(v4l2_h264_reference_tmpl, v4l2_h264_ref_pic_list1,
> - TP_PROTO(const struct v4l2_h264_reference *r, int i),
> - TP_ARGS(r, i)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_h264_decode_params_tmpl, v4l2_ctrl_h264_decode_params,
> - TP_PROTO(const struct v4l2_ctrl_h264_decode_params *d),
> - TP_ARGS(d)
> -);
> -
> -DEFINE_EVENT(v4l2_h264_dpb_entry_tmpl, v4l2_h264_dpb_entry,
> - TP_PROTO(const struct v4l2_h264_dpb_entry *e, int i),
> - TP_ARGS(e, i)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-h264
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/test-drivers/visl/visl-trace-hevc.h b/drivers/media/test-drivers/visl/visl-trace-hevc.h
> deleted file mode 100644
> index 963914c463db..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-hevc.h
> +++ /dev/null
> @@ -1,464 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0+ */
> -#include "linux/v4l2-controls.h"
> -#if !defined(_VISL_TRACE_HEVC_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_HEVC_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_hevc_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_sps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_sps *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_sps, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("\nvideo_parameter_set_id %u\n"
> - "seq_parameter_set_id %u\n"
> - "pic_width_in_luma_samples %u\n"
> - "pic_height_in_luma_samples %u\n"
> - "bit_depth_luma_minus8 %u\n"
> - "bit_depth_chroma_minus8 %u\n"
> - "log2_max_pic_order_cnt_lsb_minus4 %u\n"
> - "sps_max_dec_pic_buffering_minus1 %u\n"
> - "sps_max_num_reorder_pics %u\n"
> - "sps_max_latency_increase_plus1 %u\n"
> - "log2_min_luma_coding_block_size_minus3 %u\n"
> - "log2_diff_max_min_luma_coding_block_size %u\n"
> - "log2_min_luma_transform_block_size_minus2 %u\n"
> - "log2_diff_max_min_luma_transform_block_size %u\n"
> - "max_transform_hierarchy_depth_inter %u\n"
> - "max_transform_hierarchy_depth_intra %u\n"
> - "pcm_sample_bit_depth_luma_minus1 %u\n"
> - "pcm_sample_bit_depth_chroma_minus1 %u\n"
> - "log2_min_pcm_luma_coding_block_size_minus3 %u\n"
> - "log2_diff_max_min_pcm_luma_coding_block_size %u\n"
> - "num_short_term_ref_pic_sets %u\n"
> - "num_long_term_ref_pics_sps %u\n"
> - "chroma_format_idc %u\n"
> - "sps_max_sub_layers_minus1 %u\n"
> - "flags %s",
> - __entry->s.video_parameter_set_id,
> - __entry->s.seq_parameter_set_id,
> - __entry->s.pic_width_in_luma_samples,
> - __entry->s.pic_height_in_luma_samples,
> - __entry->s.bit_depth_luma_minus8,
> - __entry->s.bit_depth_chroma_minus8,
> - __entry->s.log2_max_pic_order_cnt_lsb_minus4,
> - __entry->s.sps_max_dec_pic_buffering_minus1,
> - __entry->s.sps_max_num_reorder_pics,
> - __entry->s.sps_max_latency_increase_plus1,
> - __entry->s.log2_min_luma_coding_block_size_minus3,
> - __entry->s.log2_diff_max_min_luma_coding_block_size,
> - __entry->s.log2_min_luma_transform_block_size_minus2,
> - __entry->s.log2_diff_max_min_luma_transform_block_size,
> - __entry->s.max_transform_hierarchy_depth_inter,
> - __entry->s.max_transform_hierarchy_depth_intra,
> - __entry->s.pcm_sample_bit_depth_luma_minus1,
> - __entry->s.pcm_sample_bit_depth_chroma_minus1,
> - __entry->s.log2_min_pcm_luma_coding_block_size_minus3,
> - __entry->s.log2_diff_max_min_pcm_luma_coding_block_size,
> - __entry->s.num_short_term_ref_pic_sets,
> - __entry->s.num_long_term_ref_pics_sps,
> - __entry->s.chroma_format_idc,
> - __entry->s.sps_max_sub_layers_minus1,
> - __print_flags(__entry->s.flags, "|",
> - {V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE, "SEPARATE_COLOUR_PLANE"},
> - {V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED, "SCALING_LIST_ENABLED"},
> - {V4L2_HEVC_SPS_FLAG_AMP_ENABLED, "AMP_ENABLED"},
> - {V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET, "SAMPLE_ADAPTIVE_OFFSET"},
> - {V4L2_HEVC_SPS_FLAG_PCM_ENABLED, "PCM_ENABLED"},
> - {V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED, "V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED"},
> - {V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT, "LONG_TERM_REF_PICS_PRESENT"},
> - {V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED, "TEMPORAL_MVP_ENABLED"},
> - {V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED, "STRONG_INTRA_SMOOTHING_ENABLED"}
> - ))
> -
> -);
> -
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_pps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_pps *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_pps, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("\npic_parameter_set_id %u\n"
> - "num_extra_slice_header_bits %u\n"
> - "num_ref_idx_l0_default_active_minus1 %u\n"
> - "num_ref_idx_l1_default_active_minus1 %u\n"
> - "init_qp_minus26 %d\n"
> - "diff_cu_qp_delta_depth %u\n"
> - "pps_cb_qp_offset %d\n"
> - "pps_cr_qp_offset %d\n"
> - "num_tile_columns_minus1 %d\n"
> - "num_tile_rows_minus1 %d\n"
> - "column_width_minus1 %s\n"
> - "row_height_minus1 %s\n"
> - "pps_beta_offset_div2 %d\n"
> - "pps_tc_offset_div2 %d\n"
> - "log2_parallel_merge_level_minus2 %u\n"
> - "flags %s",
> - __entry->p.pic_parameter_set_id,
> - __entry->p.num_extra_slice_header_bits,
> - __entry->p.num_ref_idx_l0_default_active_minus1,
> - __entry->p.num_ref_idx_l1_default_active_minus1,
> - __entry->p.init_qp_minus26,
> - __entry->p.diff_cu_qp_delta_depth,
> - __entry->p.pps_cb_qp_offset,
> - __entry->p.pps_cr_qp_offset,
> - __entry->p.num_tile_columns_minus1,
> - __entry->p.num_tile_rows_minus1,
> - __print_array(__entry->p.column_width_minus1,
> - ARRAY_SIZE(__entry->p.column_width_minus1),
> - sizeof(__entry->p.column_width_minus1[0])),
> - __print_array(__entry->p.row_height_minus1,
> - ARRAY_SIZE(__entry->p.row_height_minus1),
> - sizeof(__entry->p.row_height_minus1[0])),
> - __entry->p.pps_beta_offset_div2,
> - __entry->p.pps_tc_offset_div2,
> - __entry->p.log2_parallel_merge_level_minus2,
> - __print_flags(__entry->p.flags, "|",
> - {V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED, "DEPENDENT_SLICE_SEGMENT_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT, "OUTPUT_FLAG_PRESENT"},
> - {V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED, "SIGN_DATA_HIDING_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT, "CABAC_INIT_PRESENT"},
> - {V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED, "CONSTRAINED_INTRA_PRED"},
> - {V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED, "CU_QP_DELTA_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT, "PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT"},
> - {V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED, "WEIGHTED_PRED"},
> - {V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED, "WEIGHTED_BIPRED"},
> - {V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED, "TRANSQUANT_BYPASS_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_TILES_ENABLED, "TILES_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED, "ENTROPY_CODING_SYNC_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED, "LOOP_FILTER_ACROSS_TILES_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED, "PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED, "DEBLOCKING_FILTER_OVERRIDE_ENABLED"},
> - {V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER, "DISABLE_DEBLOCKING_FILTER"},
> - {V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT, "LISTS_MODIFICATION_PRESENT"},
> - {V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT, "SLICE_SEGMENT_HEADER_EXTENSION_PRESENT"},
> - {V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT, "DEBLOCKING_FILTER_CONTROL_PRESENT"},
> - {V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING, "UNIFORM_SPACING"}
> - ))
> -
> -);
> -
> -
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_slice_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_slice_params *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_slice_params, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("\nbit_size %u\n"
> - "data_byte_offset %u\n"
> - "num_entry_point_offsets %u\n"
> - "nal_unit_type %u\n"
> - "nuh_temporal_id_plus1 %u\n"
> - "slice_type %u\n"
> - "colour_plane_id %u\n"
> - "slice_pic_order_cnt %d\n"
> - "num_ref_idx_l0_active_minus1 %u\n"
> - "num_ref_idx_l1_active_minus1 %u\n"
> - "collocated_ref_idx %u\n"
> - "five_minus_max_num_merge_cand %u\n"
> - "slice_qp_delta %d\n"
> - "slice_cb_qp_offset %d\n"
> - "slice_cr_qp_offset %d\n"
> - "slice_act_y_qp_offset %d\n"
> - "slice_act_cb_qp_offset %d\n"
> - "slice_act_cr_qp_offset %d\n"
> - "slice_beta_offset_div2 %d\n"
> - "slice_tc_offset_div2 %d\n"
> - "pic_struct %u\n"
> - "slice_segment_addr %u\n"
> - "ref_idx_l0 %s\n"
> - "ref_idx_l1 %s\n"
> - "short_term_ref_pic_set_size %u\n"
> - "long_term_ref_pic_set_size %u\n"
> - "flags %s",
> - __entry->s.bit_size,
> - __entry->s.data_byte_offset,
> - __entry->s.num_entry_point_offsets,
> - __entry->s.nal_unit_type,
> - __entry->s.nuh_temporal_id_plus1,
> - __entry->s.slice_type,
> - __entry->s.colour_plane_id,
> - __entry->s.slice_pic_order_cnt,
> - __entry->s.num_ref_idx_l0_active_minus1,
> - __entry->s.num_ref_idx_l1_active_minus1,
> - __entry->s.collocated_ref_idx,
> - __entry->s.five_minus_max_num_merge_cand,
> - __entry->s.slice_qp_delta,
> - __entry->s.slice_cb_qp_offset,
> - __entry->s.slice_cr_qp_offset,
> - __entry->s.slice_act_y_qp_offset,
> - __entry->s.slice_act_cb_qp_offset,
> - __entry->s.slice_act_cr_qp_offset,
> - __entry->s.slice_beta_offset_div2,
> - __entry->s.slice_tc_offset_div2,
> - __entry->s.pic_struct,
> - __entry->s.slice_segment_addr,
> - __print_array(__entry->s.ref_idx_l0,
> - ARRAY_SIZE(__entry->s.ref_idx_l0),
> - sizeof(__entry->s.ref_idx_l0[0])),
> - __print_array(__entry->s.ref_idx_l1,
> - ARRAY_SIZE(__entry->s.ref_idx_l1),
> - sizeof(__entry->s.ref_idx_l1[0])),
> - __entry->s.short_term_ref_pic_set_size,
> - __entry->s.long_term_ref_pic_set_size,
> - __print_flags(__entry->s.flags, "|",
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA, "SLICE_SAO_LUMA"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA, "SLICE_SAO_CHROMA"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED, "SLICE_TEMPORAL_MVP_ENABLED"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO, "MVD_L1_ZERO"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT, "CABAC_INIT"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0, "COLLOCATED_FROM_L0"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV, "USE_INTEGER_MV"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED, "SLICE_DEBLOCKING_FILTER_DISABLED"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED, "SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED"},
> - {V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT, "DEPENDENT_SLICE_SEGMENT"}
> -
> - ))
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_hevc_pred_weight_table_tmpl,
> - TP_PROTO(const struct v4l2_hevc_pred_weight_table *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_hevc_pred_weight_table, p)),
> - TP_fast_assign(__entry->p = *p),
> - TP_printk("\ndelta_luma_weight_l0 %s\n"
> - "luma_offset_l0 %s\n"
> - "delta_chroma_weight_l0 {%s}\n"
> - "chroma_offset_l0 {%s}\n"
> - "delta_luma_weight_l1 %s\n"
> - "luma_offset_l1 %s\n"
> - "delta_chroma_weight_l1 {%s}\n"
> - "chroma_offset_l1 {%s}\n"
> - "luma_log2_weight_denom %d\n"
> - "delta_chroma_log2_weight_denom %d\n",
> - __print_array(__entry->p.delta_luma_weight_l0,
> - ARRAY_SIZE(__entry->p.delta_luma_weight_l0),
> - sizeof(__entry->p.delta_luma_weight_l0[0])),
> - __print_array(__entry->p.luma_offset_l0,
> - ARRAY_SIZE(__entry->p.luma_offset_l0),
> - sizeof(__entry->p.luma_offset_l0[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.delta_chroma_weight_l0,
> - sizeof(__entry->p.delta_chroma_weight_l0),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.chroma_offset_l0,
> - sizeof(__entry->p.chroma_offset_l0),
> - false),
> - __print_array(__entry->p.delta_luma_weight_l1,
> - ARRAY_SIZE(__entry->p.delta_luma_weight_l1),
> - sizeof(__entry->p.delta_luma_weight_l1[0])),
> - __print_array(__entry->p.luma_offset_l1,
> - ARRAY_SIZE(__entry->p.luma_offset_l1),
> - sizeof(__entry->p.luma_offset_l1[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.delta_chroma_weight_l1,
> - sizeof(__entry->p.delta_chroma_weight_l1),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.chroma_offset_l1,
> - sizeof(__entry->p.chroma_offset_l1),
> - false),
> - __entry->p.luma_log2_weight_denom,
> - __entry->p.delta_chroma_log2_weight_denom
> -
> - ))
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_scaling_matrix_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_scaling_matrix *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_scaling_matrix, s)),
> - TP_fast_assign(__entry->s = *s),
> - TP_printk("\nscaling_list_4x4 {%s}\n"
> - "scaling_list_8x8 {%s}\n"
> - "scaling_list_16x16 {%s}\n"
> - "scaling_list_32x32 {%s}\n"
> - "scaling_list_dc_coef_16x16 %s\n"
> - "scaling_list_dc_coef_32x32 %s\n",
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->s.scaling_list_4x4,
> - sizeof(__entry->s.scaling_list_4x4),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->s.scaling_list_8x8,
> - sizeof(__entry->s.scaling_list_8x8),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->s.scaling_list_16x16,
> - sizeof(__entry->s.scaling_list_16x16),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->s.scaling_list_32x32,
> - sizeof(__entry->s.scaling_list_32x32),
> - false),
> - __print_array(__entry->s.scaling_list_dc_coef_16x16,
> - ARRAY_SIZE(__entry->s.scaling_list_dc_coef_16x16),
> - sizeof(__entry->s.scaling_list_dc_coef_16x16[0])),
> - __print_array(__entry->s.scaling_list_dc_coef_32x32,
> - ARRAY_SIZE(__entry->s.scaling_list_dc_coef_32x32),
> - sizeof(__entry->s.scaling_list_dc_coef_32x32[0]))
> - ))
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_decode_params_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_decode_params *d),
> - TP_ARGS(d),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_decode_params, d)),
> - TP_fast_assign(__entry->d = *d),
> - TP_printk("\npic_order_cnt_val %d\n"
> - "short_term_ref_pic_set_size %u\n"
> - "long_term_ref_pic_set_size %u\n"
> - "num_active_dpb_entries %u\n"
> - "num_poc_st_curr_before %u\n"
> - "num_poc_st_curr_after %u\n"
> - "num_poc_lt_curr %u\n"
> - "poc_st_curr_before %s\n"
> - "poc_st_curr_after %s\n"
> - "poc_lt_curr %s\n"
> - "flags %s",
> - __entry->d.pic_order_cnt_val,
> - __entry->d.short_term_ref_pic_set_size,
> - __entry->d.long_term_ref_pic_set_size,
> - __entry->d.num_active_dpb_entries,
> - __entry->d.num_poc_st_curr_before,
> - __entry->d.num_poc_st_curr_after,
> - __entry->d.num_poc_lt_curr,
> - __print_array(__entry->d.poc_st_curr_before,
> - ARRAY_SIZE(__entry->d.poc_st_curr_before),
> - sizeof(__entry->d.poc_st_curr_before[0])),
> - __print_array(__entry->d.poc_st_curr_after,
> - ARRAY_SIZE(__entry->d.poc_st_curr_after),
> - sizeof(__entry->d.poc_st_curr_after[0])),
> - __print_array(__entry->d.poc_lt_curr,
> - ARRAY_SIZE(__entry->d.poc_lt_curr),
> - sizeof(__entry->d.poc_lt_curr[0])),
> - __print_flags(__entry->d.flags, "|",
> - {V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC, "IRAP_PIC"},
> - {V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC, "IDR_PIC"},
> - {V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR, "NO_OUTPUT_OF_PRIOR"}
> - ))
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> - TP_ARGS(lt),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_lt_rps, lt)),
> - TP_fast_assign(__entry->lt = *lt),
> - TP_printk("\nflags %s\n"
> - "lt_ref_pic_poc_lsb_sps %x\n",
> - __print_flags(__entry->lt.flags, "|",
> - {V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT, "USED_LT"}
> - ),
> - __entry->lt.lt_ref_pic_poc_lsb_sps
> - )
> -)
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> - TP_ARGS(st),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_st_rps, st)),
> - TP_fast_assign(__entry->st = *st),
> - TP_printk("\nflags %s\n"
> - "delta_idx_minus1: %u\n"
> - "delta_rps_sign: %u\n"
> - "abs_delta_rps_minus1: %u\n"
> - "num_negative_pics: %u\n"
> - "num_positive_pics: %u\n"
> - "used_by_curr_pic: %08x\n"
> - "use_delta_flag: %08x\n"
> - "delta_poc_s0_minus1: %s\n"
> - "delta_poc_s1_minus1: %s\n",
> - __print_flags(__entry->st.flags, "|",
> - {V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED, "INTER_REF_PIC_SET_PRED"}
> - ),
> - __entry->st.delta_idx_minus1,
> - __entry->st.delta_rps_sign,
> - __entry->st.abs_delta_rps_minus1,
> - __entry->st.num_negative_pics,
> - __entry->st.num_positive_pics,
> - __entry->st.used_by_curr_pic,
> - __entry->st.use_delta_flag,
> - __print_array(__entry->st.delta_poc_s0_minus1,
> - ARRAY_SIZE(__entry->st.delta_poc_s0_minus1),
> - sizeof(__entry->st.delta_poc_s0_minus1[0])),
> - __print_array(__entry->st.delta_poc_s1_minus1,
> - ARRAY_SIZE(__entry->st.delta_poc_s1_minus1),
> - sizeof(__entry->st.delta_poc_s1_minus1[0]))
> - )
> -)
> -
> -
> -DECLARE_EVENT_CLASS(v4l2_hevc_dpb_entry_tmpl,
> - TP_PROTO(const struct v4l2_hevc_dpb_entry *e),
> - TP_ARGS(e),
> - TP_STRUCT__entry(__field_struct(struct v4l2_hevc_dpb_entry, e)),
> - TP_fast_assign(__entry->e = *e),
> - TP_printk("\ntimestamp %llu\n"
> - "flags %s\n"
> - "field_pic %u\n"
> - "pic_order_cnt_val %d\n",
> - __entry->e.timestamp,
> - __print_flags(__entry->e.flags, "|",
> - {V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE, "LONG_TERM_REFERENCE"}
> - ),
> - __entry->e.field_pic,
> - __entry->e.pic_order_cnt_val
> - ))
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_sps_tmpl, v4l2_ctrl_hevc_sps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_sps *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_pps_tmpl, v4l2_ctrl_hevc_pps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_pps *p),
> - TP_ARGS(p)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_slice_params_tmpl, v4l2_ctrl_hevc_slice_params,
> - TP_PROTO(const struct v4l2_ctrl_hevc_slice_params *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_hevc_pred_weight_table_tmpl, v4l2_hevc_pred_weight_table,
> - TP_PROTO(const struct v4l2_hevc_pred_weight_table *p),
> - TP_ARGS(p)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_scaling_matrix_tmpl, v4l2_ctrl_hevc_scaling_matrix,
> - TP_PROTO(const struct v4l2_ctrl_hevc_scaling_matrix *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_decode_params_tmpl, v4l2_ctrl_hevc_decode_params,
> - TP_PROTO(const struct v4l2_ctrl_hevc_decode_params *d),
> - TP_ARGS(d)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl, v4l2_ctrl_hevc_ext_sps_lt_rps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> - TP_ARGS(lt)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl, v4l2_ctrl_hevc_ext_sps_st_rps,
> - TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> - TP_ARGS(st)
> -);
> -
> -DEFINE_EVENT(v4l2_hevc_dpb_entry_tmpl, v4l2_hevc_dpb_entry,
> - TP_PROTO(const struct v4l2_hevc_dpb_entry *e),
> - TP_ARGS(e)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-hevc
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/test-drivers/visl/visl-trace-mpeg2.h b/drivers/media/test-drivers/visl/visl-trace-mpeg2.h
> deleted file mode 100644
> index ba6c65481194..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-mpeg2.h
> +++ /dev/null
> @@ -1,99 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#if !defined(_VISL_TRACE_MPEG2_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_MPEG2_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_mpeg2_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_seq_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s),
> - TP_ARGS(s),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_sequence, s)),
> - TP_fast_assign(__entry->s = *s;),
> - TP_printk("\nhorizontal_size %u\nvertical_size %u\nvbv_buffer_size %u\n"
> - "profile_and_level_indication %u\nchroma_format %u\nflags %s\n",
> - __entry->s.horizontal_size,
> - __entry->s.vertical_size,
> - __entry->s.vbv_buffer_size,
> - __entry->s.profile_and_level_indication,
> - __entry->s.chroma_format,
> - __print_flags(__entry->s.flags, "|",
> - {V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE, "PROGRESSIVE"})
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_pic_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_picture, p)),
> - TP_fast_assign(__entry->p = *p;),
> - TP_printk("\nbackward_ref_ts %llu\nforward_ref_ts %llu\nflags %s\nf_code {%s}\n"
> - "picture_coding_type: %u\npicture_structure %u\nintra_dc_precision %u\n",
> - __entry->p.backward_ref_ts,
> - __entry->p.forward_ref_ts,
> - __print_flags(__entry->p.flags, "|",
> - {V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST, "TOP_FIELD_FIRST"},
> - {V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT, "FRAME_PRED_DCT"},
> - {V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV, "CONCEALMENT_MV"},
> - {V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE, "Q_SCALE_TYPE"},
> - {V4L2_MPEG2_PIC_FLAG_INTRA_VLC, "INTA_VLC"},
> - {V4L2_MPEG2_PIC_FLAG_ALT_SCAN, "ALT_SCAN"},
> - {V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST, "REPEAT_FIRST"},
> - {V4L2_MPEG2_PIC_FLAG_PROGRESSIVE, "PROGRESSIVE"}),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.f_code,
> - sizeof(__entry->p.f_code),
> - false),
> - __entry->p.picture_coding_type,
> - __entry->p.picture_structure,
> - __entry->p.intra_dc_precision
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_quant_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q),
> - TP_ARGS(q),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_quantisation, q)),
> - TP_fast_assign(__entry->q = *q;),
> - TP_printk("\nintra_quantiser_matrix %s\nnon_intra_quantiser_matrix %s\n"
> - "chroma_intra_quantiser_matrix %s\nchroma_non_intra_quantiser_matrix %s\n",
> - __print_array(__entry->q.intra_quantiser_matrix,
> - ARRAY_SIZE(__entry->q.intra_quantiser_matrix),
> - sizeof(__entry->q.intra_quantiser_matrix[0])),
> - __print_array(__entry->q.non_intra_quantiser_matrix,
> - ARRAY_SIZE(__entry->q.non_intra_quantiser_matrix),
> - sizeof(__entry->q.non_intra_quantiser_matrix[0])),
> - __print_array(__entry->q.chroma_intra_quantiser_matrix,
> - ARRAY_SIZE(__entry->q.chroma_intra_quantiser_matrix),
> - sizeof(__entry->q.chroma_intra_quantiser_matrix[0])),
> - __print_array(__entry->q.chroma_non_intra_quantiser_matrix,
> - ARRAY_SIZE(__entry->q.chroma_non_intra_quantiser_matrix),
> - sizeof(__entry->q.chroma_non_intra_quantiser_matrix[0]))
> - )
> -)
> -
> -DEFINE_EVENT(v4l2_ctrl_mpeg2_seq_tmpl, v4l2_ctrl_mpeg2_sequence,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s),
> - TP_ARGS(s)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_mpeg2_pic_tmpl, v4l2_ctrl_mpeg2_picture,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p),
> - TP_ARGS(p)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_mpeg2_quant_tmpl, v4l2_ctrl_mpeg2_quantisation,
> - TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q),
> - TP_ARGS(q)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-mpeg2
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/test-drivers/visl/visl-trace-points.c b/drivers/media/test-drivers/visl/visl-trace-points.c
> deleted file mode 100644
> index 321ff732c682..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-points.c
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -#include "visl.h"
> -
> -#define CREATE_TRACE_POINTS
> -#include "visl-trace-fwht.h"
> -#include "visl-trace-mpeg2.h"
> -#include "visl-trace-vp8.h"
> -#include "visl-trace-vp9.h"
> -#include "visl-trace-h264.h"
> -#include "visl-trace-hevc.h"
> -#include "visl-trace-av1.h"
> diff --git a/drivers/media/test-drivers/visl/visl-trace-vp8.h b/drivers/media/test-drivers/visl/visl-trace-vp8.h
> deleted file mode 100644
> index dabe17d69ddc..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-vp8.h
> +++ /dev/null
> @@ -1,156 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#if !defined(_VISL_TRACE_VP8_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_VP8_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_vp8_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_entropy_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nentropy.coeff_probs {%s}\n"
> - "entropy.y_mode_probs %s\n"
> - "entropy.uv_mode_probs %s\n"
> - "entropy.mv_probs {%s}",
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->f.entropy.coeff_probs,
> - sizeof(__entry->f.entropy.coeff_probs),
> - false),
> - __print_array(__entry->f.entropy.y_mode_probs,
> - ARRAY_SIZE(__entry->f.entropy.y_mode_probs),
> - sizeof(__entry->f.entropy.y_mode_probs[0])),
> - __print_array(__entry->f.entropy.uv_mode_probs,
> - ARRAY_SIZE(__entry->f.entropy.uv_mode_probs),
> - sizeof(__entry->f.entropy.uv_mode_probs[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->f.entropy.mv_probs,
> - sizeof(__entry->f.entropy.mv_probs),
> - false)
> - )
> -)
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nsegment.quant_update %s\n"
> - "segment.lf_update %s\n"
> - "segment.segment_probs %s\n"
> - "segment.flags %s\n"
> - "lf.ref_frm_delta %s\n"
> - "lf.mb_mode_delta %s\n"
> - "lf.sharpness_level %u\n"
> - "lf.level %u\n"
> - "lf.flags %s\n"
> - "quant.y_ac_qi %u\n"
> - "quant.y_dc_delta %d\n"
> - "quant.y2_dc_delta %d\n"
> - "quant.y2_ac_delta %d\n"
> - "quant.uv_dc_delta %d\n"
> - "quant.uv_ac_delta %d\n"
> - "coder_state.range %u\n"
> - "coder_state.value %u\n"
> - "coder_state.bit_count %u\n"
> - "width %u\n"
> - "height %u\n"
> - "horizontal_scale %u\n"
> - "vertical_scale %u\n"
> - "version %u\n"
> - "prob_skip_false %u\n"
> - "prob_intra %u\n"
> - "prob_last %u\n"
> - "prob_gf %u\n"
> - "num_dct_parts %u\n"
> - "first_part_size %u\n"
> - "first_part_header_bits %u\n"
> - "dct_part_sizes %s\n"
> - "last_frame_ts %llu\n"
> - "golden_frame_ts %llu\n"
> - "alt_frame_ts %llu\n"
> - "flags %s",
> - __print_array(__entry->f.segment.quant_update,
> - ARRAY_SIZE(__entry->f.segment.quant_update),
> - sizeof(__entry->f.segment.quant_update[0])),
> - __print_array(__entry->f.segment.lf_update,
> - ARRAY_SIZE(__entry->f.segment.lf_update),
> - sizeof(__entry->f.segment.lf_update[0])),
> - __print_array(__entry->f.segment.segment_probs,
> - ARRAY_SIZE(__entry->f.segment.segment_probs),
> - sizeof(__entry->f.segment.segment_probs[0])),
> - __print_flags(__entry->f.segment.flags, "|",
> - {V4L2_VP8_SEGMENT_FLAG_ENABLED, "SEGMENT_ENABLED"},
> - {V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP, "SEGMENT_UPDATE_MAP"},
> - {V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA, "SEGMENT_UPDATE_FEATURE_DATA"},
> - {V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE, "SEGMENT_DELTA_VALUE_MODE"}),
> - __print_array(__entry->f.lf.ref_frm_delta,
> - ARRAY_SIZE(__entry->f.lf.ref_frm_delta),
> - sizeof(__entry->f.lf.ref_frm_delta[0])),
> - __print_array(__entry->f.lf.mb_mode_delta,
> - ARRAY_SIZE(__entry->f.lf.mb_mode_delta),
> - sizeof(__entry->f.lf.mb_mode_delta[0])),
> - __entry->f.lf.sharpness_level,
> - __entry->f.lf.level,
> - __print_flags(__entry->f.lf.flags, "|",
> - {V4L2_VP8_LF_ADJ_ENABLE, "LF_ADJ_ENABLED"},
> - {V4L2_VP8_LF_DELTA_UPDATE, "LF_DELTA_UPDATE"},
> - {V4L2_VP8_LF_FILTER_TYPE_SIMPLE, "LF_FILTER_TYPE_SIMPLE"}),
> - __entry->f.quant.y_ac_qi,
> - __entry->f.quant.y_dc_delta,
> - __entry->f.quant.y2_dc_delta,
> - __entry->f.quant.y2_ac_delta,
> - __entry->f.quant.uv_dc_delta,
> - __entry->f.quant.uv_ac_delta,
> - __entry->f.coder_state.range,
> - __entry->f.coder_state.value,
> - __entry->f.coder_state.bit_count,
> - __entry->f.width,
> - __entry->f.height,
> - __entry->f.horizontal_scale,
> - __entry->f.vertical_scale,
> - __entry->f.version,
> - __entry->f.prob_skip_false,
> - __entry->f.prob_intra,
> - __entry->f.prob_last,
> - __entry->f.prob_gf,
> - __entry->f.num_dct_parts,
> - __entry->f.first_part_size,
> - __entry->f.first_part_header_bits,
> - __print_array(__entry->f.dct_part_sizes,
> - ARRAY_SIZE(__entry->f.dct_part_sizes),
> - sizeof(__entry->f.dct_part_sizes[0])),
> - __entry->f.last_frame_ts,
> - __entry->f.golden_frame_ts,
> - __entry->f.alt_frame_ts,
> - __print_flags(__entry->f.flags, "|",
> - {V4L2_VP8_FRAME_FLAG_KEY_FRAME, "KEY_FRAME"},
> - {V4L2_VP8_FRAME_FLAG_EXPERIMENTAL, "EXPERIMENTAL"},
> - {V4L2_VP8_FRAME_FLAG_SHOW_FRAME, "SHOW_FRAME"},
> - {V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF, "MB_NO_SKIP_COEFF"},
> - {V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN, "SIGN_BIAS_GOLDEN"},
> - {V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT, "SIGN_BIAS_ALT"})
> - )
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_vp8_frame_tmpl, v4l2_ctrl_vp8_frame,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_vp8_entropy_tmpl, v4l2_ctrl_vp8_entropy,
> - TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> - TP_ARGS(f)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-vp8
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/test-drivers/visl/visl-trace-vp9.h b/drivers/media/test-drivers/visl/visl-trace-vp9.h
> deleted file mode 100644
> index 362b92b07f93..000000000000
> --- a/drivers/media/test-drivers/visl/visl-trace-vp9.h
> +++ /dev/null
> @@ -1,292 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#if !defined(_VISL_TRACE_VP9_H_) || defined(TRACE_HEADER_MULTI_READ)
> -#define _VISL_TRACE_VP9_H_
> -
> -#include <linux/tracepoint.h>
> -#include "visl.h"
> -
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM visl_vp9_controls
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp9_frame *f),
> - TP_ARGS(f),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_frame, f)),
> - TP_fast_assign(__entry->f = *f;),
> - TP_printk("\nlf.ref_deltas %s\n"
> - "lf.mode_deltas %s\n"
> - "lf.level %u\n"
> - "lf.sharpness %u\n"
> - "lf.flags %s\n"
> - "quant.base_q_idx %u\n"
> - "quant.delta_q_y_dc %d\n"
> - "quant.delta_q_uv_dc %d\n"
> - "quant.delta_q_uv_ac %d\n"
> - "seg.feature_data {%s}\n"
> - "seg.feature_enabled %s\n"
> - "seg.tree_probs %s\n"
> - "seg.pred_probs %s\n"
> - "seg.flags %s\n"
> - "flags %s\n"
> - "compressed_header_size %u\n"
> - "uncompressed_header_size %u\n"
> - "frame_width_minus_1 %u\n"
> - "frame_height_minus_1 %u\n"
> - "render_width_minus_1 %u\n"
> - "render_height_minus_1 %u\n"
> - "last_frame_ts %llu\n"
> - "golden_frame_ts %llu\n"
> - "alt_frame_ts %llu\n"
> - "ref_frame_sign_bias %s\n"
> - "reset_frame_context %s\n"
> - "frame_context_idx %u\n"
> - "profile %u\n"
> - "bit_depth %u\n"
> - "interpolation_filter %s\n"
> - "tile_cols_log2 %u\n"
> - "tile_rows_log_2 %u\n"
> - "reference_mode %s\n",
> - __print_array(__entry->f.lf.ref_deltas,
> - ARRAY_SIZE(__entry->f.lf.ref_deltas),
> - sizeof(__entry->f.lf.ref_deltas[0])),
> - __print_array(__entry->f.lf.mode_deltas,
> - ARRAY_SIZE(__entry->f.lf.mode_deltas),
> - sizeof(__entry->f.lf.mode_deltas[0])),
> - __entry->f.lf.level,
> - __entry->f.lf.sharpness,
> - __print_flags(__entry->f.lf.flags, "|",
> - {V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED, "DELTA_ENABLED"},
> - {V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE, "DELTA_UPDATE"}),
> - __entry->f.quant.base_q_idx,
> - __entry->f.quant.delta_q_y_dc,
> - __entry->f.quant.delta_q_uv_dc,
> - __entry->f.quant.delta_q_uv_ac,
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->f.seg.feature_data,
> - sizeof(__entry->f.seg.feature_data),
> - false),
> - __print_array(__entry->f.seg.feature_enabled,
> - ARRAY_SIZE(__entry->f.seg.feature_enabled),
> - sizeof(__entry->f.seg.feature_enabled[0])),
> - __print_array(__entry->f.seg.tree_probs,
> - ARRAY_SIZE(__entry->f.seg.tree_probs),
> - sizeof(__entry->f.seg.tree_probs[0])),
> - __print_array(__entry->f.seg.pred_probs,
> - ARRAY_SIZE(__entry->f.seg.pred_probs),
> - sizeof(__entry->f.seg.pred_probs[0])),
> - __print_flags(__entry->f.seg.flags, "|",
> - {V4L2_VP9_SEGMENTATION_FLAG_ENABLED, "ENABLED"},
> - {V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP, "UPDATE_MAP"},
> - {V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE, "TEMPORAL_UPDATE"},
> - {V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA, "UPDATE_DATA"},
> - {V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE, "ABS_OR_DELTA_UPDATE"}),
> - __print_flags(__entry->f.flags, "|",
> - {V4L2_VP9_FRAME_FLAG_KEY_FRAME, "KEY_FRAME"},
> - {V4L2_VP9_FRAME_FLAG_SHOW_FRAME, "SHOW_FRAME"},
> - {V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT, "ERROR_RESILIENT"},
> - {V4L2_VP9_FRAME_FLAG_INTRA_ONLY, "INTRA_ONLY"},
> - {V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV, "ALLOW_HIGH_PREC_MV"},
> - {V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX, "REFRESH_FRAME_CTX"},
> - {V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE, "PARALLEL_DEC_MODE"},
> - {V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING, "X_SUBSAMPLING"},
> - {V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING, "Y_SUBSAMPLING"},
> - {V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING, "COLOR_RANGE_FULL_SWING"}),
> - __entry->f.compressed_header_size,
> - __entry->f.uncompressed_header_size,
> - __entry->f.frame_width_minus_1,
> - __entry->f.frame_height_minus_1,
> - __entry->f.render_width_minus_1,
> - __entry->f.render_height_minus_1,
> - __entry->f.last_frame_ts,
> - __entry->f.golden_frame_ts,
> - __entry->f.alt_frame_ts,
> - __print_symbolic(__entry->f.ref_frame_sign_bias,
> - {V4L2_VP9_SIGN_BIAS_LAST, "SIGN_BIAS_LAST"},
> - {V4L2_VP9_SIGN_BIAS_GOLDEN, "SIGN_BIAS_GOLDEN"},
> - {V4L2_VP9_SIGN_BIAS_ALT, "SIGN_BIAS_ALT"}),
> - __print_symbolic(__entry->f.reset_frame_context,
> - {V4L2_VP9_RESET_FRAME_CTX_NONE, "RESET_FRAME_CTX_NONE"},
> - {V4L2_VP9_RESET_FRAME_CTX_SPEC, "RESET_FRAME_CTX_SPEC"},
> - {V4L2_VP9_RESET_FRAME_CTX_ALL, "RESET_FRAME_CTX_ALL"}),
> - __entry->f.frame_context_idx,
> - __entry->f.profile,
> - __entry->f.bit_depth,
> - __print_symbolic(__entry->f.interpolation_filter,
> - {V4L2_VP9_INTERP_FILTER_EIGHTTAP, "INTERP_FILTER_EIGHTTAP"},
> - {V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH, "INTERP_FILTER_EIGHTTAP_SMOOTH"},
> - {V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP, "INTERP_FILTER_EIGHTTAP_SHARP"},
> - {V4L2_VP9_INTERP_FILTER_BILINEAR, "INTERP_FILTER_BILINEAR"},
> - {V4L2_VP9_INTERP_FILTER_SWITCHABLE, "INTERP_FILTER_SWITCHABLE"}),
> - __entry->f.tile_cols_log2,
> - __entry->f.tile_rows_log2,
> - __print_symbolic(__entry->f.reference_mode,
> - {V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE, "REFERENCE_MODE_SINGLE_REFERENCE"},
> - {V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE, "REFERENCE_MODE_COMPOUND_REFERENCE"},
> - {V4L2_VP9_REFERENCE_MODE_SELECT, "REFERENCE_MODE_SELECT"}))
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> - TP_fast_assign(__entry->h = *h;),
> - TP_printk("\ntx_mode %s\n"
> - "tx8 {%s}\n"
> - "tx16 {%s}\n"
> - "tx32 {%s}\n"
> - "skip %s\n"
> - "inter_mode {%s}\n"
> - "interp_filter {%s}\n"
> - "is_inter %s\n"
> - "comp_mode %s\n"
> - "single_ref {%s}\n"
> - "comp_ref %s\n"
> - "y_mode {%s}\n"
> - "uv_mode {%s}\n"
> - "partition {%s}\n",
> - __print_symbolic(__entry->h.tx_mode,
> - {V4L2_VP9_TX_MODE_ONLY_4X4, "TX_MODE_ONLY_4X4"},
> - {V4L2_VP9_TX_MODE_ALLOW_8X8, "TX_MODE_ALLOW_8X8"},
> - {V4L2_VP9_TX_MODE_ALLOW_16X16, "TX_MODE_ALLOW_16X16"},
> - {V4L2_VP9_TX_MODE_ALLOW_32X32, "TX_MODE_ALLOW_32X32"},
> - {V4L2_VP9_TX_MODE_SELECT, "TX_MODE_SELECT"}),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.tx8,
> - sizeof(__entry->h.tx8),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.tx16,
> - sizeof(__entry->h.tx16),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.tx32,
> - sizeof(__entry->h.tx32),
> - false),
> - __print_array(__entry->h.skip,
> - ARRAY_SIZE(__entry->h.skip),
> - sizeof(__entry->h.skip[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.inter_mode,
> - sizeof(__entry->h.inter_mode),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.interp_filter,
> - sizeof(__entry->h.interp_filter),
> - false),
> - __print_array(__entry->h.is_inter,
> - ARRAY_SIZE(__entry->h.is_inter),
> - sizeof(__entry->h.is_inter[0])),
> - __print_array(__entry->h.comp_mode,
> - ARRAY_SIZE(__entry->h.comp_mode),
> - sizeof(__entry->h.comp_mode[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.single_ref,
> - sizeof(__entry->h.single_ref),
> - false),
> - __print_array(__entry->h.comp_ref,
> - ARRAY_SIZE(__entry->h.comp_ref),
> - sizeof(__entry->h.comp_ref[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.y_mode,
> - sizeof(__entry->h.y_mode),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.uv_mode,
> - sizeof(__entry->h.uv_mode),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.partition,
> - sizeof(__entry->h.partition),
> - false)
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_coef_tmpl,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h),
> - TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> - TP_fast_assign(__entry->h = *h;),
> - TP_printk("\n coef {%s}",
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->h.coef,
> - sizeof(__entry->h.coef),
> - false)
> - )
> -);
> -
> -DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl,
> - TP_PROTO(const struct v4l2_vp9_mv_probs *p),
> - TP_ARGS(p),
> - TP_STRUCT__entry(__field_struct(struct v4l2_vp9_mv_probs, p)),
> - TP_fast_assign(__entry->p = *p;),
> - TP_printk("\n joint %s\n"
> - "sign %s\n"
> - "classes {%s}\n"
> - "class0_bit %s\n"
> - "bits {%s}\n"
> - "class0_fr {%s}\n"
> - "fr {%s}\n"
> - "class0_hp %s\n"
> - "hp %s\n",
> - __print_array(__entry->p.joint,
> - ARRAY_SIZE(__entry->p.joint),
> - sizeof(__entry->p.joint[0])),
> - __print_array(__entry->p.sign,
> - ARRAY_SIZE(__entry->p.sign),
> - sizeof(__entry->p.sign[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.classes,
> - sizeof(__entry->p.classes),
> - false),
> - __print_array(__entry->p.class0_bit,
> - ARRAY_SIZE(__entry->p.class0_bit),
> - sizeof(__entry->p.class0_bit[0])),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.bits,
> - sizeof(__entry->p.bits),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.class0_fr,
> - sizeof(__entry->p.class0_fr),
> - false),
> - __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> - __entry->p.fr,
> - sizeof(__entry->p.fr),
> - false),
> - __print_array(__entry->p.class0_hp,
> - ARRAY_SIZE(__entry->p.class0_hp),
> - sizeof(__entry->p.class0_hp[0])),
> - __print_array(__entry->p.hp,
> - ARRAY_SIZE(__entry->p.hp),
> - sizeof(__entry->p.hp[0]))
> - )
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_vp9_frame_tmpl, v4l2_ctrl_vp9_frame,
> - TP_PROTO(const struct v4l2_ctrl_vp9_frame *f),
> - TP_ARGS(f)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_vp9_compressed_hdr_tmpl, v4l2_ctrl_vp9_compressed_hdr,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h)
> -);
> -
> -DEFINE_EVENT(v4l2_ctrl_vp9_compressed_coef_tmpl, v4l2_ctrl_vp9_compressed_coeff,
> - TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> - TP_ARGS(h)
> -);
> -
> -
> -DEFINE_EVENT(v4l2_vp9_mv_probs_tmpl, v4l2_vp9_mv_probs,
> - TP_PROTO(const struct v4l2_vp9_mv_probs *p),
> - TP_ARGS(p)
> -);
> -
> -#endif
> -
> -#undef TRACE_INCLUDE_PATH
> -#undef TRACE_INCLUDE_FILE
> -#define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
> -#define TRACE_INCLUDE_FILE visl-trace-vp9
> -#include <trace/define_trace.h>
> diff --git a/drivers/media/v4l2-core/v4l2-trace.c b/drivers/media/v4l2-core/v4l2-trace.c
> index 95f3b02e1f84..9ce54c1968ef 100644
> --- a/drivers/media/v4l2-core/v4l2-trace.c
> +++ b/drivers/media/v4l2-core/v4l2-trace.c
> @@ -5,8 +5,53 @@
>
> #define CREATE_TRACE_POINTS
> #include <trace/events/v4l2.h>
> +#include <trace/events/v4l2_requests.h>
>
> EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_buf_done);
> EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_buf_queue);
> EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_dqbuf);
> EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_qbuf);
> +
> +/* Export AV1 controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_av1_sequence);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_av1_frame);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_av1_tile_group_entry);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_av1_film_grain);
> +
> +/* Export FWHT controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_fwht_params);
> +
> +/* Export H264 controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_h264_sps);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_h264_pps);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_h264_scaling_matrix);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_h264_pred_weights);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_h264_slice_params);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_h264_ref_pic_list0);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_h264_ref_pic_list1);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_h264_decode_params);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_h264_dpb_entry);
> +
> +/* Export HEVC controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_hevc_sps);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_hevc_pps);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_hevc_slice_params);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_hevc_pred_weight_table);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_hevc_scaling_matrix);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_hevc_decode_params);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_hevc_dpb_entry);
> +
> +/* Export MPEG2 controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_mpeg2_sequence);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_mpeg2_picture);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_mpeg2_quantisation);
> +
> +/* Export VP8 controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_vp8_frame);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_vp8_entropy);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_vp9_frame);
> +
> +/* Export VP9 controls */
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_vp9_compressed_hdr);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ctrl_vp9_compressed_coeff);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_vp9_mv_probs);
> diff --git a/include/trace/events/v4l2_requests.h b/include/trace/events/v4l2_requests.h
> new file mode 100644
> index 000000000000..1e137d39d5fe
> --- /dev/null
> +++ b/include/trace/events/v4l2_requests.h
> @@ -0,0 +1,1645 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#if !defined(_TRACE_V4L2_REQUESTS_H_) || defined(TRACE_HEADER_MULTI_READ)
> +#define _TRACE_V4L2_REQUESTS_H_
> +
> +#include <linux/tracepoint.h>
> +#include <linux/v4l2-controls.h>
> +
> +#undef TRACE_SYSTEM
> +#define TRACE_SYSTEM v4l2_requests
> +
> +/* AV1 controls */
> +DECLARE_EVENT_CLASS(v4l2_ctrl_av1_seq_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_av1_sequence *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_sequence, s)),
> + TP_fast_assign(__entry->s = *s;),
> + TP_printk("\nflags %s\nseq_profile: %u\norder_hint_bits: %u\nbit_depth: %u\n"
> + "max_frame_width_minus_1: %u\nmax_frame_height_minus_1: %u\n",
> + __print_flags(__entry->s.flags, "|",
> + {V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE, "STILL_PICTURE"},
> + {V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK, "USE_128X128_SUPERBLOCK"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA, "ENABLE_FILTER_INTRA"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER, "ENABLE_INTRA_EDGE_FILTER"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND, "ENABLE_INTERINTRA_COMPOUND"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND, "ENABLE_MASKED_COMPOUND"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION, "ENABLE_WARPED_MOTION"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER, "ENABLE_DUAL_FILTER"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT, "ENABLE_ORDER_HINT"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP, "ENABLE_JNT_COMP"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS, "ENABLE_REF_FRAME_MVS"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES, "ENABLE_SUPERRES"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF, "ENABLE_CDEF"},
> + {V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION, "ENABLE_RESTORATION"},
> + {V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME, "MONO_CHROME"},
> + {V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE, "COLOR_RANGE"},
> + {V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X, "SUBSAMPLING_X"},
> + {V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y, "SUBSAMPLING_Y"},
> + {V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT, "FILM_GRAIN_PARAMS_PRESENT"},
> + {V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q, "SEPARATE_UV_DELTA_Q"}),
> + __entry->s.seq_profile,
> + __entry->s.order_hint_bits,
> + __entry->s.bit_depth,
> + __entry->s.max_frame_width_minus_1,
> + __entry->s.max_frame_height_minus_1
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_av1_tge_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_av1_tile_group_entry *t),
> + TP_ARGS(t),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_tile_group_entry, t)),
> + TP_fast_assign(__entry->t = *t;),
> + TP_printk("\ntile_offset: %u\n tile_size: %u\n tile_row: %u\ntile_col: %u\n",
> + __entry->t.tile_offset,
> + __entry->t.tile_size,
> + __entry->t.tile_row,
> + __entry->t.tile_col
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_av1_frame_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_av1_frame *f),
> + TP_ARGS(f),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_frame, f)),
> + TP_fast_assign(__entry->f = *f;),
> + TP_printk("\ntile_info.flags: %s\ntile_info.context_update_tile_id: %u\n"
> + "tile_info.tile_cols: %u\ntile_info.tile_rows: %u\n"
> + "tile_info.mi_col_starts: %s\ntile_info.mi_row_starts: %s\n"
> + "tile_info.width_in_sbs_minus_1: %s\ntile_info.height_in_sbs_minus_1: %s\n"
> + "tile_info.tile_size_bytes: %u\nquantization.flags: %s\n"
> + "quantization.base_q_idx: %u\nquantization.delta_q_y_dc: %d\n"
> + "quantization.delta_q_u_dc: %d\nquantization.delta_q_u_ac: %d\n"
> + "quantization.delta_q_v_dc: %d\nquantization.delta_q_v_ac: %d\n"
> + "quantization.qm_y: %u\nquantization.qm_u: %u\nquantization.qm_v: %u\n"
> + "quantization.delta_q_res: %u\nsuperres_denom: %u\nsegmentation.flags: %s\n"
> + "segmentation.last_active_seg_id: %u\nsegmentation.feature_enabled:%s\n"
> + "loop_filter.flags: %s\nloop_filter.level: %s\nloop_filter.sharpness: %u\n"
> + "loop_filter.ref_deltas: %s\nloop_filter.mode_deltas: %s\n"
> + "loop_filter.delta_lf_res: %u\ncdef.damping_minus_3: %u\ncdef.bits: %u\n"
> + "cdef.y_pri_strength: %s\ncdef.y_sec_strength: %s\n"
> + "cdef.uv_pri_strength: %s\ncdef.uv_sec_strength:%s\nskip_mode_frame: %s\n"
> + "primary_ref_frame: %u\nloop_restoration.flags: %s\n"
> + "loop_restoration.lr_unit_shift: %u\nloop_restoration.lr_uv_shift: %u\n"
> + "loop_restoration.frame_restoration_type: %s\n"
> + "loop_restoration.loop_restoration_size: %s\nflags: %s\norder_hint: %u\n"
> + "upscaled_width: %u\nframe_width_minus_1: %u\nframe_height_minus_1: %u\n"
> + "render_width_minus_1: %u\nrender_height_minus_1: %u\ncurrent_frame_id: %u\n"
> + "buffer_removal_time: %s\norder_hints: %s\nreference_frame_ts: %s\n"
> + "ref_frame_idx: %s\nrefresh_frame_flags: %u\n",
> + __print_flags(__entry->f.tile_info.flags, "|",
> + {V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING, "UNIFORM_TILE_SPACING"}),
> + __entry->f.tile_info.context_update_tile_id,
> + __entry->f.tile_info.tile_cols,
> + __entry->f.tile_info.tile_rows,
> + __print_array(__entry->f.tile_info.mi_col_starts,
> + ARRAY_SIZE(__entry->f.tile_info.mi_col_starts),
> + sizeof(__entry->f.tile_info.mi_col_starts[0])),
> + __print_array(__entry->f.tile_info.mi_row_starts,
> + ARRAY_SIZE(__entry->f.tile_info.mi_row_starts),
> + sizeof(__entry->f.tile_info.mi_row_starts[0])),
> + __print_array(__entry->f.tile_info.width_in_sbs_minus_1,
> + ARRAY_SIZE(__entry->f.tile_info.width_in_sbs_minus_1),
> + sizeof(__entry->f.tile_info.width_in_sbs_minus_1[0])),
> + __print_array(__entry->f.tile_info.height_in_sbs_minus_1,
> + ARRAY_SIZE(__entry->f.tile_info.height_in_sbs_minus_1),
> + sizeof(__entry->f.tile_info.height_in_sbs_minus_1[0])),
> + __entry->f.tile_info.tile_size_bytes,
> + __print_flags(__entry->f.quantization.flags, "|",
> + {V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA, "DIFF_UV_DELTA"},
> + {V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX, "USING_QMATRIX"},
> + {V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT, "DELTA_Q_PRESENT"}),
> + __entry->f.quantization.base_q_idx,
> + __entry->f.quantization.delta_q_y_dc,
> + __entry->f.quantization.delta_q_u_dc,
> + __entry->f.quantization.delta_q_u_ac,
> + __entry->f.quantization.delta_q_v_dc,
> + __entry->f.quantization.delta_q_v_ac,
> + __entry->f.quantization.qm_y,
> + __entry->f.quantization.qm_u,
> + __entry->f.quantization.qm_v,
> + __entry->f.quantization.delta_q_res,
> + __entry->f.superres_denom,
> + __print_flags(__entry->f.segmentation.flags, "|",
> + {V4L2_AV1_SEGMENTATION_FLAG_ENABLED, "ENABLED"},
> + {V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP, "UPDATE_MAP"},
> + {V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE, "TEMPORAL_UPDATE"},
> + {V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA, "UPDATE_DATA"},
> + {V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP, "SEG_ID_PRE_SKIP"}),
> + __entry->f.segmentation.last_active_seg_id,
> + __print_array(__entry->f.segmentation.feature_enabled,
> + ARRAY_SIZE(__entry->f.segmentation.feature_enabled),
> + sizeof(__entry->f.segmentation.feature_enabled[0])),
> + __print_flags(__entry->f.loop_filter.flags, "|",
> + {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED, "DELTA_ENABLED"},
> + {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE, "DELTA_UPDATE"},
> + {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT, "DELTA_LF_PRESENT"},
> + {V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI, "DELTA_LF_MULTI"}),
> + __print_array(__entry->f.loop_filter.level,
> + ARRAY_SIZE(__entry->f.loop_filter.level),
> + sizeof(__entry->f.loop_filter.level[0])),
> + __entry->f.loop_filter.sharpness,
> + __print_array(__entry->f.loop_filter.ref_deltas,
> + ARRAY_SIZE(__entry->f.loop_filter.ref_deltas),
> + sizeof(__entry->f.loop_filter.ref_deltas[0])),
> + __print_array(__entry->f.loop_filter.mode_deltas,
> + ARRAY_SIZE(__entry->f.loop_filter.mode_deltas),
> + sizeof(__entry->f.loop_filter.mode_deltas[0])),
> + __entry->f.loop_filter.delta_lf_res,
> + __entry->f.cdef.damping_minus_3,
> + __entry->f.cdef.bits,
> + __print_array(__entry->f.cdef.y_pri_strength,
> + ARRAY_SIZE(__entry->f.cdef.y_pri_strength),
> + sizeof(__entry->f.cdef.y_pri_strength[0])),
> + __print_array(__entry->f.cdef.y_sec_strength,
> + ARRAY_SIZE(__entry->f.cdef.y_sec_strength),
> + sizeof(__entry->f.cdef.y_sec_strength[0])),
> + __print_array(__entry->f.cdef.uv_pri_strength,
> + ARRAY_SIZE(__entry->f.cdef.uv_pri_strength),
> + sizeof(__entry->f.cdef.uv_pri_strength[0])),
> + __print_array(__entry->f.cdef.uv_sec_strength,
> + ARRAY_SIZE(__entry->f.cdef.uv_sec_strength),
> + sizeof(__entry->f.cdef.uv_sec_strength[0])),
> + __print_array(__entry->f.skip_mode_frame,
> + ARRAY_SIZE(__entry->f.skip_mode_frame),
> + sizeof(__entry->f.skip_mode_frame[0])),
> + __entry->f.primary_ref_frame,
> + __print_flags(__entry->f.loop_restoration.flags, "|",
> + {V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR, "USES_LR"},
> + {V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR, "USES_CHROMA_LR"}),
> + __entry->f.loop_restoration.lr_unit_shift,
> + __entry->f.loop_restoration.lr_uv_shift,
> + __print_array(__entry->f.loop_restoration.frame_restoration_type,
> + ARRAY_SIZE(__entry->f.loop_restoration.frame_restoration_type),
> + sizeof(__entry->f.loop_restoration.frame_restoration_type[0])),
> + __print_array(__entry->f.loop_restoration.loop_restoration_size,
> + ARRAY_SIZE(__entry->f.loop_restoration.loop_restoration_size),
> + sizeof(__entry->f.loop_restoration.loop_restoration_size[0])),
> + __print_flags(__entry->f.flags, "|",
> + {V4L2_AV1_FRAME_FLAG_SHOW_FRAME, "SHOW_FRAME"},
> + {V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME, "SHOWABLE_FRAME"},
> + {V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE, "ERROR_RESILIENT_MODE"},
> + {V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE, "DISABLE_CDF_UPDATE"},
> + {V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS, "ALLOW_SCREEN_CONTENT_TOOLS"},
> + {V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV, "FORCE_INTEGER_MV"},
> + {V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC, "ALLOW_INTRABC"},
> + {V4L2_AV1_FRAME_FLAG_USE_SUPERRES, "USE_SUPERRES"},
> + {V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV, "ALLOW_HIGH_PRECISION_MV"},
> + {V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE, "IS_MOTION_MODE_SWITCHABLE"},
> + {V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS, "USE_REF_FRAME_MVS"},
> + {V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF,
> + "DISABLE_FRAME_END_UPDATE_CDF"},
> + {V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION, "ALLOW_WARPED_MOTION"},
> + {V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT, "REFERENCE_SELECT"},
> + {V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET, "REDUCED_TX_SET"},
> + {V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED, "SKIP_MODE_ALLOWED"},
> + {V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT, "SKIP_MODE_PRESENT"},
> + {V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE, "FRAME_SIZE_OVERRIDE"},
> + {V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT, "BUFFER_REMOVAL_TIME_PRESENT"},
> + {V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING, "FRAME_REFS_SHORT_SIGNALING"}),
> + __entry->f.order_hint,
> + __entry->f.upscaled_width,
> + __entry->f.frame_width_minus_1,
> + __entry->f.frame_height_minus_1,
> + __entry->f.render_width_minus_1,
> + __entry->f.render_height_minus_1,
> + __entry->f.current_frame_id,
> + __print_array(__entry->f.buffer_removal_time,
> + ARRAY_SIZE(__entry->f.buffer_removal_time),
> + sizeof(__entry->f.buffer_removal_time[0])),
> + __print_array(__entry->f.order_hints,
> + ARRAY_SIZE(__entry->f.order_hints),
> + sizeof(__entry->f.order_hints[0])),
> + __print_array(__entry->f.reference_frame_ts,
> + ARRAY_SIZE(__entry->f.reference_frame_ts),
> + sizeof(__entry->f.reference_frame_ts[0])),
> + __print_array(__entry->f.ref_frame_idx,
> + ARRAY_SIZE(__entry->f.ref_frame_idx),
> + sizeof(__entry->f.ref_frame_idx[0])),
> + __entry->f.refresh_frame_flags
> + )
> +);
> +
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_av1_film_grain_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_av1_film_grain *f),
> + TP_ARGS(f),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_av1_film_grain, f)),
> + TP_fast_assign(__entry->f = *f;),
> + TP_printk("\nflags %s\ncr_mult: %u\ngrain_seed: %u\n"
> + "film_grain_params_ref_idx: %u\nnum_y_points: %u\npoint_y_value: %s\n"
> + "point_y_scaling: %s\nnum_cb_points: %u\npoint_cb_value: %s\n"
> + "point_cb_scaling: %s\nnum_cr_points: %u\npoint_cr_value: %s\n"
> + "point_cr_scaling: %s\ngrain_scaling_minus_8: %u\nar_coeff_lag: %u\n"
> + "ar_coeffs_y_plus_128: %s\nar_coeffs_cb_plus_128: %s\n"
> + "ar_coeffs_cr_plus_128: %s\nar_coeff_shift_minus_6: %u\n"
> + "grain_scale_shift: %u\ncb_mult: %u\ncb_luma_mult: %u\ncr_luma_mult: %u\n"
> + "cb_offset: %u\ncr_offset: %u\n",
> + __print_flags(__entry->f.flags, "|",
> + {V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN, "APPLY_GRAIN"},
> + {V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN, "UPDATE_GRAIN"},
> + {V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA, "CHROMA_SCALING_FROM_LUMA"},
> + {V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP, "OVERLAP"},
> + {V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE, "CLIP_TO_RESTRICTED_RANGE"}),
> + __entry->f.cr_mult,
> + __entry->f.grain_seed,
> + __entry->f.film_grain_params_ref_idx,
> + __entry->f.num_y_points,
> + __print_array(__entry->f.point_y_value,
> + ARRAY_SIZE(__entry->f.point_y_value),
> + sizeof(__entry->f.point_y_value[0])),
> + __print_array(__entry->f.point_y_scaling,
> + ARRAY_SIZE(__entry->f.point_y_scaling),
> + sizeof(__entry->f.point_y_scaling[0])),
> + __entry->f.num_cb_points,
> + __print_array(__entry->f.point_cb_value,
> + ARRAY_SIZE(__entry->f.point_cb_value),
> + sizeof(__entry->f.point_cb_value[0])),
> + __print_array(__entry->f.point_cb_scaling,
> + ARRAY_SIZE(__entry->f.point_cb_scaling),
> + sizeof(__entry->f.point_cb_scaling[0])),
> + __entry->f.num_cr_points,
> + __print_array(__entry->f.point_cr_value,
> + ARRAY_SIZE(__entry->f.point_cr_value),
> + sizeof(__entry->f.point_cr_value[0])),
> + __print_array(__entry->f.point_cr_scaling,
> + ARRAY_SIZE(__entry->f.point_cr_scaling),
> + sizeof(__entry->f.point_cr_scaling[0])),
> + __entry->f.grain_scaling_minus_8,
> + __entry->f.ar_coeff_lag,
> + __print_array(__entry->f.ar_coeffs_y_plus_128,
> + ARRAY_SIZE(__entry->f.ar_coeffs_y_plus_128),
> + sizeof(__entry->f.ar_coeffs_y_plus_128[0])),
> + __print_array(__entry->f.ar_coeffs_cb_plus_128,
> + ARRAY_SIZE(__entry->f.ar_coeffs_cb_plus_128),
> + sizeof(__entry->f.ar_coeffs_cb_plus_128[0])),
> + __print_array(__entry->f.ar_coeffs_cr_plus_128,
> + ARRAY_SIZE(__entry->f.ar_coeffs_cr_plus_128),
> + sizeof(__entry->f.ar_coeffs_cr_plus_128[0])),
> + __entry->f.ar_coeff_shift_minus_6,
> + __entry->f.grain_scale_shift,
> + __entry->f.cb_mult,
> + __entry->f.cb_luma_mult,
> + __entry->f.cr_luma_mult,
> + __entry->f.cb_offset,
> + __entry->f.cr_offset
> + )
> +)
> +
> +DEFINE_EVENT(v4l2_ctrl_av1_seq_tmpl, v4l2_ctrl_av1_sequence,
> + TP_PROTO(const struct v4l2_ctrl_av1_sequence *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_av1_frame_tmpl, v4l2_ctrl_av1_frame,
> + TP_PROTO(const struct v4l2_ctrl_av1_frame *f),
> + TP_ARGS(f)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_av1_tge_tmpl, v4l2_ctrl_av1_tile_group_entry,
> + TP_PROTO(const struct v4l2_ctrl_av1_tile_group_entry *t),
> + TP_ARGS(t)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_av1_film_grain_tmpl, v4l2_ctrl_av1_film_grain,
> + TP_PROTO(const struct v4l2_ctrl_av1_film_grain *f),
> + TP_ARGS(f)
> +);
> +
> +/* FWHT controls */
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(
> + __field(u64, backward_ref_ts)
> + __field(u32, version)
> + __field(u32, width)
> + __field(u32, height)
> + __field(u32, flags)
> + __field(u32, colorspace)
> + __field(u32, xfer_func)
> + __field(u32, ycbcr_enc)
> + __field(u32, quantization)
> + ),
> + TP_fast_assign(
> + __entry->backward_ref_ts = p->backward_ref_ts;
> + __entry->version = p->version;
> + __entry->width = p->width;
> + __entry->height = p->height;
> + __entry->flags = p->flags;
> + __entry->colorspace = p->colorspace;
> + __entry->xfer_func = p->xfer_func;
> + __entry->ycbcr_enc = p->ycbcr_enc;
> + __entry->quantization = p->quantization;
> + ),
> + TP_printk("backward_ref_ts %llu version %u width %u height %u flags %s colorspace %u xfer_func %u ycbcr_enc %u quantization %u",
> + __entry->backward_ref_ts, __entry->version, __entry->width, __entry->height,
> + __print_flags(__entry->flags, "|",
> + {V4L2_FWHT_FL_IS_INTERLACED, "IS_INTERLACED"},
> + {V4L2_FWHT_FL_IS_BOTTOM_FIRST, "IS_BOTTOM_FIRST"},
> + {V4L2_FWHT_FL_IS_ALTERNATE, "IS_ALTERNATE"},
> + {V4L2_FWHT_FL_IS_BOTTOM_FIELD, "IS_BOTTOM_FIELD"},
> + {V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED, "LUMA_IS_UNCOMPRESSED"},
> + {V4L2_FWHT_FL_CB_IS_UNCOMPRESSED, "CB_IS_UNCOMPRESSED"},
> + {V4L2_FWHT_FL_CR_IS_UNCOMPRESSED, "CR_IS_UNCOMPRESSED"},
> + {V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED, "ALPHA_IS_UNCOMPRESSED"},
> + {V4L2_FWHT_FL_I_FRAME, "I_FRAME"},
> + {V4L2_FWHT_FL_PIXENC_HSV, "PIXENC_HSV"},
> + {V4L2_FWHT_FL_PIXENC_RGB, "PIXENC_RGB"},
> + {V4L2_FWHT_FL_PIXENC_YUV, "PIXENC_YUV"}),
> + __entry->colorspace, __entry->xfer_func, __entry->ycbcr_enc,
> + __entry->quantization)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_fwht_params_tmpl, v4l2_ctrl_fwht_params,
> + TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
> + TP_ARGS(p)
> +);
> +
> +/* H264 controls */
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_h264_sps_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_h264_sps *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_sps, s)),
> + TP_fast_assign(__entry->s = *s),
> + TP_printk("\nprofile_idc %u\n"
> + "constraint_set_flags %s\n"
> + "level_idc %u\n"
> + "seq_parameter_set_id %u\n"
> + "chroma_format_idc %u\n"
> + "bit_depth_luma_minus8 %u\n"
> + "bit_depth_chroma_minus8 %u\n"
> + "log2_max_frame_num_minus4 %u\n"
> + "pic_order_cnt_type %u\n"
> + "log2_max_pic_order_cnt_lsb_minus4 %u\n"
> + "max_num_ref_frames %u\n"
> + "num_ref_frames_in_pic_order_cnt_cycle %u\n"
> + "offset_for_ref_frame %s\n"
> + "offset_for_non_ref_pic %d\n"
> + "offset_for_top_to_bottom_field %d\n"
> + "pic_width_in_mbs_minus1 %u\n"
> + "pic_height_in_map_units_minus1 %u\n"
> + "flags %s",
> + __entry->s.profile_idc,
> + __print_flags(__entry->s.constraint_set_flags, "|",
> + {V4L2_H264_SPS_CONSTRAINT_SET0_FLAG, "CONSTRAINT_SET0_FLAG"},
> + {V4L2_H264_SPS_CONSTRAINT_SET1_FLAG, "CONSTRAINT_SET1_FLAG"},
> + {V4L2_H264_SPS_CONSTRAINT_SET2_FLAG, "CONSTRAINT_SET2_FLAG"},
> + {V4L2_H264_SPS_CONSTRAINT_SET3_FLAG, "CONSTRAINT_SET3_FLAG"},
> + {V4L2_H264_SPS_CONSTRAINT_SET4_FLAG, "CONSTRAINT_SET4_FLAG"},
> + {V4L2_H264_SPS_CONSTRAINT_SET5_FLAG, "CONSTRAINT_SET5_FLAG"}),
> + __entry->s.level_idc,
> + __entry->s.seq_parameter_set_id,
> + __entry->s.chroma_format_idc,
> + __entry->s.bit_depth_luma_minus8,
> + __entry->s.bit_depth_chroma_minus8,
> + __entry->s.log2_max_frame_num_minus4,
> + __entry->s.pic_order_cnt_type,
> + __entry->s.log2_max_pic_order_cnt_lsb_minus4,
> + __entry->s.max_num_ref_frames,
> + __entry->s.num_ref_frames_in_pic_order_cnt_cycle,
> + __print_array(__entry->s.offset_for_ref_frame,
> + ARRAY_SIZE(__entry->s.offset_for_ref_frame),
> + sizeof(__entry->s.offset_for_ref_frame[0])),
> + __entry->s.offset_for_non_ref_pic,
> + __entry->s.offset_for_top_to_bottom_field,
> + __entry->s.pic_width_in_mbs_minus1,
> + __entry->s.pic_height_in_map_units_minus1,
> + __print_flags(__entry->s.flags, "|",
> + {V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE, "SEPARATE_COLOUR_PLANE"},
> + {V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS, "QPPRIME_Y_ZERO_TRANSFORM_BYPASS"},
> + {V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO, "DELTA_PIC_ORDER_ALWAYS_ZERO"},
> + {V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED, "GAPS_IN_FRAME_NUM_VALUE_ALLOWED"},
> + {V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY, "FRAME_MBS_ONLY"},
> + {V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD, "MB_ADAPTIVE_FRAME_FIELD"},
> + {V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE, "DIRECT_8X8_INFERENCE"}
> + ))
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pps_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_h264_pps *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pps, p)),
> + TP_fast_assign(__entry->p = *p),
> + TP_printk("\npic_parameter_set_id %u\n"
> + "seq_parameter_set_id %u\n"
> + "num_slice_groups_minus1 %u\n"
> + "num_ref_idx_l0_default_active_minus1 %u\n"
> + "num_ref_idx_l1_default_active_minus1 %u\n"
> + "weighted_bipred_idc %u\n"
> + "pic_init_qp_minus26 %d\n"
> + "pic_init_qs_minus26 %d\n"
> + "chroma_qp_index_offset %d\n"
> + "second_chroma_qp_index_offset %d\n"
> + "flags %s",
> + __entry->p.pic_parameter_set_id,
> + __entry->p.seq_parameter_set_id,
> + __entry->p.num_slice_groups_minus1,
> + __entry->p.num_ref_idx_l0_default_active_minus1,
> + __entry->p.num_ref_idx_l1_default_active_minus1,
> + __entry->p.weighted_bipred_idc,
> + __entry->p.pic_init_qp_minus26,
> + __entry->p.pic_init_qs_minus26,
> + __entry->p.chroma_qp_index_offset,
> + __entry->p.second_chroma_qp_index_offset,
> + __print_flags(__entry->p.flags, "|",
> + {V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE, "ENTROPY_CODING_MODE"},
> + {V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT, "BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT"},
> + {V4L2_H264_PPS_FLAG_WEIGHTED_PRED, "WEIGHTED_PRED"},
> + {V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT, "DEBLOCKING_FILTER_CONTROL_PRESENT"},
> + {V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED, "CONSTRAINED_INTRA_PRED"},
> + {V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT, "REDUNDANT_PIC_CNT_PRESENT"},
> + {V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE, "TRANSFORM_8X8_MODE"},
> + {V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT, "SCALING_MATRIX_PRESENT"}
> + ))
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_h264_scaling_matrix_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_h264_scaling_matrix *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_scaling_matrix, s)),
> + TP_fast_assign(__entry->s = *s),
> + TP_printk("\nscaling_list_4x4 {%s}\nscaling_list_8x8 {%s}",
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->s.scaling_list_4x4,
> + sizeof(__entry->s.scaling_list_4x4),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->s.scaling_list_8x8,
> + sizeof(__entry->s.scaling_list_8x8),
> + false)
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_h264_pred_weights_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_h264_pred_weights *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_pred_weights, p)),
> + TP_fast_assign(__entry->p = *p),
> + TP_printk("\nluma_log2_weight_denom %u\n"
> + "chroma_log2_weight_denom %u\n"
> + "weight_factor[0].luma_weight %s\n"
> + "weight_factor[0].luma_offset %s\n"
> + "weight_factor[0].chroma_weight {%s}\n"
> + "weight_factor[0].chroma_offset {%s}\n"
> + "weight_factor[1].luma_weight %s\n"
> + "weight_factor[1].luma_offset %s\n"
> + "weight_factor[1].chroma_weight {%s}\n"
> + "weight_factor[1].chroma_offset {%s}\n",
> + __entry->p.luma_log2_weight_denom,
> + __entry->p.chroma_log2_weight_denom,
> + __print_array(__entry->p.weight_factors[0].luma_weight,
> + ARRAY_SIZE(__entry->p.weight_factors[0].luma_weight),
> + sizeof(__entry->p.weight_factors[0].luma_weight[0])),
> + __print_array(__entry->p.weight_factors[0].luma_offset,
> + ARRAY_SIZE(__entry->p.weight_factors[0].luma_offset),
> + sizeof(__entry->p.weight_factors[0].luma_offset[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.weight_factors[0].chroma_weight,
> + sizeof(__entry->p.weight_factors[0].chroma_weight),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.weight_factors[0].chroma_offset,
> + sizeof(__entry->p.weight_factors[0].chroma_offset),
> + false),
> + __print_array(__entry->p.weight_factors[1].luma_weight,
> + ARRAY_SIZE(__entry->p.weight_factors[1].luma_weight),
> + sizeof(__entry->p.weight_factors[1].luma_weight[0])),
> + __print_array(__entry->p.weight_factors[1].luma_offset,
> + ARRAY_SIZE(__entry->p.weight_factors[1].luma_offset),
> + sizeof(__entry->p.weight_factors[1].luma_offset[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.weight_factors[1].chroma_weight,
> + sizeof(__entry->p.weight_factors[1].chroma_weight),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.weight_factors[1].chroma_offset,
> + sizeof(__entry->p.weight_factors[1].chroma_offset),
> + false)
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_h264_slice_params_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_h264_slice_params *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_slice_params, s)),
> + TP_fast_assign(__entry->s = *s),
> + TP_printk("\nheader_bit_size %u\n"
> + "first_mb_in_slice %u\n"
> + "slice_type %s\n"
> + "colour_plane_id %u\n"
> + "redundant_pic_cnt %u\n"
> + "cabac_init_idc %u\n"
> + "slice_qp_delta %d\n"
> + "slice_qs_delta %d\n"
> + "disable_deblocking_filter_idc %u\n"
> + "slice_alpha_c0_offset_div2 %u\n"
> + "slice_beta_offset_div2 %u\n"
> + "num_ref_idx_l0_active_minus1 %u\n"
> + "num_ref_idx_l1_active_minus1 %u\n"
> + "flags %s",
> + __entry->s.header_bit_size,
> + __entry->s.first_mb_in_slice,
> + __print_symbolic(__entry->s.slice_type,
> + {V4L2_H264_SLICE_TYPE_P, "P"},
> + {V4L2_H264_SLICE_TYPE_B, "B"},
> + {V4L2_H264_SLICE_TYPE_I, "I"},
> + {V4L2_H264_SLICE_TYPE_SP, "SP"},
> + {V4L2_H264_SLICE_TYPE_SI, "SI"}),
> + __entry->s.colour_plane_id,
> + __entry->s.redundant_pic_cnt,
> + __entry->s.cabac_init_idc,
> + __entry->s.slice_qp_delta,
> + __entry->s.slice_qs_delta,
> + __entry->s.disable_deblocking_filter_idc,
> + __entry->s.slice_alpha_c0_offset_div2,
> + __entry->s.slice_beta_offset_div2,
> + __entry->s.num_ref_idx_l0_active_minus1,
> + __entry->s.num_ref_idx_l1_active_minus1,
> + __print_flags(__entry->s.flags, "|",
> + {V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED, "DIRECT_SPATIAL_MV_PRED"},
> + {V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH, "SP_FOR_SWITCH"})
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_h264_reference_tmpl,
> + TP_PROTO(const struct v4l2_h264_reference *r, int i),
> + TP_ARGS(r, i),
> + TP_STRUCT__entry(__field_struct(struct v4l2_h264_reference, r)
> + __field(int, i)),
> + TP_fast_assign(__entry->r = *r; __entry->i = i;),
> + TP_printk("[%d]: fields %s index %u",
> + __entry->i,
> + __print_flags(__entry->r.fields, "|",
> + {V4L2_H264_TOP_FIELD_REF, "TOP_FIELD_REF"},
> + {V4L2_H264_BOTTOM_FIELD_REF, "BOTTOM_FIELD_REF"},
> + {V4L2_H264_FRAME_REF, "FRAME_REF"}),
> + __entry->r.index
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_h264_decode_params_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_h264_decode_params *d),
> + TP_ARGS(d),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_h264_decode_params, d)),
> + TP_fast_assign(__entry->d = *d),
> + TP_printk("\nnal_ref_idc %u\n"
> + "frame_num %u\n"
> + "top_field_order_cnt %d\n"
> + "bottom_field_order_cnt %d\n"
> + "idr_pic_id %u\n"
> + "pic_order_cnt_lsb %u\n"
> + "delta_pic_order_cnt_bottom %d\n"
> + "delta_pic_order_cnt0 %d\n"
> + "delta_pic_order_cnt1 %d\n"
> + "dec_ref_pic_marking_bit_size %u\n"
> + "pic_order_cnt_bit_size %u\n"
> + "slice_group_change_cycle %u\n"
> + "flags %s\n",
> + __entry->d.nal_ref_idc,
> + __entry->d.frame_num,
> + __entry->d.top_field_order_cnt,
> + __entry->d.bottom_field_order_cnt,
> + __entry->d.idr_pic_id,
> + __entry->d.pic_order_cnt_lsb,
> + __entry->d.delta_pic_order_cnt_bottom,
> + __entry->d.delta_pic_order_cnt0,
> + __entry->d.delta_pic_order_cnt1,
> + __entry->d.dec_ref_pic_marking_bit_size,
> + __entry->d.pic_order_cnt_bit_size,
> + __entry->d.slice_group_change_cycle,
> + __print_flags(__entry->d.flags, "|",
> + {V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC, "IDR_PIC"},
> + {V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC, "FIELD_PIC"},
> + {V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD, "BOTTOM_FIELD"},
> + {V4L2_H264_DECODE_PARAM_FLAG_PFRAME, "PFRAME"},
> + {V4L2_H264_DECODE_PARAM_FLAG_BFRAME, "BFRAME"})
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_h264_dpb_entry_tmpl,
> + TP_PROTO(const struct v4l2_h264_dpb_entry *e, int i),
> + TP_ARGS(e, i),
> + TP_STRUCT__entry(__field_struct(struct v4l2_h264_dpb_entry, e)
> + __field(int, i)),
> + TP_fast_assign(__entry->e = *e; __entry->i = i;),
> + TP_printk("[%d]: reference_ts %llu, pic_num %u frame_num %u fields %s "
> + "top_field_order_cnt %d bottom_field_order_cnt %d flags %s",
> + __entry->i,
> + __entry->e.reference_ts,
> + __entry->e.pic_num,
> + __entry->e.frame_num,
> + __print_flags(__entry->e.fields, "|",
> + {V4L2_H264_TOP_FIELD_REF, "TOP_FIELD_REF"},
> + {V4L2_H264_BOTTOM_FIELD_REF, "BOTTOM_FIELD_REF"},
> + {V4L2_H264_FRAME_REF, "FRAME_REF"}),
> + __entry->e.top_field_order_cnt,
> + __entry->e.bottom_field_order_cnt,
> + __print_flags(__entry->e.flags, "|",
> + {V4L2_H264_DPB_ENTRY_FLAG_VALID, "VALID"},
> + {V4L2_H264_DPB_ENTRY_FLAG_ACTIVE, "ACTIVE"},
> + {V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM, "LONG_TERM"},
> + {V4L2_H264_DPB_ENTRY_FLAG_FIELD, "FIELD"})
> +
> + )
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_h264_sps_tmpl, v4l2_ctrl_h264_sps,
> + TP_PROTO(const struct v4l2_ctrl_h264_sps *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_h264_pps_tmpl, v4l2_ctrl_h264_pps,
> + TP_PROTO(const struct v4l2_ctrl_h264_pps *p),
> + TP_ARGS(p)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_h264_scaling_matrix_tmpl, v4l2_ctrl_h264_scaling_matrix,
> + TP_PROTO(const struct v4l2_ctrl_h264_scaling_matrix *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_h264_pred_weights_tmpl, v4l2_ctrl_h264_pred_weights,
> + TP_PROTO(const struct v4l2_ctrl_h264_pred_weights *p),
> + TP_ARGS(p)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_h264_slice_params_tmpl, v4l2_ctrl_h264_slice_params,
> + TP_PROTO(const struct v4l2_ctrl_h264_slice_params *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_h264_reference_tmpl, v4l2_h264_ref_pic_list0,
> + TP_PROTO(const struct v4l2_h264_reference *r, int i),
> + TP_ARGS(r, i)
> +);
> +
> +DEFINE_EVENT(v4l2_h264_reference_tmpl, v4l2_h264_ref_pic_list1,
> + TP_PROTO(const struct v4l2_h264_reference *r, int i),
> + TP_ARGS(r, i)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_h264_decode_params_tmpl, v4l2_ctrl_h264_decode_params,
> + TP_PROTO(const struct v4l2_ctrl_h264_decode_params *d),
> + TP_ARGS(d)
> +);
> +
> +DEFINE_EVENT(v4l2_h264_dpb_entry_tmpl, v4l2_h264_dpb_entry,
> + TP_PROTO(const struct v4l2_h264_dpb_entry *e, int i),
> + TP_ARGS(e, i)
> +);
> +
> +/* HEVC controls */
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_sps_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_sps *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_sps, s)),
> + TP_fast_assign(__entry->s = *s),
> + TP_printk("\nvideo_parameter_set_id %u\n"
> + "seq_parameter_set_id %u\n"
> + "pic_width_in_luma_samples %u\n"
> + "pic_height_in_luma_samples %u\n"
> + "bit_depth_luma_minus8 %u\n"
> + "bit_depth_chroma_minus8 %u\n"
> + "log2_max_pic_order_cnt_lsb_minus4 %u\n"
> + "sps_max_dec_pic_buffering_minus1 %u\n"
> + "sps_max_num_reorder_pics %u\n"
> + "sps_max_latency_increase_plus1 %u\n"
> + "log2_min_luma_coding_block_size_minus3 %u\n"
> + "log2_diff_max_min_luma_coding_block_size %u\n"
> + "log2_min_luma_transform_block_size_minus2 %u\n"
> + "log2_diff_max_min_luma_transform_block_size %u\n"
> + "max_transform_hierarchy_depth_inter %u\n"
> + "max_transform_hierarchy_depth_intra %u\n"
> + "pcm_sample_bit_depth_luma_minus1 %u\n"
> + "pcm_sample_bit_depth_chroma_minus1 %u\n"
> + "log2_min_pcm_luma_coding_block_size_minus3 %u\n"
> + "log2_diff_max_min_pcm_luma_coding_block_size %u\n"
> + "num_short_term_ref_pic_sets %u\n"
> + "num_long_term_ref_pics_sps %u\n"
> + "chroma_format_idc %u\n"
> + "sps_max_sub_layers_minus1 %u\n"
> + "flags %s",
> + __entry->s.video_parameter_set_id,
> + __entry->s.seq_parameter_set_id,
> + __entry->s.pic_width_in_luma_samples,
> + __entry->s.pic_height_in_luma_samples,
> + __entry->s.bit_depth_luma_minus8,
> + __entry->s.bit_depth_chroma_minus8,
> + __entry->s.log2_max_pic_order_cnt_lsb_minus4,
> + __entry->s.sps_max_dec_pic_buffering_minus1,
> + __entry->s.sps_max_num_reorder_pics,
> + __entry->s.sps_max_latency_increase_plus1,
> + __entry->s.log2_min_luma_coding_block_size_minus3,
> + __entry->s.log2_diff_max_min_luma_coding_block_size,
> + __entry->s.log2_min_luma_transform_block_size_minus2,
> + __entry->s.log2_diff_max_min_luma_transform_block_size,
> + __entry->s.max_transform_hierarchy_depth_inter,
> + __entry->s.max_transform_hierarchy_depth_intra,
> + __entry->s.pcm_sample_bit_depth_luma_minus1,
> + __entry->s.pcm_sample_bit_depth_chroma_minus1,
> + __entry->s.log2_min_pcm_luma_coding_block_size_minus3,
> + __entry->s.log2_diff_max_min_pcm_luma_coding_block_size,
> + __entry->s.num_short_term_ref_pic_sets,
> + __entry->s.num_long_term_ref_pics_sps,
> + __entry->s.chroma_format_idc,
> + __entry->s.sps_max_sub_layers_minus1,
> + __print_flags(__entry->s.flags, "|",
> + {V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE, "SEPARATE_COLOUR_PLANE"},
> + {V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED, "SCALING_LIST_ENABLED"},
> + {V4L2_HEVC_SPS_FLAG_AMP_ENABLED, "AMP_ENABLED"},
> + {V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET, "SAMPLE_ADAPTIVE_OFFSET"},
> + {V4L2_HEVC_SPS_FLAG_PCM_ENABLED, "PCM_ENABLED"},
> + {V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED, "V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED"},
> + {V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT, "LONG_TERM_REF_PICS_PRESENT"},
> + {V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED, "TEMPORAL_MVP_ENABLED"},
> + {V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED, "STRONG_INTRA_SMOOTHING_ENABLED"}
> + ))
> +
> +);
> +
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_pps_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_pps *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_pps, p)),
> + TP_fast_assign(__entry->p = *p),
> + TP_printk("\npic_parameter_set_id %u\n"
> + "num_extra_slice_header_bits %u\n"
> + "num_ref_idx_l0_default_active_minus1 %u\n"
> + "num_ref_idx_l1_default_active_minus1 %u\n"
> + "init_qp_minus26 %d\n"
> + "diff_cu_qp_delta_depth %u\n"
> + "pps_cb_qp_offset %d\n"
> + "pps_cr_qp_offset %d\n"
> + "num_tile_columns_minus1 %d\n"
> + "num_tile_rows_minus1 %d\n"
> + "column_width_minus1 %s\n"
> + "row_height_minus1 %s\n"
> + "pps_beta_offset_div2 %d\n"
> + "pps_tc_offset_div2 %d\n"
> + "log2_parallel_merge_level_minus2 %u\n"
> + "flags %s",
> + __entry->p.pic_parameter_set_id,
> + __entry->p.num_extra_slice_header_bits,
> + __entry->p.num_ref_idx_l0_default_active_minus1,
> + __entry->p.num_ref_idx_l1_default_active_minus1,
> + __entry->p.init_qp_minus26,
> + __entry->p.diff_cu_qp_delta_depth,
> + __entry->p.pps_cb_qp_offset,
> + __entry->p.pps_cr_qp_offset,
> + __entry->p.num_tile_columns_minus1,
> + __entry->p.num_tile_rows_minus1,
> + __print_array(__entry->p.column_width_minus1,
> + ARRAY_SIZE(__entry->p.column_width_minus1),
> + sizeof(__entry->p.column_width_minus1[0])),
> + __print_array(__entry->p.row_height_minus1,
> + ARRAY_SIZE(__entry->p.row_height_minus1),
> + sizeof(__entry->p.row_height_minus1[0])),
> + __entry->p.pps_beta_offset_div2,
> + __entry->p.pps_tc_offset_div2,
> + __entry->p.log2_parallel_merge_level_minus2,
> + __print_flags(__entry->p.flags, "|",
> + {V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED, "DEPENDENT_SLICE_SEGMENT_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT, "OUTPUT_FLAG_PRESENT"},
> + {V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED, "SIGN_DATA_HIDING_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT, "CABAC_INIT_PRESENT"},
> + {V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED, "CONSTRAINED_INTRA_PRED"},
> + {V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED, "CU_QP_DELTA_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT, "PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT"},
> + {V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED, "WEIGHTED_PRED"},
> + {V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED, "WEIGHTED_BIPRED"},
> + {V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED, "TRANSQUANT_BYPASS_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_TILES_ENABLED, "TILES_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED, "ENTROPY_CODING_SYNC_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED, "LOOP_FILTER_ACROSS_TILES_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED, "PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED, "DEBLOCKING_FILTER_OVERRIDE_ENABLED"},
> + {V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER, "DISABLE_DEBLOCKING_FILTER"},
> + {V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT, "LISTS_MODIFICATION_PRESENT"},
> + {V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT, "SLICE_SEGMENT_HEADER_EXTENSION_PRESENT"},
> + {V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT, "DEBLOCKING_FILTER_CONTROL_PRESENT"},
> + {V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING, "UNIFORM_SPACING"}
> + ))
> +
> +);
> +
> +
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_slice_params_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_slice_params *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_slice_params, s)),
> + TP_fast_assign(__entry->s = *s),
> + TP_printk("\nbit_size %u\n"
> + "data_byte_offset %u\n"
> + "num_entry_point_offsets %u\n"
> + "nal_unit_type %u\n"
> + "nuh_temporal_id_plus1 %u\n"
> + "slice_type %u\n"
> + "colour_plane_id %u\n"
> + "slice_pic_order_cnt %d\n"
> + "num_ref_idx_l0_active_minus1 %u\n"
> + "num_ref_idx_l1_active_minus1 %u\n"
> + "collocated_ref_idx %u\n"
> + "five_minus_max_num_merge_cand %u\n"
> + "slice_qp_delta %d\n"
> + "slice_cb_qp_offset %d\n"
> + "slice_cr_qp_offset %d\n"
> + "slice_act_y_qp_offset %d\n"
> + "slice_act_cb_qp_offset %d\n"
> + "slice_act_cr_qp_offset %d\n"
> + "slice_beta_offset_div2 %d\n"
> + "slice_tc_offset_div2 %d\n"
> + "pic_struct %u\n"
> + "slice_segment_addr %u\n"
> + "ref_idx_l0 %s\n"
> + "ref_idx_l1 %s\n"
> + "short_term_ref_pic_set_size %u\n"
> + "long_term_ref_pic_set_size %u\n"
> + "flags %s",
> + __entry->s.bit_size,
> + __entry->s.data_byte_offset,
> + __entry->s.num_entry_point_offsets,
> + __entry->s.nal_unit_type,
> + __entry->s.nuh_temporal_id_plus1,
> + __entry->s.slice_type,
> + __entry->s.colour_plane_id,
> + __entry->s.slice_pic_order_cnt,
> + __entry->s.num_ref_idx_l0_active_minus1,
> + __entry->s.num_ref_idx_l1_active_minus1,
> + __entry->s.collocated_ref_idx,
> + __entry->s.five_minus_max_num_merge_cand,
> + __entry->s.slice_qp_delta,
> + __entry->s.slice_cb_qp_offset,
> + __entry->s.slice_cr_qp_offset,
> + __entry->s.slice_act_y_qp_offset,
> + __entry->s.slice_act_cb_qp_offset,
> + __entry->s.slice_act_cr_qp_offset,
> + __entry->s.slice_beta_offset_div2,
> + __entry->s.slice_tc_offset_div2,
> + __entry->s.pic_struct,
> + __entry->s.slice_segment_addr,
> + __print_array(__entry->s.ref_idx_l0,
> + ARRAY_SIZE(__entry->s.ref_idx_l0),
> + sizeof(__entry->s.ref_idx_l0[0])),
> + __print_array(__entry->s.ref_idx_l1,
> + ARRAY_SIZE(__entry->s.ref_idx_l1),
> + sizeof(__entry->s.ref_idx_l1[0])),
> + __entry->s.short_term_ref_pic_set_size,
> + __entry->s.long_term_ref_pic_set_size,
> + __print_flags(__entry->s.flags, "|",
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA, "SLICE_SAO_LUMA"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA, "SLICE_SAO_CHROMA"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED, "SLICE_TEMPORAL_MVP_ENABLED"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO, "MVD_L1_ZERO"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT, "CABAC_INIT"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0, "COLLOCATED_FROM_L0"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV, "USE_INTEGER_MV"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED, "SLICE_DEBLOCKING_FILTER_DISABLED"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED, "SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED"},
> + {V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT, "DEPENDENT_SLICE_SEGMENT"}
> +
> + ))
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_hevc_pred_weight_table_tmpl,
> + TP_PROTO(const struct v4l2_hevc_pred_weight_table *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(__field_struct(struct v4l2_hevc_pred_weight_table, p)),
> + TP_fast_assign(__entry->p = *p),
> + TP_printk("\ndelta_luma_weight_l0 %s\n"
> + "luma_offset_l0 %s\n"
> + "delta_chroma_weight_l0 {%s}\n"
> + "chroma_offset_l0 {%s}\n"
> + "delta_luma_weight_l1 %s\n"
> + "luma_offset_l1 %s\n"
> + "delta_chroma_weight_l1 {%s}\n"
> + "chroma_offset_l1 {%s}\n"
> + "luma_log2_weight_denom %d\n"
> + "delta_chroma_log2_weight_denom %d\n",
> + __print_array(__entry->p.delta_luma_weight_l0,
> + ARRAY_SIZE(__entry->p.delta_luma_weight_l0),
> + sizeof(__entry->p.delta_luma_weight_l0[0])),
> + __print_array(__entry->p.luma_offset_l0,
> + ARRAY_SIZE(__entry->p.luma_offset_l0),
> + sizeof(__entry->p.luma_offset_l0[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.delta_chroma_weight_l0,
> + sizeof(__entry->p.delta_chroma_weight_l0),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.chroma_offset_l0,
> + sizeof(__entry->p.chroma_offset_l0),
> + false),
> + __print_array(__entry->p.delta_luma_weight_l1,
> + ARRAY_SIZE(__entry->p.delta_luma_weight_l1),
> + sizeof(__entry->p.delta_luma_weight_l1[0])),
> + __print_array(__entry->p.luma_offset_l1,
> + ARRAY_SIZE(__entry->p.luma_offset_l1),
> + sizeof(__entry->p.luma_offset_l1[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.delta_chroma_weight_l1,
> + sizeof(__entry->p.delta_chroma_weight_l1),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.chroma_offset_l1,
> + sizeof(__entry->p.chroma_offset_l1),
> + false),
> + __entry->p.luma_log2_weight_denom,
> + __entry->p.delta_chroma_log2_weight_denom
> +
> + ))
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_scaling_matrix_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_scaling_matrix *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_scaling_matrix, s)),
> + TP_fast_assign(__entry->s = *s),
> + TP_printk("\nscaling_list_4x4 {%s}\n"
> + "scaling_list_8x8 {%s}\n"
> + "scaling_list_16x16 {%s}\n"
> + "scaling_list_32x32 {%s}\n"
> + "scaling_list_dc_coef_16x16 %s\n"
> + "scaling_list_dc_coef_32x32 %s\n",
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->s.scaling_list_4x4,
> + sizeof(__entry->s.scaling_list_4x4),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->s.scaling_list_8x8,
> + sizeof(__entry->s.scaling_list_8x8),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->s.scaling_list_16x16,
> + sizeof(__entry->s.scaling_list_16x16),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->s.scaling_list_32x32,
> + sizeof(__entry->s.scaling_list_32x32),
> + false),
> + __print_array(__entry->s.scaling_list_dc_coef_16x16,
> + ARRAY_SIZE(__entry->s.scaling_list_dc_coef_16x16),
> + sizeof(__entry->s.scaling_list_dc_coef_16x16[0])),
> + __print_array(__entry->s.scaling_list_dc_coef_32x32,
> + ARRAY_SIZE(__entry->s.scaling_list_dc_coef_32x32),
> + sizeof(__entry->s.scaling_list_dc_coef_32x32[0]))
> + ))
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_decode_params_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_decode_params *d),
> + TP_ARGS(d),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_decode_params, d)),
> + TP_fast_assign(__entry->d = *d),
> + TP_printk("\npic_order_cnt_val %d\n"
> + "short_term_ref_pic_set_size %u\n"
> + "long_term_ref_pic_set_size %u\n"
> + "num_active_dpb_entries %u\n"
> + "num_poc_st_curr_before %u\n"
> + "num_poc_st_curr_after %u\n"
> + "num_poc_lt_curr %u\n"
> + "poc_st_curr_before %s\n"
> + "poc_st_curr_after %s\n"
> + "poc_lt_curr %s\n"
> + "flags %s",
> + __entry->d.pic_order_cnt_val,
> + __entry->d.short_term_ref_pic_set_size,
> + __entry->d.long_term_ref_pic_set_size,
> + __entry->d.num_active_dpb_entries,
> + __entry->d.num_poc_st_curr_before,
> + __entry->d.num_poc_st_curr_after,
> + __entry->d.num_poc_lt_curr,
> + __print_array(__entry->d.poc_st_curr_before,
> + ARRAY_SIZE(__entry->d.poc_st_curr_before),
> + sizeof(__entry->d.poc_st_curr_before[0])),
> + __print_array(__entry->d.poc_st_curr_after,
> + ARRAY_SIZE(__entry->d.poc_st_curr_after),
> + sizeof(__entry->d.poc_st_curr_after[0])),
> + __print_array(__entry->d.poc_lt_curr,
> + ARRAY_SIZE(__entry->d.poc_lt_curr),
> + sizeof(__entry->d.poc_lt_curr[0])),
> + __print_flags(__entry->d.flags, "|",
> + {V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC, "IRAP_PIC"},
> + {V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC, "IDR_PIC"},
> + {V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR, "NO_OUTPUT_OF_PRIOR"}
> + ))
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> + TP_ARGS(lt),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_lt_rps, lt)),
> + TP_fast_assign(__entry->lt = *lt),
> + TP_printk("\nflags %s\n"
> + "lt_ref_pic_poc_lsb_sps %x\n",
> + __print_flags(__entry->lt.flags, "|",
> + {V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT, "USED_LT"}
> + ),
> + __entry->lt.lt_ref_pic_poc_lsb_sps
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> + TP_ARGS(st),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_hevc_ext_sps_st_rps, st)),
> + TP_fast_assign(__entry->st = *st),
> + TP_printk("\nflags %s\n"
> + "delta_idx_minus1: %u\n"
> + "delta_rps_sign: %u\n"
> + "abs_delta_rps_minus1: %u\n"
> + "num_negative_pics: %u\n"
> + "num_positive_pics: %u\n"
> + "used_by_curr_pic: %08x\n"
> + "use_delta_flag: %08x\n"
> + "delta_poc_s0_minus1: %s\n"
> + "delta_poc_s1_minus1: %s\n",
> + __print_flags(__entry->st.flags, "|",
> + {V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED, "INTER_REF_PIC_SET_PRED"}
> + ),
> + __entry->st.delta_idx_minus1,
> + __entry->st.delta_rps_sign,
> + __entry->st.abs_delta_rps_minus1,
> + __entry->st.num_negative_pics,
> + __entry->st.num_positive_pics,
> + __entry->st.used_by_curr_pic,
> + __entry->st.use_delta_flag,
> + __print_array(__entry->st.delta_poc_s0_minus1,
> + ARRAY_SIZE(__entry->st.delta_poc_s0_minus1),
> + sizeof(__entry->st.delta_poc_s0_minus1[0])),
> + __print_array(__entry->st.delta_poc_s1_minus1,
> + ARRAY_SIZE(__entry->st.delta_poc_s1_minus1),
> + sizeof(__entry->st.delta_poc_s1_minus1[0]))
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_hevc_dpb_entry_tmpl,
> + TP_PROTO(const struct v4l2_hevc_dpb_entry *e),
> + TP_ARGS(e),
> + TP_STRUCT__entry(__field_struct(struct v4l2_hevc_dpb_entry, e)),
> + TP_fast_assign(__entry->e = *e),
> + TP_printk("\ntimestamp %llu\n"
> + "flags %s\n"
> + "field_pic %u\n"
> + "pic_order_cnt_val %d\n",
> + __entry->e.timestamp,
> + __print_flags(__entry->e.flags, "|",
> + {V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE, "LONG_TERM_REFERENCE"}
> + ),
> + __entry->e.field_pic,
> + __entry->e.pic_order_cnt_val
> + ))
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_sps_tmpl, v4l2_ctrl_hevc_sps,
> + TP_PROTO(const struct v4l2_ctrl_hevc_sps *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_pps_tmpl, v4l2_ctrl_hevc_pps,
> + TP_PROTO(const struct v4l2_ctrl_hevc_pps *p),
> + TP_ARGS(p)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_slice_params_tmpl, v4l2_ctrl_hevc_slice_params,
> + TP_PROTO(const struct v4l2_ctrl_hevc_slice_params *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_hevc_pred_weight_table_tmpl, v4l2_hevc_pred_weight_table,
> + TP_PROTO(const struct v4l2_hevc_pred_weight_table *p),
> + TP_ARGS(p)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_scaling_matrix_tmpl, v4l2_ctrl_hevc_scaling_matrix,
> + TP_PROTO(const struct v4l2_ctrl_hevc_scaling_matrix *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_decode_params_tmpl, v4l2_ctrl_hevc_decode_params,
> + TP_PROTO(const struct v4l2_ctrl_hevc_decode_params *d),
> + TP_ARGS(d)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_ext_sps_lt_rps_tmpl, v4l2_ctrl_hevc_ext_sps_lt_rps,
> + TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_lt_rps *lt),
> + TP_ARGS(lt)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_hevc_ext_sps_st_rps_tmpl, v4l2_ctrl_hevc_ext_sps_st_rps,
> + TP_PROTO(const struct v4l2_ctrl_hevc_ext_sps_st_rps *st),
> + TP_ARGS(st)
> +);
> +
> +DEFINE_EVENT(v4l2_hevc_dpb_entry_tmpl, v4l2_hevc_dpb_entry,
> + TP_PROTO(const struct v4l2_hevc_dpb_entry *e),
> + TP_ARGS(e)
> +);
> +
> +/* MPEG2 controls */
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_seq_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s),
> + TP_ARGS(s),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_sequence, s)),
> + TP_fast_assign(__entry->s = *s;),
> + TP_printk("\nhorizontal_size %u\nvertical_size %u\nvbv_buffer_size %u\n"
> + "profile_and_level_indication %u\nchroma_format %u\nflags %s\n",
> + __entry->s.horizontal_size,
> + __entry->s.vertical_size,
> + __entry->s.vbv_buffer_size,
> + __entry->s.profile_and_level_indication,
> + __entry->s.chroma_format,
> + __print_flags(__entry->s.flags, "|",
> + {V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE, "PROGRESSIVE"})
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_pic_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_picture, p)),
> + TP_fast_assign(__entry->p = *p;),
> + TP_printk("\nbackward_ref_ts %llu\nforward_ref_ts %llu\nflags %s\nf_code {%s}\n"
> + "picture_coding_type: %u\npicture_structure %u\nintra_dc_precision %u\n",
> + __entry->p.backward_ref_ts,
> + __entry->p.forward_ref_ts,
> + __print_flags(__entry->p.flags, "|",
> + {V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST, "TOP_FIELD_FIRST"},
> + {V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT, "FRAME_PRED_DCT"},
> + {V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV, "CONCEALMENT_MV"},
> + {V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE, "Q_SCALE_TYPE"},
> + {V4L2_MPEG2_PIC_FLAG_INTRA_VLC, "INTA_VLC"},
> + {V4L2_MPEG2_PIC_FLAG_ALT_SCAN, "ALT_SCAN"},
> + {V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST, "REPEAT_FIRST"},
> + {V4L2_MPEG2_PIC_FLAG_PROGRESSIVE, "PROGRESSIVE"}),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.f_code,
> + sizeof(__entry->p.f_code),
> + false),
> + __entry->p.picture_coding_type,
> + __entry->p.picture_structure,
> + __entry->p.intra_dc_precision
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_quant_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q),
> + TP_ARGS(q),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_quantisation, q)),
> + TP_fast_assign(__entry->q = *q;),
> + TP_printk("\nintra_quantiser_matrix %s\nnon_intra_quantiser_matrix %s\n"
> + "chroma_intra_quantiser_matrix %s\nchroma_non_intra_quantiser_matrix %s\n",
> + __print_array(__entry->q.intra_quantiser_matrix,
> + ARRAY_SIZE(__entry->q.intra_quantiser_matrix),
> + sizeof(__entry->q.intra_quantiser_matrix[0])),
> + __print_array(__entry->q.non_intra_quantiser_matrix,
> + ARRAY_SIZE(__entry->q.non_intra_quantiser_matrix),
> + sizeof(__entry->q.non_intra_quantiser_matrix[0])),
> + __print_array(__entry->q.chroma_intra_quantiser_matrix,
> + ARRAY_SIZE(__entry->q.chroma_intra_quantiser_matrix),
> + sizeof(__entry->q.chroma_intra_quantiser_matrix[0])),
> + __print_array(__entry->q.chroma_non_intra_quantiser_matrix,
> + ARRAY_SIZE(__entry->q.chroma_non_intra_quantiser_matrix),
> + sizeof(__entry->q.chroma_non_intra_quantiser_matrix[0]))
> + )
> +)
> +
> +DEFINE_EVENT(v4l2_ctrl_mpeg2_seq_tmpl, v4l2_ctrl_mpeg2_sequence,
> + TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s),
> + TP_ARGS(s)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_mpeg2_pic_tmpl, v4l2_ctrl_mpeg2_picture,
> + TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p),
> + TP_ARGS(p)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_mpeg2_quant_tmpl, v4l2_ctrl_mpeg2_quantisation,
> + TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q),
> + TP_ARGS(q)
> +);
> +
> +/* VP8 controls */
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_entropy_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(f),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> + TP_fast_assign(__entry->f = *f;),
> + TP_printk("\nentropy.coeff_probs {%s}\n"
> + "entropy.y_mode_probs %s\n"
> + "entropy.uv_mode_probs %s\n"
> + "entropy.mv_probs {%s}",
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->f.entropy.coeff_probs,
> + sizeof(__entry->f.entropy.coeff_probs),
> + false),
> + __print_array(__entry->f.entropy.y_mode_probs,
> + ARRAY_SIZE(__entry->f.entropy.y_mode_probs),
> + sizeof(__entry->f.entropy.y_mode_probs[0])),
> + __print_array(__entry->f.entropy.uv_mode_probs,
> + ARRAY_SIZE(__entry->f.entropy.uv_mode_probs),
> + sizeof(__entry->f.entropy.uv_mode_probs[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->f.entropy.mv_probs,
> + sizeof(__entry->f.entropy.mv_probs),
> + false)
> + )
> +)
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(f),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame, f)),
> + TP_fast_assign(__entry->f = *f;),
> + TP_printk("\nsegment.quant_update %s\n"
> + "segment.lf_update %s\n"
> + "segment.segment_probs %s\n"
> + "segment.flags %s\n"
> + "lf.ref_frm_delta %s\n"
> + "lf.mb_mode_delta %s\n"
> + "lf.sharpness_level %u\n"
> + "lf.level %u\n"
> + "lf.flags %s\n"
> + "quant.y_ac_qi %u\n"
> + "quant.y_dc_delta %d\n"
> + "quant.y2_dc_delta %d\n"
> + "quant.y2_ac_delta %d\n"
> + "quant.uv_dc_delta %d\n"
> + "quant.uv_ac_delta %d\n"
> + "coder_state.range %u\n"
> + "coder_state.value %u\n"
> + "coder_state.bit_count %u\n"
> + "width %u\n"
> + "height %u\n"
> + "horizontal_scale %u\n"
> + "vertical_scale %u\n"
> + "version %u\n"
> + "prob_skip_false %u\n"
> + "prob_intra %u\n"
> + "prob_last %u\n"
> + "prob_gf %u\n"
> + "num_dct_parts %u\n"
> + "first_part_size %u\n"
> + "first_part_header_bits %u\n"
> + "dct_part_sizes %s\n"
> + "last_frame_ts %llu\n"
> + "golden_frame_ts %llu\n"
> + "alt_frame_ts %llu\n"
> + "flags %s",
> + __print_array(__entry->f.segment.quant_update,
> + ARRAY_SIZE(__entry->f.segment.quant_update),
> + sizeof(__entry->f.segment.quant_update[0])),
> + __print_array(__entry->f.segment.lf_update,
> + ARRAY_SIZE(__entry->f.segment.lf_update),
> + sizeof(__entry->f.segment.lf_update[0])),
> + __print_array(__entry->f.segment.segment_probs,
> + ARRAY_SIZE(__entry->f.segment.segment_probs),
> + sizeof(__entry->f.segment.segment_probs[0])),
> + __print_flags(__entry->f.segment.flags, "|",
> + {V4L2_VP8_SEGMENT_FLAG_ENABLED, "SEGMENT_ENABLED"},
> + {V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP, "SEGMENT_UPDATE_MAP"},
> + {V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA, "SEGMENT_UPDATE_FEATURE_DATA"},
> + {V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE, "SEGMENT_DELTA_VALUE_MODE"}),
> + __print_array(__entry->f.lf.ref_frm_delta,
> + ARRAY_SIZE(__entry->f.lf.ref_frm_delta),
> + sizeof(__entry->f.lf.ref_frm_delta[0])),
> + __print_array(__entry->f.lf.mb_mode_delta,
> + ARRAY_SIZE(__entry->f.lf.mb_mode_delta),
> + sizeof(__entry->f.lf.mb_mode_delta[0])),
> + __entry->f.lf.sharpness_level,
> + __entry->f.lf.level,
> + __print_flags(__entry->f.lf.flags, "|",
> + {V4L2_VP8_LF_ADJ_ENABLE, "LF_ADJ_ENABLED"},
> + {V4L2_VP8_LF_DELTA_UPDATE, "LF_DELTA_UPDATE"},
> + {V4L2_VP8_LF_FILTER_TYPE_SIMPLE, "LF_FILTER_TYPE_SIMPLE"}),
> + __entry->f.quant.y_ac_qi,
> + __entry->f.quant.y_dc_delta,
> + __entry->f.quant.y2_dc_delta,
> + __entry->f.quant.y2_ac_delta,
> + __entry->f.quant.uv_dc_delta,
> + __entry->f.quant.uv_ac_delta,
> + __entry->f.coder_state.range,
> + __entry->f.coder_state.value,
> + __entry->f.coder_state.bit_count,
> + __entry->f.width,
> + __entry->f.height,
> + __entry->f.horizontal_scale,
> + __entry->f.vertical_scale,
> + __entry->f.version,
> + __entry->f.prob_skip_false,
> + __entry->f.prob_intra,
> + __entry->f.prob_last,
> + __entry->f.prob_gf,
> + __entry->f.num_dct_parts,
> + __entry->f.first_part_size,
> + __entry->f.first_part_header_bits,
> + __print_array(__entry->f.dct_part_sizes,
> + ARRAY_SIZE(__entry->f.dct_part_sizes),
> + sizeof(__entry->f.dct_part_sizes[0])),
> + __entry->f.last_frame_ts,
> + __entry->f.golden_frame_ts,
> + __entry->f.alt_frame_ts,
> + __print_flags(__entry->f.flags, "|",
> + {V4L2_VP8_FRAME_FLAG_KEY_FRAME, "KEY_FRAME"},
> + {V4L2_VP8_FRAME_FLAG_EXPERIMENTAL, "EXPERIMENTAL"},
> + {V4L2_VP8_FRAME_FLAG_SHOW_FRAME, "SHOW_FRAME"},
> + {V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF, "MB_NO_SKIP_COEFF"},
> + {V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN, "SIGN_BIAS_GOLDEN"},
> + {V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT, "SIGN_BIAS_ALT"})
> + )
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_vp8_frame_tmpl, v4l2_ctrl_vp8_frame,
> + TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(f)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_vp8_entropy_tmpl, v4l2_ctrl_vp8_entropy,
> + TP_PROTO(const struct v4l2_ctrl_vp8_frame *f),
> + TP_ARGS(f)
> +);
> +
> +/* VP9 controls */
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_vp9_frame *f),
> + TP_ARGS(f),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_frame, f)),
> + TP_fast_assign(__entry->f = *f;),
> + TP_printk("\nlf.ref_deltas %s\n"
> + "lf.mode_deltas %s\n"
> + "lf.level %u\n"
> + "lf.sharpness %u\n"
> + "lf.flags %s\n"
> + "quant.base_q_idx %u\n"
> + "quant.delta_q_y_dc %d\n"
> + "quant.delta_q_uv_dc %d\n"
> + "quant.delta_q_uv_ac %d\n"
> + "seg.feature_data {%s}\n"
> + "seg.feature_enabled %s\n"
> + "seg.tree_probs %s\n"
> + "seg.pred_probs %s\n"
> + "seg.flags %s\n"
> + "flags %s\n"
> + "compressed_header_size %u\n"
> + "uncompressed_header_size %u\n"
> + "frame_width_minus_1 %u\n"
> + "frame_height_minus_1 %u\n"
> + "render_width_minus_1 %u\n"
> + "render_height_minus_1 %u\n"
> + "last_frame_ts %llu\n"
> + "golden_frame_ts %llu\n"
> + "alt_frame_ts %llu\n"
> + "ref_frame_sign_bias %s\n"
> + "reset_frame_context %s\n"
> + "frame_context_idx %u\n"
> + "profile %u\n"
> + "bit_depth %u\n"
> + "interpolation_filter %s\n"
> + "tile_cols_log2 %u\n"
> + "tile_rows_log_2 %u\n"
> + "reference_mode %s\n",
> + __print_array(__entry->f.lf.ref_deltas,
> + ARRAY_SIZE(__entry->f.lf.ref_deltas),
> + sizeof(__entry->f.lf.ref_deltas[0])),
> + __print_array(__entry->f.lf.mode_deltas,
> + ARRAY_SIZE(__entry->f.lf.mode_deltas),
> + sizeof(__entry->f.lf.mode_deltas[0])),
> + __entry->f.lf.level,
> + __entry->f.lf.sharpness,
> + __print_flags(__entry->f.lf.flags, "|",
> + {V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED, "DELTA_ENABLED"},
> + {V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE, "DELTA_UPDATE"}),
> + __entry->f.quant.base_q_idx,
> + __entry->f.quant.delta_q_y_dc,
> + __entry->f.quant.delta_q_uv_dc,
> + __entry->f.quant.delta_q_uv_ac,
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->f.seg.feature_data,
> + sizeof(__entry->f.seg.feature_data),
> + false),
> + __print_array(__entry->f.seg.feature_enabled,
> + ARRAY_SIZE(__entry->f.seg.feature_enabled),
> + sizeof(__entry->f.seg.feature_enabled[0])),
> + __print_array(__entry->f.seg.tree_probs,
> + ARRAY_SIZE(__entry->f.seg.tree_probs),
> + sizeof(__entry->f.seg.tree_probs[0])),
> + __print_array(__entry->f.seg.pred_probs,
> + ARRAY_SIZE(__entry->f.seg.pred_probs),
> + sizeof(__entry->f.seg.pred_probs[0])),
> + __print_flags(__entry->f.seg.flags, "|",
> + {V4L2_VP9_SEGMENTATION_FLAG_ENABLED, "ENABLED"},
> + {V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP, "UPDATE_MAP"},
> + {V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE, "TEMPORAL_UPDATE"},
> + {V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA, "UPDATE_DATA"},
> + {V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE, "ABS_OR_DELTA_UPDATE"}),
> + __print_flags(__entry->f.flags, "|",
> + {V4L2_VP9_FRAME_FLAG_KEY_FRAME, "KEY_FRAME"},
> + {V4L2_VP9_FRAME_FLAG_SHOW_FRAME, "SHOW_FRAME"},
> + {V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT, "ERROR_RESILIENT"},
> + {V4L2_VP9_FRAME_FLAG_INTRA_ONLY, "INTRA_ONLY"},
> + {V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV, "ALLOW_HIGH_PREC_MV"},
> + {V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX, "REFRESH_FRAME_CTX"},
> + {V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE, "PARALLEL_DEC_MODE"},
> + {V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING, "X_SUBSAMPLING"},
> + {V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING, "Y_SUBSAMPLING"},
> + {V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING, "COLOR_RANGE_FULL_SWING"}),
> + __entry->f.compressed_header_size,
> + __entry->f.uncompressed_header_size,
> + __entry->f.frame_width_minus_1,
> + __entry->f.frame_height_minus_1,
> + __entry->f.render_width_minus_1,
> + __entry->f.render_height_minus_1,
> + __entry->f.last_frame_ts,
> + __entry->f.golden_frame_ts,
> + __entry->f.alt_frame_ts,
> + __print_symbolic(__entry->f.ref_frame_sign_bias,
> + {V4L2_VP9_SIGN_BIAS_LAST, "SIGN_BIAS_LAST"},
> + {V4L2_VP9_SIGN_BIAS_GOLDEN, "SIGN_BIAS_GOLDEN"},
> + {V4L2_VP9_SIGN_BIAS_ALT, "SIGN_BIAS_ALT"}),
> + __print_symbolic(__entry->f.reset_frame_context,
> + {V4L2_VP9_RESET_FRAME_CTX_NONE, "RESET_FRAME_CTX_NONE"},
> + {V4L2_VP9_RESET_FRAME_CTX_SPEC, "RESET_FRAME_CTX_SPEC"},
> + {V4L2_VP9_RESET_FRAME_CTX_ALL, "RESET_FRAME_CTX_ALL"}),
> + __entry->f.frame_context_idx,
> + __entry->f.profile,
> + __entry->f.bit_depth,
> + __print_symbolic(__entry->f.interpolation_filter,
> + {V4L2_VP9_INTERP_FILTER_EIGHTTAP, "INTERP_FILTER_EIGHTTAP"},
> + {V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH, "INTERP_FILTER_EIGHTTAP_SMOOTH"},
> + {V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP, "INTERP_FILTER_EIGHTTAP_SHARP"},
> + {V4L2_VP9_INTERP_FILTER_BILINEAR, "INTERP_FILTER_BILINEAR"},
> + {V4L2_VP9_INTERP_FILTER_SWITCHABLE, "INTERP_FILTER_SWITCHABLE"}),
> + __entry->f.tile_cols_log2,
> + __entry->f.tile_rows_log2,
> + __print_symbolic(__entry->f.reference_mode,
> + {V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE, "REFERENCE_MODE_SINGLE_REFERENCE"},
> + {V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE, "REFERENCE_MODE_COMPOUND_REFERENCE"},
> + {V4L2_VP9_REFERENCE_MODE_SELECT, "REFERENCE_MODE_SELECT"}))
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(h),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> + TP_fast_assign(__entry->h = *h;),
> + TP_printk("\ntx_mode %s\n"
> + "tx8 {%s}\n"
> + "tx16 {%s}\n"
> + "tx32 {%s}\n"
> + "skip %s\n"
> + "inter_mode {%s}\n"
> + "interp_filter {%s}\n"
> + "is_inter %s\n"
> + "comp_mode %s\n"
> + "single_ref {%s}\n"
> + "comp_ref %s\n"
> + "y_mode {%s}\n"
> + "uv_mode {%s}\n"
> + "partition {%s}\n",
> + __print_symbolic(__entry->h.tx_mode,
> + {V4L2_VP9_TX_MODE_ONLY_4X4, "TX_MODE_ONLY_4X4"},
> + {V4L2_VP9_TX_MODE_ALLOW_8X8, "TX_MODE_ALLOW_8X8"},
> + {V4L2_VP9_TX_MODE_ALLOW_16X16, "TX_MODE_ALLOW_16X16"},
> + {V4L2_VP9_TX_MODE_ALLOW_32X32, "TX_MODE_ALLOW_32X32"},
> + {V4L2_VP9_TX_MODE_SELECT, "TX_MODE_SELECT"}),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.tx8,
> + sizeof(__entry->h.tx8),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.tx16,
> + sizeof(__entry->h.tx16),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.tx32,
> + sizeof(__entry->h.tx32),
> + false),
> + __print_array(__entry->h.skip,
> + ARRAY_SIZE(__entry->h.skip),
> + sizeof(__entry->h.skip[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.inter_mode,
> + sizeof(__entry->h.inter_mode),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.interp_filter,
> + sizeof(__entry->h.interp_filter),
> + false),
> + __print_array(__entry->h.is_inter,
> + ARRAY_SIZE(__entry->h.is_inter),
> + sizeof(__entry->h.is_inter[0])),
> + __print_array(__entry->h.comp_mode,
> + ARRAY_SIZE(__entry->h.comp_mode),
> + sizeof(__entry->h.comp_mode[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.single_ref,
> + sizeof(__entry->h.single_ref),
> + false),
> + __print_array(__entry->h.comp_ref,
> + ARRAY_SIZE(__entry->h.comp_ref),
> + sizeof(__entry->h.comp_ref[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.y_mode,
> + sizeof(__entry->h.y_mode),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.uv_mode,
> + sizeof(__entry->h.uv_mode),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.partition,
> + sizeof(__entry->h.partition),
> + false)
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_coef_tmpl,
> + TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(h),
> + TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr, h)),
> + TP_fast_assign(__entry->h = *h;),
> + TP_printk("\n coef {%s}",
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->h.coef,
> + sizeof(__entry->h.coef),
> + false)
> + )
> +);
> +
> +DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl,
> + TP_PROTO(const struct v4l2_vp9_mv_probs *p),
> + TP_ARGS(p),
> + TP_STRUCT__entry(__field_struct(struct v4l2_vp9_mv_probs, p)),
> + TP_fast_assign(__entry->p = *p;),
> + TP_printk("\n joint %s\n"
> + "sign %s\n"
> + "classes {%s}\n"
> + "class0_bit %s\n"
> + "bits {%s}\n"
> + "class0_fr {%s}\n"
> + "fr {%s}\n"
> + "class0_hp %s\n"
> + "hp %s\n",
> + __print_array(__entry->p.joint,
> + ARRAY_SIZE(__entry->p.joint),
> + sizeof(__entry->p.joint[0])),
> + __print_array(__entry->p.sign,
> + ARRAY_SIZE(__entry->p.sign),
> + sizeof(__entry->p.sign[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.classes,
> + sizeof(__entry->p.classes),
> + false),
> + __print_array(__entry->p.class0_bit,
> + ARRAY_SIZE(__entry->p.class0_bit),
> + sizeof(__entry->p.class0_bit[0])),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.bits,
> + sizeof(__entry->p.bits),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.class0_fr,
> + sizeof(__entry->p.class0_fr),
> + false),
> + __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1,
> + __entry->p.fr,
> + sizeof(__entry->p.fr),
> + false),
> + __print_array(__entry->p.class0_hp,
> + ARRAY_SIZE(__entry->p.class0_hp),
> + sizeof(__entry->p.class0_hp[0])),
> + __print_array(__entry->p.hp,
> + ARRAY_SIZE(__entry->p.hp),
> + sizeof(__entry->p.hp[0]))
> + )
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_vp9_frame_tmpl, v4l2_ctrl_vp9_frame,
> + TP_PROTO(const struct v4l2_ctrl_vp9_frame *f),
> + TP_ARGS(f)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_vp9_compressed_hdr_tmpl, v4l2_ctrl_vp9_compressed_hdr,
> + TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(h)
> +);
> +
> +DEFINE_EVENT(v4l2_ctrl_vp9_compressed_coef_tmpl, v4l2_ctrl_vp9_compressed_coeff,
> + TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr *h),
> + TP_ARGS(h)
> +);
> +
> +
> +DEFINE_EVENT(v4l2_vp9_mv_probs_tmpl, v4l2_vp9_mv_probs,
> + TP_PROTO(const struct v4l2_vp9_mv_probs *p),
> + TP_ARGS(p)
> +);
> +
> +#endif /* if !defined(_TRACE_V4L2_REQUESTS_H_) || defined(TRACE_HEADER_MULTI_READ) */
> +
> +#include <trace/define_trace.h>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v3 1/4] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
From: Wander Lairson Costa @ 2026-04-28 19:05 UTC (permalink / raw)
To: Steven Rostedt
Cc: Peter Zijlstra, Ingo Molnar, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman, Valentin Schneider,
Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
open list:SCHEDULER, open list:TRACING, acme, williams, gmonaco
In-Reply-To: <20260428145151.3860aa04@gandalf.local.home>
On Tue, Apr 28, 2026 at 02:51:51PM -0400, Steven Rostedt wrote:
> On Fri, 13 Mar 2026 12:36:10 -0300
> Wander Lairson Costa <wander@redhat.com> wrote:
>
> > On Fri, Mar 13, 2026 at 10:04:04AM +0100, Peter Zijlstra wrote:
> > > On Thu, Mar 12, 2026 at 02:19:15PM -0300, Wander Lairson Costa wrote:
> > >
> > > > > That's significant bloat, for really very little gain. Realistically
> > > > > nobody is going to need these.
> > > > >
> > > >
> > > > Of course, I can't speak for others, but more than once I debugged issues
> > > > that those tracepoints had made my life far easier. Those cases convinced
> > > > me that such a feature would be worth it. But if you don't see
> > > > value and will reject the patches no matter what, nothing can be done,
> > > > and I will have to accept defeat.
> > >
> > > If distros are going to enable this, I suppose I'm not going to stop
> > > this. But I do very much worry about the general bloat of things, there
> > > are a *LOT* of preempt_{dis,en}able() sites.
> > >
> >
> > We plan to enable these tracepoints in the RHEL kernel-rt to track
> > extended non-preemptible states that cause high latencies. These
> > issues occasionally surface in customer OpenShift deployments, where
> > deploying a custom debug kernel is highly impractical. Having these
> > tracepoints available in the distribution kernel would be handful for
> > debugging these production systems. That said, I expect enabling this
> > feature to be the exception rather than the rule — most distribution
> > kernels would leave it disabled.
>
> Is this work going to continue? Or should I just change the status to
> "reject" in patchwork?
>
Yes, I am still working on it and should have a v4 soon.
> -- Steve
>
^ permalink raw reply
* Re: [PATCH v3 4/4] trace/preemptirq: Implement trace_irqflags hooks
From: Wander Lairson Costa @ 2026-04-28 19:04 UTC (permalink / raw)
To: Steven Rostedt
Cc: Peter Zijlstra, Ingo Molnar, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman, Valentin Schneider,
Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton, open list,
open list:TRACING, acme, williams, gmonaco
In-Reply-To: <20260428145405.64d30ece@gandalf.local.home>
On Tue, Apr 28, 2026 at 02:54:05PM -0400, Steven Rostedt wrote:
> On Wed, 11 Mar 2026 20:43:05 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Wed, Mar 11, 2026 at 09:50:18AM -0300, Wander Lairson Costa wrote:
> > > +#define local_irq_enable() \
> > > + do { \
> > > + if (tracepoint_enabled(irq_enable)) \
> > > + trace_local_irq_enable(); \
> >
> > I'm thinking you didn't even look at the assembly generated :/
> >
> > Otherwise you would have written this like:
> >
> > if (tracepoint_enabled(irq_enable))
> > __do_trace_local_irq_enable();
> >
> > > + raw_local_irq_enable(); \
> > > + } while (0)
> >
> > Again, this was one instruction, and you clearly didn't bother looking
> > at the mess you've generated :/
>
> We now have trace_call__#name(), thus the above can be:
>
> if (tracepoint_enabled(irq_enable))
> trace_call__local_irq_enable();
>
> See commit 677a3d82b6407 ("tracepoint: Add trace_call__##name() API")
Great, I will update the patches.
>
> Just in case there's a v4.
>
> -- Steve
>
^ permalink raw reply
* Re: [PATCH v3 4/4] trace/preemptirq: Implement trace_irqflags hooks
From: Steven Rostedt @ 2026-04-28 18:54 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Wander Lairson Costa, Ingo Molnar, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman, Valentin Schneider,
Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton, open list,
open list:TRACING, acme, williams, gmonaco
In-Reply-To: <20260311194305.GT606826@noisy.programming.kicks-ass.net>
On Wed, 11 Mar 2026 20:43:05 +0100
Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Mar 11, 2026 at 09:50:18AM -0300, Wander Lairson Costa wrote:
> > +#define local_irq_enable() \
> > + do { \
> > + if (tracepoint_enabled(irq_enable)) \
> > + trace_local_irq_enable(); \
>
> I'm thinking you didn't even look at the assembly generated :/
>
> Otherwise you would have written this like:
>
> if (tracepoint_enabled(irq_enable))
> __do_trace_local_irq_enable();
>
> > + raw_local_irq_enable(); \
> > + } while (0)
>
> Again, this was one instruction, and you clearly didn't bother looking
> at the mess you've generated :/
We now have trace_call__#name(), thus the above can be:
if (tracepoint_enabled(irq_enable))
trace_call__local_irq_enable();
See commit 677a3d82b6407 ("tracepoint: Add trace_call__##name() API")
Just in case there's a v4.
-- Steve
^ permalink raw reply
* Re: [PATCH v3 1/4] tracing/preemptirq: Optimize preempt_disable/enable() tracepoint overhead
From: Steven Rostedt @ 2026-04-28 18:51 UTC (permalink / raw)
To: Wander Lairson Costa
Cc: Peter Zijlstra, Ingo Molnar, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman, Valentin Schneider,
Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
open list:SCHEDULER, open list:TRACING, acme, williams, gmonaco
In-Reply-To: <abQsFM9tFPr3Mrtt@fedora>
On Fri, 13 Mar 2026 12:36:10 -0300
Wander Lairson Costa <wander@redhat.com> wrote:
> On Fri, Mar 13, 2026 at 10:04:04AM +0100, Peter Zijlstra wrote:
> > On Thu, Mar 12, 2026 at 02:19:15PM -0300, Wander Lairson Costa wrote:
> >
> > > > That's significant bloat, for really very little gain. Realistically
> > > > nobody is going to need these.
> > > >
> > >
> > > Of course, I can't speak for others, but more than once I debugged issues
> > > that those tracepoints had made my life far easier. Those cases convinced
> > > me that such a feature would be worth it. But if you don't see
> > > value and will reject the patches no matter what, nothing can be done,
> > > and I will have to accept defeat.
> >
> > If distros are going to enable this, I suppose I'm not going to stop
> > this. But I do very much worry about the general bloat of things, there
> > are a *LOT* of preempt_{dis,en}able() sites.
> >
>
> We plan to enable these tracepoints in the RHEL kernel-rt to track
> extended non-preemptible states that cause high latencies. These
> issues occasionally surface in customer OpenShift deployments, where
> deploying a custom debug kernel is highly impractical. Having these
> tracepoints available in the distribution kernel would be handful for
> debugging these production systems. That said, I expect enabling this
> feature to be the exception rather than the rule — most distribution
> kernels would leave it disabled.
Is this work going to continue? Or should I just change the status to
"reject" in patchwork?
-- Steve
^ permalink raw reply
* Re: [PATCH] fprobe: Add unregister_fprobe_sync() for synchronous unregistration
From: Steven Rostedt @ 2026-04-28 18:27 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Mathieu Desnoyers, Jonathan Corbet, linux-kernel,
linux-trace-kernel, linux-doc
In-Reply-To: <177729179863.401400.6063130067239479972.stgit@mhiramat.tok.corp.google.com>
On Mon, 27 Apr 2026 21:09:58 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> +/**
> + * unregister_fprobe_sync() - Unregister fprobe synchronously with RCU grace period.
> + * @fp: A fprobe data structure to be unregistered.
> + *
> + * Unregister fprobe (and remove ftrace hooks from the function entries) and
> + * wait for the RCU grace period to finish. This is useful for preventing
> + * the fprobe from being used after it is unregistered.
> + *
> + * Return 0 if @fp is unregistered successfully, -errno if not.
> + */
> +int unregister_fprobe_sync(struct fprobe *fp)
> +{
> + int ret;
> +
> + guard(mutex)(&fprobe_mutex);
> + if (!fp || !fprobe_registered(fp))
> + return -EINVAL;
> +
> + ret = unregister_fprobe_nolock(fp);
> + if (ret)
> + return ret;
> +
> + synchronize_rcu();
Hmm, do we really need to hold the fprobe_mutex when doing the
synchronize_rcu()? This could cause other updates to have to wait longer
too.
-- Steve
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(unregister_fprobe_sync);
^ permalink raw reply
* Re: [PATCH v2] mm/page_alloc: trace PCP refills and PCP zone lock usage
From: Steven Rostedt @ 2026-04-28 18:23 UTC (permalink / raw)
To: Bunyod Suvonov
Cc: akpm, vbabka, linux-mm, mhiramat, mathieu.desnoyers,
linux-trace-kernel, linux-kernel, surenb, mhocko, jackmanb,
hannes, ziy, david, vishal.moola, corbet, skhan, linux-doc
In-Reply-To: <20260427060142.131055-1-b.suvonov@sjtu.edu.cn>
On Mon, 27 Apr 2026 14:01:42 +0800
Bunyod Suvonov <b.suvonov@sjtu.edu.cn> wrote:
> + TP_STRUCT__entry(
> + __field(int, nid)
> + __field(int, zid)
> + __field(unsigned long, nr_pages)
> + ),
> +
> + TP_fast_assign(
> + __entry->nid = nid;
> + __entry->zid = zid;
> + __entry->nr_pages = nr_pages;
> + ),
> +
> + TP_printk("nid=%d zid=%d nr_pages=%lu",
> + __entry->nid, __entry->zid, __entry->nr_pages)
> +);
> +
> +DEFINE_EVENT(mm_page_pcpu_zone_locked, mm_page_pcpu_refill_zone_locked,
> +
> + TP_PROTO(int nid, int zid, unsigned long nr_pages),
> +
> + TP_ARGS(nid, zid, nr_pages)
> +);
> +
> +DEFINE_EVENT(mm_page_pcpu_zone_locked, mm_page_pcpu_drain_zone_locked,
> +
> + TP_PROTO(int nid, int zid, unsigned long nr_pages),
> +
> + TP_ARGS(nid, zid, nr_pages)
> +);
> +
> +DECLARE_EVENT_CLASS(mm_page_pcpu,
>
> TP_PROTO(struct page *page, unsigned int order, int migratetype),
>
> TP_ARGS(page, order, migratetype),
>
> TP_STRUCT__entry(
> - __field( unsigned long, pfn )
> - __field( unsigned int, order )
> - __field( int, migratetype )
> + __field(unsigned long, pfn)
> + __field(unsigned int, order)
> + __field(int, migratetype)
Why this change? It makes it much harder to understand.
The above is not a normal macro. Ignore any checkpatch warnings about it.
The proper way to do the TP_STRUCT__entry() is to make it just like a struct:
struct {
unsigned long pfn;
unsigned int order;
int migratetype;
};
Thus, the macro should be:
TP_STRUCT__entry(
__field( unsigned long, pfn )
__field( unsigned int, order )
__field( int, migratetype )
),
-- Steve
> ),
>
^ permalink raw reply
* Re: [RFC PATCH 16/19] mm/damon: trace probe_hits
From: Steven Rostedt @ 2026-04-28 18:17 UTC (permalink / raw)
To: SeongJae Park
Cc: Andrew Morton, Masami Hiramatsu, Mathieu Desnoyers, damon,
linux-kernel, linux-mm, linux-trace-kernel
In-Reply-To: <20260426205222.93895-17-sj@kernel.org>
On Sun, 26 Apr 2026 13:52:17 -0700
SeongJae Park <sj@kernel.org> wrote:
> Introduce a new tracepoint for exposing the per-region per-probe
> positive sample count via tracefs.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> include/trace/events/damon.h | 41 ++++++++++++++++++++++++++++++++++++
> mm/damon/core.c | 1 +
> 2 files changed, 42 insertions(+)
>
> diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h
> index 7e25f4469b81b..121d7bc3a2c27 100644
> --- a/include/trace/events/damon.h
> +++ b/include/trace/events/damon.h
> @@ -130,6 +130,47 @@ TRACE_EVENT(damon_monitor_intervals_tune,
> TP_printk("sample_us=%lu", __entry->sample_us)
> );
>
> +TRACE_EVENT(damon_aggregated_v2,
> +
> + TP_PROTO(unsigned int target_id, struct damon_region *r,
> + unsigned int nr_regions),
> +
> + TP_ARGS(target_id, r, nr_regions),
> +
> + TP_STRUCT__entry(
> + __field(unsigned long, target_id)
> + __field(unsigned int, nr_regions)
Move the nr_regions to after "end" as on 64 bit machines, this creates a 4
byte hole.
-- Steve
> + __field(unsigned long, start)
> + __field(unsigned long, end)
> + __field(unsigned int, nr_accesses)
> + __field(unsigned int, age)
> + __field(unsigned char, probe_hit0)
> + __field(unsigned char, probe_hit1)
> + __field(unsigned char, probe_hit2)
> + __field(unsigned char, probe_hit3)
> + ),
> +
> + TP_fast_assign(
> + __entry->target_id = target_id;
> + __entry->nr_regions = nr_regions;
> + __entry->start = r->ar.start;
> + __entry->end = r->ar.end;
> + __entry->nr_accesses = r->nr_accesses;
> + __entry->age = r->age;
> + __entry->probe_hit0 = r->probe_hits[0];
> + __entry->probe_hit1 = r->probe_hits[1];
> + __entry->probe_hit2 = r->probe_hits[2];
> + __entry->probe_hit3 = r->probe_hits[3];
> + ),
> +
> + TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u %hhu %hhu %hhu %hhu",
> + __entry->target_id, __entry->nr_regions,
> + __entry->start, __entry->end,
> + __entry->nr_accesses, __entry->age,
> + __entry->probe_hit0, __entry->probe_hit1,
> + __entry->probe_hit2, __entry->probe_hit3)
> +);
> +
> TRACE_EVENT(damon_aggregated,
>
> TP_PROTO(unsigned int target_id, struct damon_region *r,
> diff --git a/mm/damon/core.c b/mm/damon/core.c
> index fe14971d72747..54834b74efef4 100644
> --- a/mm/damon/core.c
> +++ b/mm/damon/core.c
> @@ -1924,6 +1924,7 @@ static void kdamond_reset_aggregated(struct damon_ctx *c)
> int i;
>
> trace_damon_aggregated(ti, r, damon_nr_regions(t));
> + trace_damon_aggregated_v2(ti, r, damon_nr_regions(t));
> damon_warn_fix_nr_accesses_corruption(r);
> r->last_nr_accesses = r->nr_accesses;
> r->nr_accesses = 0;
^ permalink raw reply
* Re: [PATCH v5] tracing: Bound synthetic-field strings with seq_buf
From: Steven Rostedt @ 2026-04-28 17:32 UTC (permalink / raw)
To: Pengpeng Hou
Cc: Masami Hiramatsu, Mathieu Desnoyers, Tom Zanussi,
linux-trace-kernel, linux-kernel
In-Reply-To: <20260424070104.1-tracing-synth-v5-pengpeng@iscas.ac.cn>
I should have also mentioned. Please, new versions of a patch should always
start a new thread. Don't reply to the previous version. That makes it very
difficult to find which is the latest version.
On Thu, 23 Apr 2026 23:33:00 +0800
Pengpeng Hou <pengpeng@iscas.ac.cn> wrote:
> The synthetic field helpers build a prefixed synthetic variable name and
> a generated hist command in fixed MAX_FILTER_STR_VAL buffers. The
> current code appends those strings with raw strcat(), so long key lists,
> field names, or saved filters can run past the end of the staging
> buffers.
>
> Build both strings with seq_buf and propagate -E2BIG if either the
> synthetic variable name or the generated command exceeds
> MAX_FILTER_STR_VAL. This keeps the existing tracing-side limit while
> using the helper intended for bounded command construction.
>
> Fixes: 02205a6752f2 ("tracing: Add support for 'field variables'")
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> Changes since v4:
To keep a link to the previous version, use lore links to access it (the
message ID of the previous version attached to
"https://lore.kernel.org/all/$message-id")
Changes since v4: https://lore.kernel.org/all/20260417223001.1-tracing-synth-v4-pengpeng@iscas.ac.cn/
> - add the requested blank lines around seq_buf_str() comments
> - add the seq_buf_str() comment for the generated command buffer too
> - keep saved_filter scoped next to its point of use
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index 0dbbf6cca9bc..87429567417f 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -8,6 +8,7 @@
> #include <linux/module.h>
> #include <linux/kallsyms.h>
> #include <linux/security.h>
> +#include <linux/seq_buf.h>
> #include <linux/mutex.h>
> #include <linux/slab.h>
> #include <linux/stacktrace.h>
> @@ -2968,14 +2969,24 @@ find_synthetic_field_var(struct hist_trigger_data *target_hist_data,
> char *system, char *event_name, char *field_name)
> {
> struct hist_field *event_var;
> + struct seq_buf s;
> char *synthetic_name;
>
> synthetic_name = kzalloc(MAX_FILTER_STR_VAL, GFP_KERNEL);
> if (!synthetic_name)
> return ERR_PTR(-ENOMEM);
>
> - strcpy(synthetic_name, "synthetic_");
> - strcat(synthetic_name, field_name);
> + seq_buf_init(&s, synthetic_name, MAX_FILTER_STR_VAL);
> + seq_buf_puts(&s, "synthetic_");
> + seq_buf_puts(&s, field_name);
Hmm, the above is probably simpler with:
seq_buf_printf(&s, "synthetic_%s", field_name);
> +
> + /* Terminate synthetic_name with a NUL. */
> + seq_buf_str(&s);
> +
> + if (seq_buf_has_overflowed(&s)) {
> + kfree(synthetic_name);
> + return ERR_PTR(-E2BIG);
> + }
>
> event_var = find_event_var(target_hist_data, system, event_name, synthetic_name);
>
> @@ -3020,7 +3031,7 @@ create_field_var_hist(struct hist_trigger_data *target_hist_data,
> struct trace_event_file *file;
> struct hist_field *key_field;
> struct hist_field *event_var;
> - char *saved_filter;
Don't remove this for an anonymous block.
> + struct seq_buf s;
> char *cmd;
> int ret;
>
> @@ -3065,28 +3076,37 @@ create_field_var_hist(struct hist_trigger_data *target_hist_data,
> return ERR_PTR(-ENOMEM);
> }
>
> + seq_buf_init(&s, cmd, MAX_FILTER_STR_VAL);
> +
> /* Use the same keys as the compatible histogram */
> - strcat(cmd, "keys=");
> + seq_buf_puts(&s, "keys=");
>
> for_each_hist_key_field(i, hist_data) {
> key_field = hist_data->fields[i];
> if (!first)
> - strcat(cmd, ",");
> - strcat(cmd, key_field->field->name);
> + seq_buf_putc(&s, ',');
> + seq_buf_puts(&s, key_field->field->name);
> first = false;
> }
>
> /* Create the synthetic field variable specification */
> - strcat(cmd, ":synthetic_");
> - strcat(cmd, field_name);
> - strcat(cmd, "=");
> - strcat(cmd, field_name);
> + seq_buf_printf(&s, ":synthetic_%s=%s", field_name, field_name);
>
> /* Use the same filter as the compatible histogram */
> - saved_filter = find_trigger_filter(hist_data, file);
> - if (saved_filter) {
> - strcat(cmd, " if ");
> - strcat(cmd, saved_filter);
> + {
We don't add anonymous blocks in the kernel (with the exception of needing
to be around #ifdefs).
-- Steve
> + char *saved_filter = find_trigger_filter(hist_data, file);
> +
> + if (saved_filter)
> + seq_buf_printf(&s, " if %s", saved_filter);
> + }
> +
> + /* Terminate cmd with a NUL. */
> + seq_buf_str(&s);
> +
> + if (seq_buf_has_overflowed(&s)) {
> + kfree(cmd);
> + kfree(var_hist);
> + return ERR_PTR(-E2BIG);
> }
>
> var_hist->cmd = kstrdup(cmd, GFP_KERNEL);
^ permalink raw reply
* Re: [PATCH] trace: remove the dead IS_ERR() check in trace_pipe_open()
From: Steven Rostedt @ 2026-04-28 17:11 UTC (permalink / raw)
To: Yash Suthar; +Cc: mhiramat, mathieu.desnoyers, linux-kernel, linux-trace-kernel
In-Reply-To: <20260420101236.223919-1-yashsuthar983@gmail.com>
On Mon, 20 Apr 2026 15:42:36 +0530
Yash Suthar <yashsuthar983@gmail.com> wrote:
"remove the dead"? What is this? a horror flick? ;-)
The subsystem is "tracing" not "trace" and the first word should be
capitalized. I changed the subject to:
[PATCH] tracing: Remove redundant IS_ERR() check in trace_pipe_open()
And pulled it in.
When submitting changes to a subsystem, please do a git log --no-merges to
see how other commits are done in that subsystem.
Thanks,
-- Steve
> in trace_pipe_open() already check the IS_ERR(iter) and
> return early on error,so iter after will be valid and
> it is safe to return 0 at end.
>
> Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
> ---
> kernel/trace/trace_remote.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_remote.c b/kernel/trace/trace_remote.c
> index d6c3f94d67cd..2a6cc000ec98 100644
> --- a/kernel/trace/trace_remote.c
> +++ b/kernel/trace/trace_remote.c
> @@ -602,7 +602,7 @@ static int trace_pipe_open(struct inode *inode, struct file *filp)
>
> filp->private_data = iter;
>
> - return IS_ERR(iter) ? PTR_ERR(iter) : 0;
> + return 0;
> }
>
> static int trace_pipe_release(struct inode *inode, struct file *filp)
^ permalink raw reply
* [PATCH] tracing/probes: Limit size of event probe to 3K
From: Steven Rostedt @ 2026-04-28 16:23 UTC (permalink / raw)
To: LKML, Linux Trace Kernel; +Cc: Masami Hiramatsu, Mathieu Desnoyers
From: Steven Rostedt <rostedt@goodmis.org>
There currently isn't a max limit an event probe can be. One could make an
event greater than PAGE_SIZE, which makes the event useless because if
it's bigger than the max event that can be recorded into the ring buffer,
then it will never be recorded.
A event probe should never need to be greater than 3K, so make that the
max size. As long as the max is less than the max that can be recorded
onto the ring buffer, it should be fine.
Cc: stable@vger.kernel.org
Fixes: 93ccae7a22274 ("tracing/kprobes: Support basic types on dynamic events")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_probe.c | 6 ++++++
kernel/trace/trace_probe.h | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index e1c73065dae5..e0d3a0da26af 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -1523,6 +1523,12 @@ static int traceprobe_parse_probe_arg_body(const char *argv, ssize_t *size,
parg->offset = *size;
*size += parg->type->size * (parg->count ?: 1);
+ if (*size > MAX_PROBE_EVENT_SIZE) {
+ ret = -E2BIG;
+ trace_probe_log_err(ctx->offset, EVENT_TOO_BIG);
+ goto fail;
+ }
+
if (parg->count) {
len = strlen(parg->type->fmttype) + 6;
parg->fmt = kmalloc(len, GFP_KERNEL);
diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
index 9fc56c937130..262d8707a3df 100644
--- a/kernel/trace/trace_probe.h
+++ b/kernel/trace/trace_probe.h
@@ -38,6 +38,7 @@
#define MAX_BTF_ARGS_LEN 128
#define MAX_DENTRY_ARGS_LEN 256
#define MAX_STRING_SIZE PATH_MAX
+#define MAX_PROBE_EVENT_SIZE 3072
/* Reserved field names */
#define FIELD_STRING_IP "__probe_ip"
@@ -561,7 +562,8 @@ extern int traceprobe_define_arg_fields(struct trace_event_call *event_call,
C(BAD_TYPE4STR, "This type does not fit for string."),\
C(NEED_STRING_TYPE, "$comm and immediate-string only accepts string type"),\
C(TOO_MANY_ARGS, "Too many arguments are specified"), \
- C(TOO_MANY_EARGS, "Too many entry arguments specified"),
+ C(TOO_MANY_EARGS, "Too many entry arguments specified"), \
+ C(EVENT_TOO_BIG, "Event too big (too many fields?)"),
#undef C
#define C(a, b) TP_ERR_##a
--
2.53.0
^ permalink raw reply related
* Re: [RFC PATCH 00/12] rv: Add selftests to tools and KUnit tests
From: Gabriele Monaco @ 2026-04-28 15:27 UTC (permalink / raw)
To: Wen Yang, linux-trace-kernel, linux-kernel
Cc: Steven Rostedt, Nam Cao, Thomas Weissschuh, Tomas Glozar,
John Kacur
In-Reply-To: <d0c1fe9d-8d51-4c4f-897b-45444de1286d@linux.dev>
Hi Wen,
thanks for the review!
On Tue, 2026-04-28 at 23:09 +0800, Wen Yang wrote:
> Hi Gabriele,
>
> Good direction overall. The approach of calling event handlers
> directly inside KUnit is clean and avoids the complexity of setting
> up real tracepoints. Patches 1-4 (bug fixes) look correct.
>
> We are planning to build the KUnit and selftest coverage for the tlob
> monitor on top of this infrastructure, so getting this merged would
> be useful for us as well.
Great, for the time being, feel free to either base your work on this
series or only focus on the test cases, whichever is more comfortable
for you.
The RV kernel-side selftests are already upstream so that won't be a
blocker anyway.
> - One issue found in the KUnit patches:
>
> patch 10: nomiss test
> kernel/trace/rv/monitors/nomiss/nomiss.c:
> udelay(10 / 1000);
>
> The compiler folds it silently as udelay(0).
> Presumably intended as udelay(10)?
>
Yes, that was quite a dumb oversight..
> - minor: copyright year range
> rv_monitors_test.c: Copyright (C) 2025-2028
> kunit_stubs.h: Copyright (C) 2026-2029
>
> Kernel copyright entries conventionally use only the year(s) the
> work
> was actually created,eg:
> https://lkml.indiana.edu/2510.0/01897.html
>
Right, I didn't notice that! Will update for the next submission.
>
> Reviewed-by: Wen Yang <wen.yang@linux.dev>
>
Thanks,
Gabriele
> --
> Best wishes,
> Wen
>
>
> > To: linux-trace-kernel@vger.kernel.org
> > To: linux-kernel@vger.kernel.org
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Nam Cao <namcao@linutronix.de>
> > Cc: Thomas Weissschuh <thomas.weissschuh@linutronix.de>
> > Cc: Tomas Glozar <tglozar@redhat.com>
> > Cc: John Kacur <jkacur@redhat.com>
> > Cc: Wen Yang <wen.yang@linux.dev>
> >
> > Gabriele Monaco (12):
> > tools/rv: Fix substring match bug in monitor name search
> > tools/rv: Fix substring match when listing container monitors
> > tools/rv: Fix exit status when monitor execution fails
> > tools/rv: Fix cleanup after failed trace setup
> > tools/rv: Add selftests
> > verification/rvgen: Fix options shared among commands
> > verification/rvgen: Add golden and spec folders for tests
> > verification/rvgen: Add selftests
> > rv: Add KUnit stub to rv_react() and rv_*_task_monitor_slot()
> > rv: Add KUnit tests for some DA/HA monitors
> > rv: Add KUnit stubs for current and smp_processor_id()
> > rv: Add KUnit tests for some LTL monitors
> >
> > include/rv/da_monitor.h | 32 +++
> > include/rv/kunit_stubs.h | 17 ++
> > include/rv/ltl_monitor.h | 32 +++
> > kernel/trace/rv/Kconfig | 14 +
> > kernel/trace/rv/Makefile | 3 +
> > kernel/trace/rv/monitors/nomiss/nomiss.c | 30 +++
> > kernel/trace/rv/monitors/opid/opid.c | 27 ++
> > .../trace/rv/monitors/pagefault/pagefault.c | 26 +-
> > kernel/trace/rv/monitors/sco/sco.c | 23 ++
> > kernel/trace/rv/monitors/sleep/sleep.c | 64 ++++-
> > kernel/trace/rv/monitors/sssw/sssw.c | 27 ++
> > kernel/trace/rv/monitors/sts/sts.c | 35 +++
> > kernel/trace/rv/rv.c | 5 +
> > kernel/trace/rv/rv_monitors_test.c | 99 +++++++
> > kernel/trace/rv/rv_monitors_test.h | 90 +++++++
> > kernel/trace/rv/rv_reactors.c | 3 +
> > tools/verification/rv/Makefile | 5 +-
> > tools/verification/rv/src/in_kernel.c | 58 ++--
> > tools/verification/rv/src/rv.c | 2 +-
> > tools/verification/rv/tests/rv_list.t | 48 ++++
> > tools/verification/rv/tests/rv_mon.t | 95 +++++++
> > tools/verification/rvgen/Makefile | 4 +
> > tools/verification/rvgen/__main__.py | 10 +-
> > .../rvgen/tests/golden/da_global/Kconfig | 9 +
> > .../rvgen/tests/golden/da_global/da_global.c | 95 +++++++
> > .../rvgen/tests/golden/da_global/da_global.h | 47 ++++
> > .../tests/golden/da_global/da_global_trace.h | 15 ++
> > .../tests/golden/da_perobj_parent/Kconfig | 11 +
> > .../da_perobj_parent/da_perobj_parent.c | 110 ++++++++
> > .../da_perobj_parent/da_perobj_parent.h | 64 +++++
> > .../da_perobj_parent/da_perobj_parent_trace.h | 15 ++
> > .../tests/golden/da_pertask_desc/Kconfig | 9 +
> > .../golden/da_pertask_desc/da_pertask_desc.c | 105 ++++++++
> > .../golden/da_pertask_desc/da_pertask_desc.h | 64 +++++
> > .../da_pertask_desc/da_pertask_desc_trace.h | 15 ++
> > .../rvgen/tests/golden/ha_percpu/Kconfig | 9 +
> > .../rvgen/tests/golden/ha_percpu/ha_percpu.c | 244
> > +++++++++++++++++
> > .../rvgen/tests/golden/ha_percpu/ha_percpu.h | 72 +++++
> > .../tests/golden/ha_percpu/ha_percpu_trace.h | 19 ++
> > .../rvgen/tests/golden/ltl_pertask/Kconfig | 9 +
> > .../tests/golden/ltl_pertask/ltl_pertask.c | 107 ++++++++
> > .../tests/golden/ltl_pertask/ltl_pertask.h | 108 ++++++++
> > .../golden/ltl_pertask/ltl_pertask_trace.h | 14 +
> > .../rvgen/tests/golden/test_container/Kconfig | 5 +
> > .../golden/test_container/test_container.c | 35 +++
> > .../golden/test_container/test_container.h | 3 +
> > .../rvgen/tests/golden/test_da/Kconfig | 9 +
> > .../rvgen/tests/golden/test_da/test_da.c | 95 +++++++
> > .../rvgen/tests/golden/test_da/test_da.h | 47 ++++
> > .../tests/golden/test_da/test_da_trace.h | 15 ++
> > .../rvgen/tests/golden/test_ha/Kconfig | 9 +
> > .../rvgen/tests/golden/test_ha/test_ha.c | 247
> > ++++++++++++++++++
> > .../rvgen/tests/golden/test_ha/test_ha.h | 72 +++++
> > .../tests/golden/test_ha/test_ha_trace.h | 19 ++
> > .../rvgen/tests/golden/test_ltl/Kconfig | 11 +
> > .../rvgen/tests/golden/test_ltl/test_ltl.c | 108 ++++++++
> > .../rvgen/tests/golden/test_ltl/test_ltl.h | 108 ++++++++
> > .../tests/golden/test_ltl/test_ltl_trace.h | 14 +
> > .../rvgen/tests/rvgen_container.t | 20 ++
> > .../verification/rvgen/tests/rvgen_monitor.t | 87 ++++++
> > .../rvgen/tests/specs/test_da.dot | 16 ++
> > .../rvgen/tests/specs/test_da2.dot | 18 ++
> > .../rvgen/tests/specs/test_ha.dot | 27 ++
> > .../rvgen/tests/specs/test_invalid.dot | 8 +
> > .../rvgen/tests/specs/test_invalid.ltl | 1 +
> > .../rvgen/tests/specs/test_invalid_ha.dot | 16 ++
> > .../rvgen/tests/specs/test_ltl.ltl | 1 +
> > tools/verification/tests/engine.sh | 156 +++++++++++
> > 68 files changed, 2993 insertions(+), 44 deletions(-)
> > create mode 100644 include/rv/kunit_stubs.h
> > create mode 100644 kernel/trace/rv/rv_monitors_test.c
> > create mode 100644 kernel/trace/rv/rv_monitors_test.h
> > create mode 100644 tools/verification/rv/tests/rv_list.t
> > create mode 100644 tools/verification/rv/tests/rv_mon.t
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_global/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_global/da_global.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_global/da_global.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_global/da_global_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_perobj_parent/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_perobj_parent/da_perobj_pa
> > rent.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_perobj_parent/da_perobj_pa
> > rent.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_perobj_parent/da_perobj_pa
> > rent_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_pertask_desc/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_pertask_desc/da_pertask_de
> > sc.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_pertask_desc/da_pertask_de
> > sc.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/da_pertask_desc/da_pertask_de
> > sc_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ha_percpu/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ltl_pertask/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ltl_pertask/ltl_pertask.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ltl_pertask/ltl_pertask.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/ltl_pertask/ltl_pertask_trace
> > .h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_container/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_container/test_container
> > .c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_container/test_container
> > .h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_da/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_da/test_da.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_da/test_da.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_da/test_da_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ha/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ha/test_ha.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ha/test_ha.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ha/test_ha_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ltl/Kconfig
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ltl/test_ltl.c
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ltl/test_ltl.h
> > create mode 100644
> > tools/verification/rvgen/tests/golden/test_ltl/test_ltl_trace.h
> > create mode 100644
> > tools/verification/rvgen/tests/rvgen_container.t
> > create mode 100644 tools/verification/rvgen/tests/rvgen_monitor.t
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_da.dot
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_da2.dot
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_ha.dot
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_invalid.dot
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_invalid.ltl
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_invalid_ha.dot
> > create mode 100644
> > tools/verification/rvgen/tests/specs/test_ltl.ltl
> > create mode 100644 tools/verification/tests/engine.sh
> >
> >
> > base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
^ permalink raw reply
* Re: [RFC PATCH 00/12] rv: Add selftests to tools and KUnit tests
From: Wen Yang @ 2026-04-28 15:09 UTC (permalink / raw)
To: Gabriele Monaco, linux-trace-kernel, linux-kernel
Cc: Steven Rostedt, Nam Cao, Thomas Weissschuh, Tomas Glozar,
John Kacur
In-Reply-To: <20260427151134.192971-1-gmonaco@redhat.com>
On 4/27/26 23:11, Gabriele Monaco wrote:
> This series adds support to the make check target in the rv userspace
> tool and the rvgen script, this allows to quickly validate its
> functionality. The selftest framework is inspired by the one used in
> RTLA.
>
> A few bugs in both tools were also discovered and are fixed as part of
> this series.
>
> Additionally it adds unit tests for models. This is achieved by running
> the handlers functions directly within KUnit, emulating all modules
> paths as if real kernel events fired.
>
> Unit tests emulate a series of events that are expected to trigger
> violations and checks that a reaction occurred, stub structs and
> functions are used so the kernel is not affected by the test.
>
Hi Gabriele,
Good direction overall. The approach of calling event handlers directly
inside KUnit is clean and avoids the complexity of setting up real
tracepoints. Patches 1-4 (bug fixes) look correct.
We are planning to build the KUnit and selftest coverage for the tlob
monitor on top of this infrastructure, so getting this merged would be
useful for us as well.
- One issue found in the KUnit patches:
patch 10: nomiss test
kernel/trace/rv/monitors/nomiss/nomiss.c:
udelay(10 / 1000);
The compiler folds it silently as udelay(0).
Presumably intended as udelay(10)?
- minor: copyright year range
rv_monitors_test.c: Copyright (C) 2025-2028
kunit_stubs.h: Copyright (C) 2026-2029
Kernel copyright entries conventionally use only the year(s) the work
was actually created,eg:
https://lkml.indiana.edu/2510.0/01897.html
Reviewed-by: Wen Yang <wen.yang@linux.dev>
--
Best wishes,
Wen
> To: linux-trace-kernel@vger.kernel.org
> To: linux-kernel@vger.kernel.org
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Nam Cao <namcao@linutronix.de>
> Cc: Thomas Weissschuh <thomas.weissschuh@linutronix.de>
> Cc: Tomas Glozar <tglozar@redhat.com>
> Cc: John Kacur <jkacur@redhat.com>
> Cc: Wen Yang <wen.yang@linux.dev>
>
> Gabriele Monaco (12):
> tools/rv: Fix substring match bug in monitor name search
> tools/rv: Fix substring match when listing container monitors
> tools/rv: Fix exit status when monitor execution fails
> tools/rv: Fix cleanup after failed trace setup
> tools/rv: Add selftests
> verification/rvgen: Fix options shared among commands
> verification/rvgen: Add golden and spec folders for tests
> verification/rvgen: Add selftests
> rv: Add KUnit stub to rv_react() and rv_*_task_monitor_slot()
> rv: Add KUnit tests for some DA/HA monitors
> rv: Add KUnit stubs for current and smp_processor_id()
> rv: Add KUnit tests for some LTL monitors
>
> include/rv/da_monitor.h | 32 +++
> include/rv/kunit_stubs.h | 17 ++
> include/rv/ltl_monitor.h | 32 +++
> kernel/trace/rv/Kconfig | 14 +
> kernel/trace/rv/Makefile | 3 +
> kernel/trace/rv/monitors/nomiss/nomiss.c | 30 +++
> kernel/trace/rv/monitors/opid/opid.c | 27 ++
> .../trace/rv/monitors/pagefault/pagefault.c | 26 +-
> kernel/trace/rv/monitors/sco/sco.c | 23 ++
> kernel/trace/rv/monitors/sleep/sleep.c | 64 ++++-
> kernel/trace/rv/monitors/sssw/sssw.c | 27 ++
> kernel/trace/rv/monitors/sts/sts.c | 35 +++
> kernel/trace/rv/rv.c | 5 +
> kernel/trace/rv/rv_monitors_test.c | 99 +++++++
> kernel/trace/rv/rv_monitors_test.h | 90 +++++++
> kernel/trace/rv/rv_reactors.c | 3 +
> tools/verification/rv/Makefile | 5 +-
> tools/verification/rv/src/in_kernel.c | 58 ++--
> tools/verification/rv/src/rv.c | 2 +-
> tools/verification/rv/tests/rv_list.t | 48 ++++
> tools/verification/rv/tests/rv_mon.t | 95 +++++++
> tools/verification/rvgen/Makefile | 4 +
> tools/verification/rvgen/__main__.py | 10 +-
> .../rvgen/tests/golden/da_global/Kconfig | 9 +
> .../rvgen/tests/golden/da_global/da_global.c | 95 +++++++
> .../rvgen/tests/golden/da_global/da_global.h | 47 ++++
> .../tests/golden/da_global/da_global_trace.h | 15 ++
> .../tests/golden/da_perobj_parent/Kconfig | 11 +
> .../da_perobj_parent/da_perobj_parent.c | 110 ++++++++
> .../da_perobj_parent/da_perobj_parent.h | 64 +++++
> .../da_perobj_parent/da_perobj_parent_trace.h | 15 ++
> .../tests/golden/da_pertask_desc/Kconfig | 9 +
> .../golden/da_pertask_desc/da_pertask_desc.c | 105 ++++++++
> .../golden/da_pertask_desc/da_pertask_desc.h | 64 +++++
> .../da_pertask_desc/da_pertask_desc_trace.h | 15 ++
> .../rvgen/tests/golden/ha_percpu/Kconfig | 9 +
> .../rvgen/tests/golden/ha_percpu/ha_percpu.c | 244 +++++++++++++++++
> .../rvgen/tests/golden/ha_percpu/ha_percpu.h | 72 +++++
> .../tests/golden/ha_percpu/ha_percpu_trace.h | 19 ++
> .../rvgen/tests/golden/ltl_pertask/Kconfig | 9 +
> .../tests/golden/ltl_pertask/ltl_pertask.c | 107 ++++++++
> .../tests/golden/ltl_pertask/ltl_pertask.h | 108 ++++++++
> .../golden/ltl_pertask/ltl_pertask_trace.h | 14 +
> .../rvgen/tests/golden/test_container/Kconfig | 5 +
> .../golden/test_container/test_container.c | 35 +++
> .../golden/test_container/test_container.h | 3 +
> .../rvgen/tests/golden/test_da/Kconfig | 9 +
> .../rvgen/tests/golden/test_da/test_da.c | 95 +++++++
> .../rvgen/tests/golden/test_da/test_da.h | 47 ++++
> .../tests/golden/test_da/test_da_trace.h | 15 ++
> .../rvgen/tests/golden/test_ha/Kconfig | 9 +
> .../rvgen/tests/golden/test_ha/test_ha.c | 247 ++++++++++++++++++
> .../rvgen/tests/golden/test_ha/test_ha.h | 72 +++++
> .../tests/golden/test_ha/test_ha_trace.h | 19 ++
> .../rvgen/tests/golden/test_ltl/Kconfig | 11 +
> .../rvgen/tests/golden/test_ltl/test_ltl.c | 108 ++++++++
> .../rvgen/tests/golden/test_ltl/test_ltl.h | 108 ++++++++
> .../tests/golden/test_ltl/test_ltl_trace.h | 14 +
> .../rvgen/tests/rvgen_container.t | 20 ++
> .../verification/rvgen/tests/rvgen_monitor.t | 87 ++++++
> .../rvgen/tests/specs/test_da.dot | 16 ++
> .../rvgen/tests/specs/test_da2.dot | 18 ++
> .../rvgen/tests/specs/test_ha.dot | 27 ++
> .../rvgen/tests/specs/test_invalid.dot | 8 +
> .../rvgen/tests/specs/test_invalid.ltl | 1 +
> .../rvgen/tests/specs/test_invalid_ha.dot | 16 ++
> .../rvgen/tests/specs/test_ltl.ltl | 1 +
> tools/verification/tests/engine.sh | 156 +++++++++++
> 68 files changed, 2993 insertions(+), 44 deletions(-)
> create mode 100644 include/rv/kunit_stubs.h
> create mode 100644 kernel/trace/rv/rv_monitors_test.c
> create mode 100644 kernel/trace/rv/rv_monitors_test.h
> create mode 100644 tools/verification/rv/tests/rv_list.t
> create mode 100644 tools/verification/rv/tests/rv_mon.t
> create mode 100644 tools/verification/rvgen/tests/golden/da_global/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/da_global/da_global.c
> create mode 100644 tools/verification/rvgen/tests/golden/da_global/da_global.h
> create mode 100644 tools/verification/rvgen/tests/golden/da_global/da_global_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/da_perobj_parent/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/da_perobj_parent/da_perobj_parent.c
> create mode 100644 tools/verification/rvgen/tests/golden/da_perobj_parent/da_perobj_parent.h
> create mode 100644 tools/verification/rvgen/tests/golden/da_perobj_parent/da_perobj_parent_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/da_pertask_desc/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/da_pertask_desc/da_pertask_desc.c
> create mode 100644 tools/verification/rvgen/tests/golden/da_pertask_desc/da_pertask_desc.h
> create mode 100644 tools/verification/rvgen/tests/golden/da_pertask_desc/da_pertask_desc_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/ha_percpu/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu.c
> create mode 100644 tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu.h
> create mode 100644 tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/ltl_pertask/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/ltl_pertask/ltl_pertask.c
> create mode 100644 tools/verification/rvgen/tests/golden/ltl_pertask/ltl_pertask.h
> create mode 100644 tools/verification/rvgen/tests/golden/ltl_pertask/ltl_pertask_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_container/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/test_container/test_container.c
> create mode 100644 tools/verification/rvgen/tests/golden/test_container/test_container.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_da/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/test_da/test_da.c
> create mode 100644 tools/verification/rvgen/tests/golden/test_da/test_da.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_da/test_da_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_ha/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/test_ha/test_ha.c
> create mode 100644 tools/verification/rvgen/tests/golden/test_ha/test_ha.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_ha/test_ha_trace.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_ltl/Kconfig
> create mode 100644 tools/verification/rvgen/tests/golden/test_ltl/test_ltl.c
> create mode 100644 tools/verification/rvgen/tests/golden/test_ltl/test_ltl.h
> create mode 100644 tools/verification/rvgen/tests/golden/test_ltl/test_ltl_trace.h
> create mode 100644 tools/verification/rvgen/tests/rvgen_container.t
> create mode 100644 tools/verification/rvgen/tests/rvgen_monitor.t
> create mode 100644 tools/verification/rvgen/tests/specs/test_da.dot
> create mode 100644 tools/verification/rvgen/tests/specs/test_da2.dot
> create mode 100644 tools/verification/rvgen/tests/specs/test_ha.dot
> create mode 100644 tools/verification/rvgen/tests/specs/test_invalid.dot
> create mode 100644 tools/verification/rvgen/tests/specs/test_invalid.ltl
> create mode 100644 tools/verification/rvgen/tests/specs/test_invalid_ha.dot
> create mode 100644 tools/verification/rvgen/tests/specs/test_ltl.ltl
> create mode 100644 tools/verification/tests/engine.sh
>
>
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
^ permalink raw reply
* Re: [PATCH v2] tracing: export live module tracepoint strings in printk_formats
From: Steven Rostedt @ 2026-04-28 12:39 UTC (permalink / raw)
To: Cao Ruichuang
Cc: petr.pavlu, linux-trace-kernel, linux-kernel, Luis Chamberlain,
Daniel Gomez, Sami Tolvanen
In-Reply-To: <20260420061911.97066-1-create0818@163.com>
[ Adding more module maintainers ]
Note, tracing subsystem uses capital letters in subject:
[PATCH v2] tracing: Export live module tracepoint strings in printk_formats
On Mon, 20 Apr 2026 14:19:11 +0800
Cao Ruichuang <create0818@163.com> wrote:
> tracepoint_string() documents that its strings are exported through
> printk_formats so that user space can decode pointer fields recorded in
> trace buffers.
>
> That already works for built-in __tracepoint_str entries, but module
> __tracepoint_str sections are not collected or exported today. As a
> result, module tracepoint_string() users still show raw pointer values
> in printk_formats consumers such as trace.dat decoders.
>
> Record module __tracepoint_str sections when modules are loaded, expose
> their live ranges through printk_formats, and teach
> trace_is_tracepoint_string() to accept those live module strings too.
>
> Keep the lifetime semantics tied to the module itself. This does not
> copy strings into tracing-owned storage and does not preserve the
> mappings after module unload.
>
> On MODULE_STATE_GOING, the live module string ranges are removed again.
> This relies on the existing tracing module notifier ordering: trace
> event teardown runs first and resets module event buffers before these
> auxiliary string mappings are dropped.
>
> If the small auxiliary registry allocation fails, warn and continue
> loading the module. printk_formats exposure is degraded in that case,
> but tracing should not fail module load for missing debug metadata.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217196
> Assisted-by: Codex:GPT-5.4
> Signed-off-by: Cao Ruichuang <create0818@163.com>
> ---
> v2:
> - replace the previous copied-string approach with live module section ranges
> - record module __tracepoint_str ranges in struct module
> - export only live module tracepoint strings in printk_formats
> - remove module mappings on MODULE_STATE_GOING
> - keep auxiliary registry allocation failure non-fatal and warn instead
> - add explicit notifier priority and document the teardown ordering dependency
>
> Tested in QEMU:
> - basic repro showing module tracepoint_string() entries in printk_formats
> - load/unload validation confirming mappings are removed after rmmod
> - failed module init after MODULE_STATE_COMING with no stale mapping left
> - targeted failslab injection on the notifier-time auxiliary allocation,
> confirming module load still succeeds, a warning is emitted, and the
> module mapping is not exported
>
> include/linux/module.h | 2 +
> kernel/module/main.c | 4 +
> kernel/trace/trace_printk.c | 153 ++++++++++++++++++++++++++++++++++--
> 3 files changed, 152 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/module.h b/include/linux/module.h
> index 14f391b186c..e475466a785 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -515,6 +515,8 @@ struct module {
> #ifdef CONFIG_TRACING
> unsigned int num_trace_bprintk_fmt;
> const char **trace_bprintk_fmt_start;
> + unsigned int num_tracepoint_strings;
> + const char **tracepoint_strings_start;
Would be more compact on 64 bit systems to put the two ints together.
unsigned int num_trace_bprintk_fmt;
unsigned int num_tracepoint_strings;
const char **trace_bprintk_fmt_start;
const char **tracepoint_strings_start;
> #endif
> #ifdef CONFIG_EVENT_TRACING
> struct trace_event_call **trace_events;
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index c3ce106c70a..d7d890138ac 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -2672,6 +2672,10 @@ static int find_module_sections(struct module *mod, struct load_info *info)
> mod->trace_bprintk_fmt_start = section_objs(info, "__trace_printk_fmt",
> sizeof(*mod->trace_bprintk_fmt_start),
> &mod->num_trace_bprintk_fmt);
> + mod->tracepoint_strings_start =
> + section_objs(info, "__tracepoint_str",
> + sizeof(*mod->tracepoint_strings_start),
> + &mod->num_tracepoint_strings);
> #endif
> #ifdef CONFIG_DYNAMIC_FTRACE
> /* sechdrs[0].sh_size is always zero */
> diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
> index 5ea5e0d76f0..2d41b0a63b3 100644
> --- a/kernel/trace/trace_printk.c
> +++ b/kernel/trace/trace_printk.c
> @@ -13,6 +13,7 @@
> #include <linux/string.h>
> #include <linux/module.h>
> #include <linux/mutex.h>
> +#include <linux/rcupdate.h>
> #include <linux/ctype.h>
> #include <linux/list.h>
> #include <linux/slab.h>
> @@ -24,10 +25,15 @@
> /*
> * modules trace_printk()'s formats are autosaved in struct trace_bprintk_fmt
> * which are queued on trace_bprintk_fmt_list.
> + *
> + * modules tracepoint_string() entries are kept as ranges into the owning
> + * module's __tracepoint_str section and are removed again when the module
> + * goes away.
> */
> static LIST_HEAD(trace_bprintk_fmt_list);
> +static LIST_HEAD(tracepoint_str_list);
>
> -/* serialize accesses to trace_bprintk_fmt_list */
> +/* serialize accesses to module trace printk and tracepoint string lists */
> static DEFINE_MUTEX(btrace_mutex);
>
> struct trace_bprintk_fmt {
> @@ -35,6 +41,13 @@ struct trace_bprintk_fmt {
> const char *fmt;
> };
>
> +struct tracepoint_mod_str {
> + struct list_head list;
Perhaps add a rcu_head here?
> + struct module *mod;
> + const char **start;
> + unsigned int num;
> +};
> +
> static inline struct trace_bprintk_fmt *lookup_format(const char *fmt)
> {
> struct trace_bprintk_fmt *pos;
> @@ -85,16 +98,70 @@ void hold_module_trace_bprintk_format(const char **start, const char **end)
> mutex_unlock(&btrace_mutex);
> }
>
> +static void hold_module_tracepoint_strings(struct module *mod)
> +{
> + struct tracepoint_mod_str *tp_str;
> +
> + if (!mod->num_tracepoint_strings)
> + return;
> +
> + tp_str = kmalloc_obj(*tp_str);
> + if (!tp_str) {
> + pr_warn("tracing: Failed to expose module tracepoint strings for %s\n",
> + mod->name);
> + return;
> + }
> +
> + tp_str->mod = mod;
> + tp_str->start = mod->tracepoint_strings_start;
> + tp_str->num = mod->num_tracepoint_strings;
> +
> + mutex_lock(&btrace_mutex);
> + list_add_tail_rcu(&tp_str->list, &tracepoint_str_list);
> + mutex_unlock(&btrace_mutex);
> +}
> +
> +static void release_module_tracepoint_strings(struct module *mod)
> +{
> + struct tracepoint_mod_str *tp_str, *next;
> + struct tracepoint_mod_str *found = NULL;
> +
> + mutex_lock(&btrace_mutex);
> + list_for_each_entry_safe(tp_str, next, &tracepoint_str_list, list) {
> + if (tp_str->mod != mod)
> + continue;
> +
> + list_del_rcu(&tp_str->list);
Does this really need to be rcu protected? (See below).
> + found = tp_str;
> + break;
> + }
> + mutex_unlock(&btrace_mutex);
> +
> + if (found) {
> + synchronize_rcu();
> + kfree(found);
Should use kfree_rcu() to not slow down module unload anymore than needed
(hence the need for the rcu_head above). But if we keep it used under the
mutex instead of RCU, we don't even need to do that.
And honestly, the iteration happens only on module load, so the only time
the read would intersect with the write is if a module was being loaded at
the same time another module was being unloaded. I don't think that can
happen.
> + }
> +}
> +
> static int module_trace_bprintk_format_notify(struct notifier_block *self,
> unsigned long val, void *data)
> {
> struct module *mod = data;
> - if (mod->num_trace_bprintk_fmt) {
> - const char **start = mod->trace_bprintk_fmt_start;
> - const char **end = start + mod->num_trace_bprintk_fmt;
>
> - if (val == MODULE_STATE_COMING)
> + switch (val) {
> + case MODULE_STATE_COMING:
> + if (mod->num_trace_bprintk_fmt) {
> + const char **start = mod->trace_bprintk_fmt_start;
> + const char **end = start + mod->num_trace_bprintk_fmt;
> +
> hold_module_trace_bprintk_format(start, end);
> + }
> + hold_module_tracepoint_strings(mod);
> + break;
> + case MODULE_STATE_GOING:
> + /* trace event teardown runs first and clears module event buffers. */
> + release_module_tracepoint_strings(mod);
> + break;
> }
> return NOTIFY_OK;
> }
> @@ -159,6 +226,55 @@ find_next_mod_format(int start_index, void *v, const char **fmt, loff_t *pos)
> return &mod_fmt->fmt;
> }
>
> +static int count_mod_formats(void)
> +{
> + struct trace_bprintk_fmt *p;
> + int count = 0;
> +
> + list_for_each_entry(p, &trace_bprintk_fmt_list, list)
> + count++;
This counter needs to be stored somewhere and not calculated every time.
int trace_bprintk_fmt_cnt;
And updated on creation and deletion.
> +
> + return count;
> +}
> +
> +static const char **
> +find_next_mod_tracepoint_str(int start_index, loff_t *pos)
> +{
> + struct tracepoint_mod_str *tp_str;
> + int index = start_index;
> + unsigned int i;
> +
> + list_for_each_entry(tp_str, &tracepoint_str_list, list) {
> + for (i = 0; i < tp_str->num; i++) {
> + if (index == *pos)
> + return tp_str->start + i;
> + index++;
> + }
The above is horribly inefficient. Should have:
list_for_each_entry(tp_str, &tracepoint_str_list, list) {
if (index + tp_str->num <= *pos) {
index += tp_str->num;
continue;
}
for (i = 0; i < tp_str->num; i++) {
if (index == *pos)
return tp_str->start + i;
index++;
}
/* Should not hit here */
WARN_ONCE(1);
return NULL;
}
> + }
> +
> + return NULL;
> +}
> +
> +static bool is_module_tracepoint_string(const char *str)
> +{
> + struct tracepoint_mod_str *tp_str;
> + unsigned int i;
> + bool found = false;
> +
> + rcu_read_lock();
This is not a fast path, why not take the btrace_mutex?
Either way, for rcu, this should be:
guard(rcu)();
or for the mutex:
guard(mutex)(&btrace_mutex);
> + list_for_each_entry_rcu(tp_str, &tracepoint_str_list, list) {
> + for (i = 0; i < tp_str->num; i++) {
> + if (str == tp_str->start[i]) {
> + found = true;
This should be:
return true;
> + goto out;
> + }
> + }
> + }
Remove the below and have:
return false;
-- Steve
> +out:
> + rcu_read_unlock();
> + return found;
> +}
> +
> static void format_mod_start(void)
> {
> mutex_lock(&btrace_mutex);
> @@ -181,6 +297,22 @@ find_next_mod_format(int start_index, void *v, const char **fmt, loff_t *pos)
> {
> return NULL;
> }
> +
> +static inline int count_mod_formats(void)
> +{
> + return 0;
> +}
> +
> +static inline const char **
> +find_next_mod_tracepoint_str(int start_index, loff_t *pos)
> +{
> + return NULL;
> +}
> +
> +static inline bool is_module_tracepoint_string(const char *str)
> +{
> + return false;
> +}
> static inline void format_mod_start(void) { }
> static inline void format_mod_stop(void) { }
> #endif /* CONFIG_MODULES */
> @@ -195,6 +327,7 @@ void trace_printk_control(bool enabled)
> __initdata_or_module static
> struct notifier_block module_trace_bprintk_format_nb = {
> .notifier_call = module_trace_bprintk_format_notify,
> + .priority = 0,
> };
>
> int __trace_bprintk(unsigned long ip, const char *fmt, ...)
> @@ -259,12 +392,13 @@ bool trace_is_tracepoint_string(const char *str)
> if (str == *ptr)
> return true;
> }
> - return false;
> + return is_module_tracepoint_string(str);
> }
>
> static const char **find_next(void *v, loff_t *pos)
> {
> const char **fmt = v;
> + int mod_formats;
> int start_index;
> int last_index;
>
> @@ -292,7 +426,12 @@ static const char **find_next(void *v, loff_t *pos)
> return __start___tracepoint_str + (*pos - last_index);
>
> start_index += last_index;
> - return find_next_mod_format(start_index, v, fmt, pos);
> + mod_formats = count_mod_formats();
> + if (*pos < start_index + mod_formats)
> + return find_next_mod_format(start_index, v, fmt, pos);
> +
> + start_index += mod_formats;
> + return find_next_mod_tracepoint_str(start_index, pos);
> }
>
> static void *
^ permalink raw reply
* Re: [PATCH v2] Documentation/rv: Replace stale website link
From: Matteo Martelli @ 2026-04-28 9:11 UTC (permalink / raw)
To: Gabriele Monaco, rdunlap, Steven Rostedt, Gabriele Monaco,
Jonathan Corbet, linux-trace-kernel, linux-doc, linux-kernel
Cc: skhan
In-Reply-To: <20260427131709.170505-2-gmonaco@redhat.com>
Hi Gabriele,
On Mon, 27 Apr 2026 15:17:09 +0200, Gabriele Monaco <gmonaco@redhat.com> wrote:
> The sched monitor page was linking to Daniel's website which is now
> down. The main purpose of the link was to point to a source for the
> models from the original author and that can be found also in his
> published paper.
>
> Replace the link with a reference to Daniel's "A thread synchronization
> model for the PREEMPT_RT Linux kernel" which can be found online and
> includes the models definitions as well as the work behind them (not the
> original patches but since they're based on a 5.0 kernel and are mostly
> included upstream, there's little value in keeping them in the docs).
>
> Fixes: 03abeaa63c08 ("Documentation/rv: Add docs for the sched monitors")
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
> ---
> V2: Add link to the PDF and fixed RST references
>
> Documentation/trace/rv/monitor_sched.rst | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/trace/rv/monitor_sched.rst b/Documentation/trace/rv/monitor_sched.rst
> index 0b96d6e147c6..d3ba7edc202f 100644
> --- a/Documentation/trace/rv/monitor_sched.rst
> +++ b/Documentation/trace/rv/monitor_sched.rst
> @@ -36,7 +36,7 @@ Specifications
> --------------
>
> The specifications included in sched are currently a work in progress, adapting the ones
> -defined in by Daniel Bristot in [1].
> +defined by Daniel Bristot in [1]_.
>
> Currently we included the following:
>
> @@ -365,4 +365,7 @@ constraints when processing the events::
> References
> ----------
>
> -[1] - https://bristot.me/linux-task-model
> +.. [1] Daniel Bristot de Oliveira et al.:
> + `A thread synchronization model for the PREEMPT_RT Linux kernel
> + <https://www.iris.sssup.it/bitstream/11382/533630/1/Elsevier-JSA-2020.pdf>`_,
> + J. Syst. Archit., 2020.
>
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> --
> 2.53.0
>
>
Thanks for addressing this. FWIW this looks good to me, however I've just
noticed that the same article is also referenced in rv/runtime-verification.rst
with a slightly different format and no link. I think that it might be more
clear if we had a References section in rv/runtime-verification.rst, add links
to publicly available articles, and then let the other pages point to that
section when needed instead of duplicating the references like in this case. But
that could probably be addressed as a further clean-up patch.
Acked-by: Matteo Martelli <matteo.martelli@codethink.co.uk>
Tested-by: Matteo Martelli <matteo.martelli@codethink.co.uk>
Best regards,
Matteo Martelli
^ permalink raw reply
* Re: [PATCH] kprobes: skip non-symbol addresses in kprobe_add_ksym_blacklist()
From: Masami Hiramatsu @ 2026-04-28 9:43 UTC (permalink / raw)
To: Jianpeng Chang
Cc: naveen, davem, catalin.marinas, mark.rutland, linux-kernel,
linux-trace-kernel, stable
In-Reply-To: <20260427073545.3656835-1-jianpeng.chang.cn@windriver.com>
Hi,
On Mon, 27 Apr 2026 15:35:44 +0800
Jianpeng Chang <jianpeng.chang.cn@windriver.com> wrote:
> When kprobe_add_area_blacklist() iterates through a section like
> .kprobes.text, the start address may not correspond to a named symbol.
> On ARM64 with CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS=y (introduced by
> commit baaf553d3bc3 ("arm64: Implement
> HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS")), the compiler flag
> -fpatchable-function-entry=4,2 inserts 2 NOPs before each function entry
> point for ftrace call_ops. These pre-function NOPs sit at the section base
> address, before the first named function symbol. The compiler emits a $x
> mapping symbol at offset 0x00 to mark the start of code, but
> find_kallsyms_symbol() ignores mapping symbols.
>
> Without CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS (e.g. defconfig), no
> pre-function NOPs are inserted, the first function starts at offset
> 0x00, and the bug does not trigger.
>
> This only affects modules that have a .kprobes.text section (i.e. those
> using the __kprobes annotation). Modules using NOKPROBE_SYMBOL() instead
> (like kretprobe_example.ko) blacklist exact function addresses via the
> _kprobe_blacklist section and are not affected.
>
> For kprobe_example.ko on ARM64 with -fpatchable-function-entry=4,2,
> the .kprobes.text section layout is:
>
> offset 0x00: $x + 2 NOPs (mapping symbol + ftrace preamble)
> offset 0x08: handler_post (64 bytes)
> offset 0x50: handler_pre (68 bytes)
Ah, OK. It is for __kprobes attribute. I recommend user to use NOKPROBE_SYMBOL()
but I understand the situation.
>
> kprobe_add_area_blacklist() starts iterating from the section base
> address (offset 0x00), which only has the $x mapping symbol.
> kprobe_add_ksym_blacklist() then calls kallsyms_lookup_size_offset()
> for this address, which goes through:
>
> kallsyms_lookup_size_offset()
> -> module_address_lookup()
> -> find_kallsyms_symbol()
>
> find_kallsyms_symbol() scans all module symbols to find the closest
> preceding symbol.
>
> Since no named text symbol exists at offset 0x00,
> find_kallsyms_symbol() picks __UNIQUE_ID_vermagic (a .modinfo symbol
> whose address is in the temporary image) as the "best" match. The
> computed "size" = next_text_symbol - modinfo_symbol spans across
> these two unrelated memory regions, creating a blacklist entry with
> a bogus range of tens of terabytes.
>
> Whether this causes a visible failure depends on address randomization,
> here is what happens on Raspberry Pi 4/5:
>
> - On RPi5, the bogus size was ~35 TB. start + size stayed within
> 64-bit range, so the blacklist entry covered the entire kernel
> text. register_kprobe() in the module's own init function failed
> with -EINVAL.
>
> - On RPi4, the bogus size was ~75 TB. start + size overflowed
> 64 bits and wrapped to a small address near zero. The range
> check (addr >= start && addr < end) then failed because end
> wrapped around, so the bogus entry was accidentally harmless
> and kprobes worked by luck.
>
> The same bug exists on both machines, but randomization determines whether
> the integer overflow masks it or not.
>
> Fix this by checking the offset returned by kallsyms_lookup_size_offset().
> A non-zero offset means the address is not at a symbol boundary, so skip
> forward to the next symbol instead of creating a blacklist entry with a
> wrong size.
>
> Fixes: baaf553d3bc3 ("arm64: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS")
> Signed-off-by: Jianpeng Chang <jianpeng.chang.cn@windriver.com>
> ---
> Hi,
>
> This patch skips non-symbol addresses, fixes the bogus blacklist entry,
> but leaves the NOP gap at the start of .kprobes.text unblacklisted.
That is OK because those NOPs are not executed in kprobe handler.
>
> We can continue alloc the ent without return to add the gap to
> blacklist, or do some more works to add the gap to the first symbol in
> blacklist. I'm not sure if is this necessary, or is there a better way?
Are there any compiler option or attribute to avoid inserting these
NOPs to the specific section? (like notrace?)
Also, as you can see there is an alias symbol whose size is 0. and
in that case, we move the entry + 1 and call kprobe_add_ksym_blacklist()
again. Thus, the offset becomes 1. Please make sure it is correctly
handled.
Thanks,
>
> Thanks,
> Jianpeng
>
> kernel/kprobes.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index bfc89083daa9..be700fb03198 100644
> --- a/kernel/kprobes.c>
> +++ b/kernel/kprobes.c
> @@ -2503,6 +2503,10 @@ int kprobe_add_ksym_blacklist(unsigned long entry)
> !kallsyms_lookup_size_offset(entry, &size, &offset))
> return -EINVAL;
>
> + /* Not on a symbol boundary -- skip to the next symbol */
> + if (offset)
> + return (int)(size - offset);
> +
> ent = kmalloc_obj(*ent);
> if (!ent)
> return -ENOMEM;
> --
> 2.54.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply
* Re: [PATCH v2] Documentation/rv: Replace stale website link
From: Gabriele Monaco @ 2026-04-28 9:39 UTC (permalink / raw)
To: Matteo Martelli, rdunlap, Steven Rostedt, Jonathan Corbet,
linux-trace-kernel, linux-doc, linux-kernel
Cc: skhan
In-Reply-To: <d0a66f985640388ab13fda6f7d66c5ad@codethink.co.uk>
Hi Matteo,
On Tue, 2026-04-28 at 11:11 +0200, Matteo Martelli wrote:
> Thanks for addressing this. FWIW this looks good to me, however I've
> just noticed that the same article is also referenced in
> rv/runtime-verification.rst with a slightly different format and no
> link. I think that it might be more clear if we had a References
> section in rv/runtime-verification.rst, add links to publicly
> available articles, and then let the other pages point to that
> section when needed instead of duplicating the references like in
> this case. But that could probably be addressed as a further clean-up
> patch.
>
> Acked-by: Matteo Martelli <matteo.martelli@codethink.co.uk>
> Tested-by: Matteo Martelli <matteo.martelli@codethink.co.uk>
Thanks for the ack!
That's a good point, I agree it's better to go ahead with this small
patch and I can make a deeper documentation cleanup later.
Thanks,
Gabriele
^ permalink raw reply
* [PATCH] tracing: fprobe: Remove __packed from generic __fprobe_header
From: Markus Schneider-Pargmann (The Capable Hub) @ 2026-04-28 8:30 UTC (permalink / raw)
To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Heiko Carstens
Cc: linux-kernel, linux-trace-kernel,
Markus Schneider-Pargmann (The Capable Hub)
fp pointer and unsigned long have the same size on all relevant
architectures that build Linux. Furthermore this struct is only used in
architectures that do not set ARCH_DEFINE_ENCODE_FPROBE_HEADER which is
set only for 64bit architectures (apart from LoongArch).
Both fields are aligned on these architectures so the struct with
__packed and without it are the same.
Remove the __packed as it is unnecessary.
Fixes: 4346ba160409 ("fprobe: Rewrite fprobe on function-graph tracer")
Signed-off-by: Markus Schneider-Pargmann (The Capable Hub) <msp@baylibre.com>
---
kernel/trace/fprobe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
index cc49ebd2a773..21751dcdb7b9 100644
--- a/kernel/trace/fprobe.c
+++ b/kernel/trace/fprobe.c
@@ -181,7 +181,7 @@ static inline void read_fprobe_header(unsigned long *stack,
struct __fprobe_header {
struct fprobe *fp;
unsigned long size_words;
-} __packed;
+};
#define FPROBE_HEADER_SIZE_IN_LONG SIZE_IN_LONG(sizeof(struct __fprobe_header))
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260427-topic-fprobe-packed-v7-1-f44f9bbdedf6
Best regards,
--
Markus Schneider-Pargmann (The Capable Hub) <msp@baylibre.com>
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox