From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Ezequiel Garcia <ezequiel@collabora.com>,
Tomasz Figa <tfiga@chromium.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kernel@collabora.com, Jonas Karlman <jonas@kwiboo.se>,
Heiko Stuebner <heiko@sntech.de>,
Hans Verkuil <hverkuil@xs4all.nl>,
Alexandre Courbot <acourbot@chromium.org>,
Jeffrey Kardatzke <jkardatzke@chromium.org>,
Gustavo Padovan <gustavo.padovan@collabora.com>
Subject: Re: [PATCH v3 1/3] media: rkvdec: Fix .buf_prepare
Date: Wed, 13 May 2020 19:38:32 -0400 [thread overview]
Message-ID: <b7122cb49cfa0bcfa433c154f6cb64ee0dba55da.camel@ndufresne.ca> (raw)
In-Reply-To: <ac6e162a24a8e2b2180b1a743e5ecd9a2023ac65.camel@collabora.com>
Le mardi 05 mai 2020 à 11:27 -0300, Ezequiel Garcia a écrit :
> On Tue, 2020-05-05 at 16:05 +0200, Tomasz Figa wrote:
> > On Tue, May 5, 2020 at 3:59 PM Ezequiel Garcia <ezequiel@collabora.com> wrote:
> > > On Tue, 2020-05-05 at 15:56 +0200, Tomasz Figa wrote:
> > > > Hi Ezequiel,
> > > >
> > > > On Tue, May 5, 2020 at 3:41 PM Ezequiel Garcia <ezequiel@collabora.com> wrote:
> > > > > The driver should only set the payload on .buf_prepare
> > > > > if the buffer is CAPTURE type, or if an OUTPUT buffer
> > > > > has a zeroed payload.
> > > >
> > > > Thanks for the patch. Just one question below.
> > > >
> > > > Where does the requirement to set OUTPUT buffer bytesused to sizeimage
> > > > if the original bytesused is 0 come from?
> > > >
> > >
> > > If I'm reading english correctly, it's here:
> > >
> > > https://www.kernel.org/doc/html/latest/media/uapi/v4l/buffer.html
> > >
> > > """
> > > The number of bytes occupied by the data in the buffer. It depends on the negotiated data format and may change with each buffer for compressed
> > > variable size data like JPEG images. Drivers must set this field when type refers to a capture stream, applications when it refers to an output
> > > stream. If the application sets this to 0 for an output stream, then bytesused will be set to the size of the buffer (see the length field of this
> > > struct) by the driver. For multiplanar formats this field is ignored and the planes pointer is used instead.
> > > """
> >
> > Okay, thanks. I wonder if this shouldn't be handled by the core,
> > though. Especially given that the document refers to the length field
> > specifically and not the sizeimage set in the format.
> >
>
> Yes, either core or helper, this definitely calls for a generic solution.
For the context, this is for backward compatibility. I'm not certain it
make sense for new driver interface like RKVDEC. Specially that if the
user did pass an empty buffer by accident, this will push garbage into
the driver. That being said, it seems to match the spec.
>
> Ezequiel
>
next prev parent reply other threads:[~2020-05-13 23:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 13:41 [PATCH v3 0/3] media: rkvdec: Add a VP9 backend Ezequiel Garcia
2020-05-05 13:41 ` [PATCH v3 1/3] media: rkvdec: Fix .buf_prepare Ezequiel Garcia
2020-05-05 13:56 ` Tomasz Figa
2020-05-05 13:59 ` Ezequiel Garcia
2020-05-05 14:05 ` Tomasz Figa
2020-05-05 14:27 ` Ezequiel Garcia
2020-05-13 23:38 ` Nicolas Dufresne [this message]
2020-05-14 14:50 ` Nicolas Dufresne
2020-05-05 13:41 ` [PATCH v3 2/3] media: uapi: Add VP9 stateless decoder controls Ezequiel Garcia
2020-05-08 10:27 ` Hans Verkuil
2020-05-08 12:28 ` Ezequiel Garcia
2020-05-08 13:16 ` Hans Verkuil
2020-05-11 12:17 ` Nicolas Dufresne
2020-05-05 13:41 ` [PATCH v3 3/3] media: rkvdec: Add the VP9 backend Ezequiel Garcia
2020-05-08 10:34 ` Hans Verkuil
2020-05-08 16:26 ` Ezequiel Garcia
2020-05-08 16:56 ` Tomasz Figa
2020-05-11 13:26 ` Ezequiel Garcia
2020-05-08 11:21 ` Jonas Karlman
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=b7122cb49cfa0bcfa433c154f6cb64ee0dba55da.camel@ndufresne.ca \
--to=nicolas@ndufresne.ca \
--cc=acourbot@chromium.org \
--cc=ezequiel@collabora.com \
--cc=gustavo.padovan@collabora.com \
--cc=heiko@sntech.de \
--cc=hverkuil@xs4all.nl \
--cc=jkardatzke@chromium.org \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--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®