public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/4] Allow more than 32 vb2 buffers per queue
@ 2023-03-13 13:59 Benjamin Gaignard
  2023-03-13 13:59 ` [RFC 1/4] media: videobuf2: Use vb2_get_buffer() as helper everywhere Benjamin Gaignard
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Benjamin Gaignard @ 2023-03-13 13:59 UTC (permalink / raw)
  To: tfiga, m.szyprowski, mchehab, ming.qian, shijie.qin, eagle.zhou,
	bin.liu, matthias.bgg, angelogioacchino.delregno, tiffany.lin,
	andrew-ct.chen, yunfei.dong, stanimir.k.varbanov, quic_vgarodia,
	agross, andersson, konrad.dybcio, ezequiel, p.zabel,
	daniel.almeida, hverkuil-cisco, laurent.pinchart, jerbel
  Cc: linux-media, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-arm-msm, linux-rockchip, kernel, Benjamin Gaignard

Queues can only store up to VB2_MAX_FRAME (32) vb2 buffers.
Some use cases like VP9 dynamic resolution change may require
to have more than 32 buffers in use at the same time.
The goal of this series is to prepare queues for these use
cases by replacing bufs array by a list a vb2 buffers.

For the same VP9 use case we will need to be able to delete
buffers from the queue to limit memory usage so this series
add a bitmap to manage buffer indexes. This should permit to
avoid creating holes in vb2 index range.

I test these patches with Fluster test suite on Hantro video
decoder (VP9 and HEVC). I notice no performances issues and 
no regressions.

Despite carefully checking if removing bufs array doesn't break
the compilation of any media driver, I may have miss some so
one of the goal of this RFC is also to trig compilation robots.
 
Benjamin Gaignard (4):
  media: videobuf2: Use vb2_get_buffer() as helper everywhere
  media: videobuf2: Replace bufs array by a list
  media: videobuf2: Use bitmap to manage vb2 index
  media: videobuf2: Stop define VB2_MAX_FRAME as global

 .../media/common/videobuf2/videobuf2-core.c   | 107 +++++++++++-------
 .../media/common/videobuf2/videobuf2-v4l2.c   |  17 +--
 drivers/media/platform/amphion/vdec.c         |   1 +
 drivers/media/platform/amphion/vpu_dbg.c      |   4 +-
 .../platform/mediatek/jpeg/mtk_jpeg_core.c    |   2 +-
 .../vcodec/vdec/vdec_vp9_req_lat_if.c         |   4 +-
 drivers/media/platform/qcom/venus/hfi.h       |   2 +
 .../media/platform/verisilicon/hantro_hw.h    |   2 +
 drivers/media/test-drivers/visl/visl-dec.c    |  16 +--
 include/media/videobuf2-core.h                |  42 ++++++-
 include/media/videobuf2-v4l2.h                |   4 -
 11 files changed, 130 insertions(+), 71 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-03-24 20:21 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 13:59 [RFC 0/4] Allow more than 32 vb2 buffers per queue Benjamin Gaignard
2023-03-13 13:59 ` [RFC 1/4] media: videobuf2: Use vb2_get_buffer() as helper everywhere Benjamin Gaignard
2023-03-13 16:51   ` Andrzej Pietrasiewicz
2023-03-13 16:56     ` Benjamin Gaignard
2023-03-13 18:01   ` Laurent Pinchart
2023-03-13 18:04     ` Laurent Pinchart
2023-03-13 13:59 ` [RFC 2/4] media: videobuf2: Replace bufs array by a list Benjamin Gaignard
2023-03-13 18:11   ` Laurent Pinchart
2023-03-13 23:16     ` David Laight
2023-03-14  8:55       ` Hans Verkuil
2023-03-14 10:11         ` David Laight
2023-03-14 10:42           ` Hans Verkuil
2023-03-19 23:33             ` Laurent Pinchart
2023-03-22 14:50               ` Nicolas Dufresne
2023-03-22 15:01                 ` Laurent Pinchart
2023-03-24 15:14                   ` Nicolas Dufresne
2023-03-24 15:18                     ` Hans Verkuil
2023-03-24 15:34                       ` Nicolas Dufresne
2023-03-24 20:21                         ` Laurent Pinchart
2023-03-15 13:57     ` Nicolas Dufresne
2023-03-19 23:33       ` Laurent Pinchart
2023-03-13 13:59 ` [RFC 3/4] media: videobuf2: Use bitmap to manage vb2 index Benjamin Gaignard
2023-03-13 18:14   ` Laurent Pinchart
2023-03-14  2:10   ` [EXT] " Ming Qian
2023-03-13 13:59 ` [RFC 4/4] media: videobuf2: Stop define VB2_MAX_FRAME as global Benjamin Gaignard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox