From: Hsia-Jun Li <Randy.Li@synaptics.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
linux-rockchip@lists.infradead.org, ming.qian@nxp.com,
mchehab@kernel.org, linux-staging@lists.linux.dev,
kernel@collabora.com, p.zabel@pengutronix.de,
ezequiel@vanguardiasur.com.ar, m.szyprowski@samsung.com,
gregkh@linuxfoundation.org, tfiga@chromium.org,
nicolas.dufresne@collabora.com, hverkuil-cisco@xs4all.nl
Subject: Re: [PATCH v3 00/11] Add DELETE_BUF ioctl
Date: Tue, 27 Jun 2023 15:40:35 +0800 [thread overview]
Message-ID: <3bc80514-49cf-b36c-42f7-7d2a29c93331@synaptics.com> (raw)
In-Reply-To: <20230622131349.144160-1-benjamin.gaignard@collabora.com>
On 6/22/23 21:13, Benjamin Gaignard wrote:
> CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> Unlike when resolution change on keyframes, dynamic resolution change
> on inter frames doesn't allow to do a stream off/on sequence because
> it is need to keep all previous references alive to decode inter frames.
> This constraint have two main problems:
> - more memory consumption.
> - more buffers in use.
> To solve these issue this series introduce DELETE_BUF ioctl and remove
> the 32 buffers limit per queue.
I know the VIDIOC_CREATE_BUFS allows creating a buffer with a different
size than the driver suggests in G_FMT.
But the vb2_ops->queue_setup() could check whether the sizeimages meet
its minimal requirement with the current format.
This enables a problem that the driver need to check the buffer size
before they make a hardware use a buffer from the rdy_queue.
Thinking of such case, we know a AV1 sequence(VP9 or VP8 didn't have a
sequence header) would need a much large buffer for the alternative
reference frame.
Then create one special buffer for the altref, the driver need a
hardware to pick it from the rdy_queue first or it would be a waste to
use it as a regular frame buffer.
Also missing such step would not solve the memory allocation problem.
>
> VP9 conformance tests using fluster give a score of 210/305.
> The 25 resize inter tests (vp90-2-21-resize_inter_* files) are ok
> but require to use postprocessor.
>
> Kernel branch is available here:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.collabora.com_benjamin.gaignard_for-2Dupstream_-2D_commits_remove-5Fvb2-5Fqueue-5Flimit-5Fv3&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wVIoUFmBzj1s88r8EGyM0UY&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=DCpeuc2fAyJ_XUCYsydYOB5ynn0uW4JsFKVbEiXj-6AhZ5d2vm3GkOClPl8cfN9U&s=8whob9PKPu98WlyK6J9DcmFFiDPbwI3ws-nLfWR0oTE&e=
>
> GStreamer branch to use DELETE_BUF ioctl and testing dynamic resolution
> change is here:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.freedesktop.org_benjamin.gaignard1_gstreamer_-2D_commits_VP9-5Fdrc&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wVIoUFmBzj1s88r8EGyM0UY&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=DCpeuc2fAyJ_XUCYsydYOB5ynn0uW4JsFKVbEiXj-6AhZ5d2vm3GkOClPl8cfN9U&s=SEexoIeuXbraR1zvtSkz0MQFGyZSeKQ7Pt6mJoNrS0A&e=
>
> changes in version 3:
> - Use Xarray API to store allocated video buffers.
> - No module parameter to limit the number of buffer per queue.
> - Use Xarray inside Verisilicon driver to store postprocessor buffers
> and remove VB2_MAX_FRAME limit.
> - Allow Versilicon driver to change of resolution while streaming
> - Various fixes the Verisilicon VP9 code to improve fluster score.
>
> changes in version 2:
> - Use a dynamic array and not a list to keep trace of allocated buffers.
> Not use IDR interface because it is marked as deprecated in kernel
> documentation.
> - Add a module parameter to limit the number of buffer per queue.
> - Add DELETE_BUF ioctl and m2m helpers.
>
> Benjamin Gaignard (11):
> media: videobuf2: Access vb2_queue bufs array through helper functions
> media: videobuf2: Use Xarray instead of static buffers array
> media: videobuf2: Remove VB2_MAX_FRAME limit on buffer storage
> media: videobuf2: Stop define VB2_MAX_FRAME as global
> media: verisilicon: Refactor postprocessor to store more buffers
> media: verisilicon: Store chroma and motion vectors offset
> media: verisilicon: vp9: Use destination buffer height to compute
> chroma offset
> media: verisilicon: postproc: Fix down scale test
> media: verisilicon: vp9: Allow to change resolution while streaming
> media: v4l2: Add DELETE_BUF ioctl
> media: v4l2: Add mem2mem helpers for DELETE_BUF ioctl
>
> .../userspace-api/media/v4l/user-func.rst | 1 +
> .../media/v4l/vidioc-delete-buf.rst | 51 ++++
> .../media/common/videobuf2/videobuf2-core.c | 275 ++++++++++++++----
> .../media/common/videobuf2/videobuf2-v4l2.c | 34 ++-
> drivers/media/platform/amphion/vdec.c | 1 +
> drivers/media/platform/amphion/vpu_dbg.c | 22 +-
> .../platform/mediatek/jpeg/mtk_jpeg_core.c | 6 +-
> .../vcodec/vdec/vdec_vp9_req_lat_if.c | 4 +-
> drivers/media/platform/qcom/venus/hfi.h | 2 +
> drivers/media/platform/st/sti/hva/hva-v4l2.c | 4 +
> drivers/media/platform/verisilicon/hantro.h | 8 +-
> .../platform/verisilicon/hantro_g2_vp9_dec.c | 10 +-
> .../media/platform/verisilicon/hantro_hw.h | 4 +-
> .../platform/verisilicon/hantro_postproc.c | 114 +++++---
> .../media/platform/verisilicon/hantro_v4l2.c | 37 +--
> drivers/media/test-drivers/vim2m.c | 1 +
> drivers/media/test-drivers/visl/visl-dec.c | 28 +-
> drivers/media/v4l2-core/v4l2-dev.c | 1 +
> drivers/media/v4l2-core/v4l2-ioctl.c | 10 +
> drivers/media/v4l2-core/v4l2-mem2mem.c | 20 ++
> .../staging/media/atomisp/pci/atomisp_ioctl.c | 2 +-
> drivers/staging/media/ipu3/ipu3-v4l2.c | 2 +
> include/media/v4l2-ioctl.h | 4 +
> include/media/v4l2-mem2mem.h | 12 +
> include/media/videobuf2-core.h | 16 +-
> include/media/videobuf2-v4l2.h | 15 +-
> include/uapi/linux/videodev2.h | 2 +
> 27 files changed, 523 insertions(+), 163 deletions(-)
> create mode 100644 Documentation/userspace-api/media/v4l/vidioc-delete-buf.rst
>
> --
> 2.39.2
>
--
Hsia-Jun(Randy) Li
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2023-06-27 7:41 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 13:13 [PATCH v3 00/11] Add DELETE_BUF ioctl Benjamin Gaignard
2023-06-22 13:13 ` [PATCH v3 01/11] media: videobuf2: Access vb2_queue bufs array through helper functions Benjamin Gaignard
2023-06-23 15:10 ` kernel test robot
2023-06-24 23:34 ` kernel test robot
2023-06-22 13:13 ` [PATCH v3 02/11] media: videobuf2: Use Xarray instead of static buffers array Benjamin Gaignard
2023-06-22 13:13 ` [PATCH v3 03/11] media: videobuf2: Remove VB2_MAX_FRAME limit on buffer storage Benjamin Gaignard
2023-06-22 13:56 ` Dan Carpenter
2023-06-22 14:11 ` Dan Carpenter
2023-06-22 14:13 ` Benjamin Gaignard
2023-06-23 7:02 ` Hans Verkuil
2023-06-23 7:51 ` Benjamin Gaignard
2023-06-22 13:13 ` [PATCH v3 04/11] media: videobuf2: Stop define VB2_MAX_FRAME as global Benjamin Gaignard
2023-06-30 9:51 ` Hsia-Jun Li
2023-07-03 8:09 ` Benjamin Gaignard
2023-07-03 8:35 ` Hsia-Jun Li
2023-07-03 10:53 ` Benjamin Gaignard
2023-07-03 11:05 ` Hsia-Jun Li
2023-07-12 10:48 ` Tomasz Figa
2023-07-17 7:44 ` Hsia-Jun Li
2023-07-28 6:46 ` Tomasz Figa
2023-07-28 6:55 ` Hsia-Jun Li
2023-07-28 7:03 ` Tomasz Figa
2023-07-28 7:24 ` Hsia-Jun Li
2023-09-07 4:15 ` Tomasz Figa
2023-09-07 6:54 ` Hsia-Jun Li
2023-06-22 13:13 ` [PATCH v3 05/11] media: verisilicon: Refactor postprocessor to store more buffers Benjamin Gaignard
2023-06-22 13:13 ` [PATCH v3 06/11] media: verisilicon: Store chroma and motion vectors offset Benjamin Gaignard
2023-07-02 7:48 ` Markus Elfring
2023-06-22 13:13 ` [PATCH v3 07/11] media: verisilicon: vp9: Use destination buffer height to compute chroma offset Benjamin Gaignard
2023-07-02 9:14 ` Markus Elfring
2023-06-22 13:13 ` [PATCH v3 08/11] media: verisilicon: postproc: Fix down scale test Benjamin Gaignard
2023-06-22 15:27 ` Benjamin Gaignard
2023-06-22 13:13 ` [PATCH v3 09/11] media: verisilicon: vp9: Allow to change resolution while streaming Benjamin Gaignard
2023-07-02 9:33 ` Markus Elfring
2023-06-22 13:13 ` [PATCH v3 10/11] media: v4l2: Add DELETE_BUF ioctl Benjamin Gaignard
2023-06-22 23:12 ` kernel test robot
2023-06-23 0:25 ` kernel test robot
2023-06-26 7:08 ` [EXT] " Ming Qian
2023-06-26 7:48 ` Benjamin Gaignard
2023-06-26 7:50 ` Benjamin Gaignard
2023-06-26 8:13 ` Ming Qian
2023-06-26 8:04 ` Ming Qian
2023-06-27 7:30 ` Hsia-Jun Li
2023-06-27 8:43 ` Benjamin Gaignard
2023-06-27 8:47 ` Hsia-Jun Li
2023-06-30 9:43 ` Hsia-Jun Li
2023-07-03 8:12 ` Benjamin Gaignard
2023-07-03 8:19 ` Hsia-Jun Li
2023-07-03 8:52 ` Benjamin Gaignard
2023-07-03 9:20 ` Hsia-Jun Li
2023-07-03 10:35 ` Benjamin Gaignard
2023-07-03 11:06 ` Hsia-Jun Li
[not found] ` <8ca2f66e-8ff9-e885-274f-51417b581b78@synaptics.com>
2023-07-03 11:17 ` Benjamin Gaignard
2023-07-03 15:42 ` Randy Li
2023-07-13 9:09 ` Tomasz Figa
2023-07-17 2:16 ` Hsia-Jun Li
2023-07-28 6:57 ` Tomasz Figa
2023-07-28 7:26 ` Hsia-Jun Li
2023-07-02 10:20 ` Markus Elfring
2023-06-22 13:13 ` [PATCH v3 11/11] media: v4l2: Add mem2mem helpers for " Benjamin Gaignard
2023-06-27 7:40 ` Hsia-Jun Li [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bc80514-49cf-b36c-42f7-7d2a29c93331@synaptics.com \
--to=randy.li@synaptics.com \
--cc=benjamin.gaignard@collabora.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@kernel.org \
--cc=ming.qian@nxp.com \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox