mbox series

[0/8] videobuf2: Replace vb2_find_timestamp() with vb2_find_buffer()

Message ID 20220706182657.210650-1-ezequiel@vanguardiasur.com.ar (mailing list archive)
Headers show
Series videobuf2: Replace vb2_find_timestamp() with vb2_find_buffer() | expand

Message

Ezequiel Garcia July 6, 2022, 6:26 p.m. UTC
All users of vb2_find_timestamp() combine it with vb2_get_buffer()
to retrieve a videobuf2 buffer, given a u64 timestamp.

Therefore, this series removes vb2_find_timestamp() and instead
introduces a vb2_find_buffer, which is more suitable, making
videobuf2 API slightly cleaner.

Ezequiel Garcia (8):
  videobuf2: Introduce vb2_find_buffer()
  mediatek: vcodec: Use vb2_find_buffer
  tegra-vde: Use vb2_find_buffer
  vicodec: Use vb2_find_buffer
  hantro: Use vb2_find_buffer
  rkvdec: Use vb2_find_buffer
  cedrus: Use vb2_find_buffer
  videobuf2: Remove vb2_find_timestamp()

 .../media/common/videobuf2/videobuf2-v4l2.c   | 12 ++---
 .../vcodec/vdec/vdec_h264_req_common.c        |  7 ++-
 .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  7 ++-
 .../vcodec/vdec/vdec_vp9_req_lat_if.c         |  8 +--
 .../media/platform/nvidia/tegra-vde/h264.c    |  9 ++--
 .../media/test-drivers/vicodec/vicodec-core.c |  8 +--
 drivers/staging/media/hantro/hantro_drv.c     |  6 +--
 .../staging/media/hantro/hantro_g2_vp9_dec.c  | 10 ++--
 drivers/staging/media/rkvdec/rkvdec-h264.c    | 41 ++++++---------
 drivers/staging/media/rkvdec/rkvdec-vp9.c     | 10 ++--
 drivers/staging/media/sunxi/cedrus/cedrus.h   | 13 +----
 .../staging/media/sunxi/cedrus/cedrus_h264.c  | 16 +++---
 .../staging/media/sunxi/cedrus/cedrus_h265.c  | 16 +++---
 .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 36 ++++++-------
 .../staging/media/sunxi/cedrus/cedrus_vp8.c   | 50 ++++++-------------
 include/media/videobuf2-v4l2.h                | 12 ++---
 16 files changed, 100 insertions(+), 161 deletions(-)

Comments

Tomasz Figa July 8, 2022, 4:47 a.m. UTC | #1
Hi Ezequiel,

On Thu, Jul 7, 2022 at 3:27 AM Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
>
> All users of vb2_find_timestamp() combine it with vb2_get_buffer()
> to retrieve a videobuf2 buffer, given a u64 timestamp.
>
> Therefore, this series removes vb2_find_timestamp() and instead
> introduces a vb2_find_buffer, which is more suitable, making
> videobuf2 API slightly cleaner.
>
> Ezequiel Garcia (8):
>   videobuf2: Introduce vb2_find_buffer()
>   mediatek: vcodec: Use vb2_find_buffer
>   tegra-vde: Use vb2_find_buffer
>   vicodec: Use vb2_find_buffer
>   hantro: Use vb2_find_buffer
>   rkvdec: Use vb2_find_buffer
>   cedrus: Use vb2_find_buffer
>   videobuf2: Remove vb2_find_timestamp()
>
>  .../media/common/videobuf2/videobuf2-v4l2.c   | 12 ++---
>  .../vcodec/vdec/vdec_h264_req_common.c        |  7 ++-
>  .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  7 ++-
>  .../vcodec/vdec/vdec_vp9_req_lat_if.c         |  8 +--
>  .../media/platform/nvidia/tegra-vde/h264.c    |  9 ++--
>  .../media/test-drivers/vicodec/vicodec-core.c |  8 +--
>  drivers/staging/media/hantro/hantro_drv.c     |  6 +--
>  .../staging/media/hantro/hantro_g2_vp9_dec.c  | 10 ++--
>  drivers/staging/media/rkvdec/rkvdec-h264.c    | 41 ++++++---------
>  drivers/staging/media/rkvdec/rkvdec-vp9.c     | 10 ++--
>  drivers/staging/media/sunxi/cedrus/cedrus.h   | 13 +----
>  .../staging/media/sunxi/cedrus/cedrus_h264.c  | 16 +++---
>  .../staging/media/sunxi/cedrus/cedrus_h265.c  | 16 +++---
>  .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 36 ++++++-------
>  .../staging/media/sunxi/cedrus/cedrus_vp8.c   | 50 ++++++-------------
>  include/media/videobuf2-v4l2.h                | 12 ++---
>  16 files changed, 100 insertions(+), 161 deletions(-)
>
> --
> 2.34.3
>

Thanks for the series! I think it's a nice cleanup indeed, but please
see a few comments in my replies to individual patches.

Best regards,
Tomasz
Tomasz Figa July 8, 2022, 11:47 a.m. UTC | #2
On Fri, Jul 8, 2022 at 1:47 PM Tomasz Figa <tfiga@chromium.org> wrote:
>
> Hi Ezequiel,
>
> On Thu, Jul 7, 2022 at 3:27 AM Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar> wrote:
> >
> > All users of vb2_find_timestamp() combine it with vb2_get_buffer()
> > to retrieve a videobuf2 buffer, given a u64 timestamp.
> >
> > Therefore, this series removes vb2_find_timestamp() and instead
> > introduces a vb2_find_buffer, which is more suitable, making
> > videobuf2 API slightly cleaner.
> >
> > Ezequiel Garcia (8):
> >   videobuf2: Introduce vb2_find_buffer()
> >   mediatek: vcodec: Use vb2_find_buffer
> >   tegra-vde: Use vb2_find_buffer
> >   vicodec: Use vb2_find_buffer
> >   hantro: Use vb2_find_buffer
> >   rkvdec: Use vb2_find_buffer
> >   cedrus: Use vb2_find_buffer
> >   videobuf2: Remove vb2_find_timestamp()
> >
> >  .../media/common/videobuf2/videobuf2-v4l2.c   | 12 ++---
> >  .../vcodec/vdec/vdec_h264_req_common.c        |  7 ++-
> >  .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  7 ++-
> >  .../vcodec/vdec/vdec_vp9_req_lat_if.c         |  8 +--
> >  .../media/platform/nvidia/tegra-vde/h264.c    |  9 ++--
> >  .../media/test-drivers/vicodec/vicodec-core.c |  8 +--
> >  drivers/staging/media/hantro/hantro_drv.c     |  6 +--
> >  .../staging/media/hantro/hantro_g2_vp9_dec.c  | 10 ++--
> >  drivers/staging/media/rkvdec/rkvdec-h264.c    | 41 ++++++---------
> >  drivers/staging/media/rkvdec/rkvdec-vp9.c     | 10 ++--
> >  drivers/staging/media/sunxi/cedrus/cedrus.h   | 13 +----
> >  .../staging/media/sunxi/cedrus/cedrus_h264.c  | 16 +++---
> >  .../staging/media/sunxi/cedrus/cedrus_h265.c  | 16 +++---
> >  .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 36 ++++++-------
> >  .../staging/media/sunxi/cedrus/cedrus_vp8.c   | 50 ++++++-------------
> >  include/media/videobuf2-v4l2.h                | 12 ++---
> >  16 files changed, 100 insertions(+), 161 deletions(-)
> >
> > --
> > 2.34.3
> >
>
> Thanks for the series! I think it's a nice cleanup indeed, but please
> see a few comments in my replies to individual patches.

As we clarified my concern in one of the patches and the other one was
purely stylistic, feel free to just add my

Acked-by: Tomasz Figa <tfiga@chromium.org>

to the entire series. The stylistic one can be ignored if there is no
other change needed.

Best regards,
Tomasz