[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230313135916.862852-1-benjamin.gaignard@collabora.com>
Date: Mon, 13 Mar 2023 14:59:12 +0100
From: Benjamin Gaignard <benjamin.gaignard@...labora.com>
To: tfiga@...omium.org, m.szyprowski@...sung.com, mchehab@...nel.org,
ming.qian@....com, shijie.qin@....com, eagle.zhou@....com,
bin.liu@...iatek.com, matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com, tiffany.lin@...iatek.com,
andrew-ct.chen@...iatek.com, yunfei.dong@...iatek.com,
stanimir.k.varbanov@...il.com, quic_vgarodia@...cinc.com,
agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
ezequiel@...guardiasur.com.ar, p.zabel@...gutronix.de,
daniel.almeida@...labora.com, hverkuil-cisco@...all.nl,
laurent.pinchart@...asonboard.com, jerbel@...nel.org
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-rockchip@...ts.infradead.org, kernel@...labora.com,
Benjamin Gaignard <benjamin.gaignard@...labora.com>
Subject: [RFC 0/4] Allow more than 32 vb2 buffers per queue
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
Powered by blists - more mailing lists