From: Dmitry Osipenko <digetx@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Tomasz Figa <tfiga@chromium.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v2 3/8] tegra-vde: Use vb2_find_buffer
Date: Thu, 14 Jul 2022 21:56:30 +0300 [thread overview]
Message-ID: <0d4f6b3a-16ab-6289-0b56-490cf8667a65@gmail.com> (raw)
In-Reply-To: <20220711211141.349902-4-ezequiel@vanguardiasur.com.ar>
12.07.2022 00:11, Ezequiel Garcia пишет:
> Use the newly introduced vb2_find_buffer API to get a vb2_buffer
> given a buffer timestamp.
>
> Cc: Dmitry Osipenko <digetx@gmail.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> Acked-by: Tomasz Figa <tfiga@chromium.org>
> ---
> drivers/media/platform/nvidia/tegra-vde/h264.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/nvidia/tegra-vde/h264.c b/drivers/media/platform/nvidia/tegra-vde/h264.c
> index 88f81a134ba0..204e474d57f7 100644
> --- a/drivers/media/platform/nvidia/tegra-vde/h264.c
> +++ b/drivers/media/platform/nvidia/tegra-vde/h264.c
> @@ -659,20 +659,19 @@ static struct vb2_buffer *get_ref_buf(struct tegra_ctx *ctx,
> {
> const struct v4l2_h264_dpb_entry *dpb = ctx->h264.decode_params->dpb;
> struct vb2_queue *cap_q = &ctx->fh.m2m_ctx->cap_q_ctx.q;
> - int buf_idx = -1;
> + struct vb2_buffer *vb = NULL;
>
> if (dpb[dpb_idx].flags & V4L2_H264_DPB_ENTRY_FLAG_ACTIVE)
> - buf_idx = vb2_find_timestamp(cap_q,
> - dpb[dpb_idx].reference_ts, 0);
> + vb = vb2_find_buffer(cap_q, dpb[dpb_idx].reference_ts);
>
> /*
> * If a DPB entry is unused or invalid, address of current destination
> * buffer is returned.
> */
> - if (buf_idx < 0)
> + if (!vb)
> return &dst->vb2_buf;
>
> - return vb2_get_buffer(cap_q, buf_idx);
> + return vb;
> }
>
> static int tegra_vde_validate_vb_size(struct tegra_ctx *ctx,
Acked-by: Dmitry Osipenko <digetx@gmail.com>
next prev parent reply other threads:[~2022-07-14 18:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 21:11 [PATCH v2 0/8] videobuf2: Replace vb2_find_timestamp() with vb2_find_buffer() Ezequiel Garcia
2022-07-11 21:11 ` [PATCH v2 1/8] videobuf2: Introduce vb2_find_buffer() Ezequiel Garcia
2022-07-12 7:03 ` Philipp Zabel
2022-07-11 21:11 ` [PATCH v2 2/8] mediatek: vcodec: Use vb2_find_buffer Ezequiel Garcia
2022-07-11 21:11 ` [PATCH v2 3/8] tegra-vde: " Ezequiel Garcia
2022-07-14 18:56 ` Dmitry Osipenko [this message]
2022-07-11 21:11 ` [PATCH v2 4/8] vicodec: " Ezequiel Garcia
2022-07-11 21:11 ` [PATCH v2 5/8] hantro: " Ezequiel Garcia
2022-07-12 7:03 ` Philipp Zabel
2022-07-11 21:11 ` [PATCH v2 6/8] rkvdec: " Ezequiel Garcia
2022-07-11 21:11 ` [PATCH v2 7/8] cedrus: " Ezequiel Garcia
2022-07-12 7:27 ` Paul Kocialkowski
2022-07-14 19:26 ` Nicolas Dufresne
2022-07-15 11:48 ` Ezequiel Garcia
2022-07-16 12:36 ` Jernej Škrabec
2022-07-16 14:55 ` Ezequiel Garcia
2022-07-18 15:56 ` Nicolas Dufresne
2022-07-11 21:11 ` [PATCH v2 8/8] videobuf2: Remove vb2_find_timestamp() Ezequiel Garcia
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=0d4f6b3a-16ab-6289-0b56-490cf8667a65@gmail.com \
--to=digetx@gmail.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--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
all inboxes | Powered by JetHome®