Re: [PATCH 4/5] media: v4l2-mem2mem: add v4l2_m2m_buf_done trace point

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Emil,

On Mon, 2021-05-17 at 19:38 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
> 
> Move the function out of the header, as required by the trace API and
> add a tracepoint.
> 

Same thing here, about too short commit descriptions.
 
> Signed-off-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
> ---
>  drivers/media/v4l2-core/v4l2-mem2mem.c |  9 ++++++
>  drivers/media/v4l2-core/v4l2-trace.c   |  1 +
>  include/media/v4l2-mem2mem.h           | 10 +++----
>  include/trace/events/v4l2.h            | 41 ++++++++++++++++++++++++++
>  4 files changed, 56 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
> index bf83d1fae701..a83d3e4e7a85 100644
> --- a/drivers/media/v4l2-core/v4l2-mem2mem.c
> +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
> @@ -555,6 +555,15 @@ void v4l2_m2m_buf_done_and_job_finish(struct v4l2_m2m_dev *m2m_dev,
>  }
>  EXPORT_SYMBOL(v4l2_m2m_buf_done_and_job_finish);
>  
> +void
> +v4l2_m2m_buf_done(struct vb2_v4l2_buffer *buf, enum vb2_buffer_state state)
> +{
> +       // TODO: Emil move the trace after done?
> +       trace_v4l2_m2m_buf_done(&buf->vb2_buf, state);

There's a trace already in vb2_buffer_done, is that one not enough,
or not useful?

> +       vb2_buffer_done(&buf->vb2_buf, state);
> +}
> +EXPORT_SYMBOL(v4l2_m2m_buf_done);
> +
>  void v4l2_m2m_suspend(struct v4l2_m2m_dev *m2m_dev)
>  {
>         unsigned long flags;
> diff --git a/drivers/media/v4l2-core/v4l2-trace.c b/drivers/media/v4l2-core/v4l2-trace.c
> index cde408d06fdc..b70208101f3c 100644
> --- a/drivers/media/v4l2-core/v4l2-trace.c
> +++ b/drivers/media/v4l2-core/v4l2-trace.c
> @@ -11,6 +11,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_buf_queue);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_dqbuf);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_v4l2_qbuf);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_ioctl_s_fmt);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_m2m_buf_done);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_m2m_schedule);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_m2m_schedule_failed);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(v4l2_m2m_queue_job);
> diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
> index 82bf54254bd8..013fd355ff82 100644
> --- a/include/media/v4l2-mem2mem.h
> +++ b/include/media/v4l2-mem2mem.h
> @@ -229,11 +229,11 @@ void v4l2_m2m_buf_done_and_job_finish(struct v4l2_m2m_dev *m2m_dev,
>                                       struct v4l2_m2m_ctx *m2m_ctx,
>                                       enum vb2_buffer_state state);
>  
> -static inline void
> -v4l2_m2m_buf_done(struct vb2_v4l2_buffer *buf, enum vb2_buffer_state state)
> -{
> -       vb2_buffer_done(&buf->vb2_buf, state);
> -}
> +/**
> + * Something something

Something needs documented :)

Thanks,
Ezequiel




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux