From: Dmitry Sepp <dmitry.sepp@opensynergy.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
"Hans Verkuil" <hverkuil@xs4all.nl>,
virtio-dev@lists.oasis-open.org,
"Alexandre Courbot" <acourbot@chromium.org>,
"Alex Lau" <alexlau@chromium.org>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Dylan Reid" <dgreid@chromium.org>,
dstaessens@chromium.org, "Enrico Granata" <egranata@google.com>,
"Frediano Ziglio" <fziglio@redhat.com>,
"Keiichi Watanabe" <keiichiw@chromium.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Stéphane Marchesin" <marcheu@chromium.org>,
"Pawel Osciak" <posciak@chromium.org>,
spice-devel@lists.freedesktop.org,
"David Stevens" <stevensd@chromium.org>,
uril@redhat.com, samiullah.khawaja@opensynergy.com,
kiran.pawar@opensynergy.com,
"Nikolay Martyanov" <Nikolay.Martyanov@opensynergy.com>
Subject: Re: [PATCH v2 1/1] video_video: Add the Virtio Video V4L2 driver
Date: Mon, 16 Mar 2020 11:36:55 +0100 [thread overview]
Message-ID: <2171890.ElGaqSPkdT@os-lin-dmo> (raw)
In-Reply-To: <CAAFQd5A-ZaTkx8YEdq=Q_KpbmzZ4kGxJ1ju8shXMot9WMytd=w@mail.gmail.com>
Hi Tomasz,
On Freitag, 13. März 2020 12:11:51 CET Tomasz Figa wrote:
> On Fri, Mar 13, 2020 at 11:27 AM Dmitry Sepp
>
> <dmitry.sepp@opensynergy.com> wrote:
> > Hi Tomasz,
> >
> > On Freitag, 13. März 2020 11:05:35 CET Tomasz Figa wrote:
> > > On Thu, Mar 12, 2020 at 12:48 PM Dmitry Sepp
> > >
> > > <dmitry.sepp@opensynergy.com> wrote:
> > > > Hi Hans,
> > > >
> > > > One more thing:
> > > > > GFP_DMA? That's unusual. I'd expect GFP_DMA32. All V4L2 drivers use
> > > > > that.
> > > >
> > > > GFP_DMA32 had no effect for me on arm64. Probably I need to recheck.
> > >
> > > What's the reason to use any specific GFP flags at all? GFP_DMA(32)
> > > memory in the guest would typically correspond to host pages without
> > > any specific location guarantee.
> >
> > Typically, but not always, especially for non x86. Say, some platforms
> > don't have IOMMUs for codec devices and those devices require physically
> > contig low memory. We had to find a way to handle that.
>
> So basically your hypervisor guarantees that the guest pages inside
> the GFP_DMA zone are contiguous and DMA-able on the host as well?
> Given the Linux-specific aspect of GFP flags and differences in the
> implementation across architectures, perhaps it would be a better idea
> to use the DMA mask instead? That wouldn't currently affect vb2_dma_sg
> allocations, but in that case the host decoder would have some IOMMU
> anyway, right?
>
DMA mask has no effect for vb2_dma_sg, but GFP has. Unfortunately we need to
support both of the two: low mem phys contig and low mem sg. So DMA mask
cannot be an option. No, there are use-cases with obsolutely no iommus.
Best regards,
Dmitry.
> > Best regards,
> > Dmitry.
> >
> > > Best regards,
> > > Tomasz
> > >
> > > > Best regards,
> > > > Dmitry.
> > > >
> > > > On Donnerstag, 12. März 2020 11:18:26 CET Hans Verkuil wrote:
> > > > > On 3/12/20 11:15 AM, Dmitry Sepp wrote:
> > > > > > Hi Hans,
> > > > > >
> > > > > > Thank you for your great detailed review!
> > > > > >
> > > > > > I won't provide inline answers as your comments totally make
> > > > > > sense.
> > > > > > There
> > > > > > is>
> > > > > >
> > > > > > only one thing I want to mention:
> > > > > >>> + struct video_plane_format
> > > > > >>> plane_format[VIRTIO_VIDEO_MAX_PLANES];
> > > > > >>
> > > > > >> Why is this virtio specific? Any reason for not using
> > > > > >> VIDEO_MAX_PLANES?
> > > > > >
> > > > > > I'd say this is because VIDEO_MAX_PLANES does not exist outside of
> > > > > > the
> > > > > > Linux OS, so for whatever other system we need a virtio specific
> > > > > > definition.
> > > > >
> > > > > OK, good reason :-)
> > > > >
> > > > > It's probably a good thing to add a comment where
> > > > > VIRTIO_VIDEO_MAX_PLANES is defined that explains this.
> > > > >
> > > > > Regards,
> > > > >
> > > > > Hans
next prev parent reply other threads:[~2020-03-16 10:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 20:27 [PATCH v2 0/1] Virtio Video V4L2 driver Dmitry Sepp
2020-02-18 20:27 ` [PATCH v2 1/1] video_video: Add the " Dmitry Sepp
2020-03-10 10:24 ` Keiichi Watanabe
2020-03-11 0:09 ` Nicolas Dufresne
2020-03-12 11:40 ` Dmitry Sepp
2020-03-13 11:38 ` Keiichi Watanabe
2020-03-11 13:23 ` Hans Verkuil
2020-03-12 10:15 ` Dmitry Sepp
2020-03-12 10:18 ` Hans Verkuil
2020-03-12 11:48 ` Dmitry Sepp
2020-03-13 10:05 ` Tomasz Figa
2020-03-13 10:27 ` Dmitry Sepp
2020-03-13 11:11 ` Tomasz Figa
2020-03-16 10:36 ` Dmitry Sepp [this message]
2020-03-17 6:46 ` Keiichi Watanabe
2020-03-17 6:53 ` Keiichi Watanabe
2020-03-17 9:10 ` Dmitry Sepp
2020-03-17 9:18 ` Keiichi Watanabe
2020-03-11 13:26 ` [PATCH v2 0/1] " Hans Verkuil
2020-03-12 9:03 ` Dmitry Sepp
2020-03-12 9:49 ` Keiichi Watanabe
2020-03-12 9:54 ` Hans Verkuil
2020-03-12 10:11 ` Keiichi Watanabe
2020-03-12 10:29 ` Dmitry Sepp
2020-03-12 10:37 ` Hans Verkuil
2020-03-13 2:29 ` Nicolas Dufresne
2020-03-13 7:54 ` Keiichi Watanabe
2020-03-13 10:09 ` Dmitry Sepp
2020-03-13 11:53 ` Keiichi Watanabe
2020-03-13 10:20 ` Dmitry Sepp
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=2171890.ElGaqSPkdT@os-lin-dmo \
--to=dmitry.sepp@opensynergy.com \
--cc=Nikolay.Martyanov@opensynergy.com \
--cc=acourbot@chromium.org \
--cc=alexlau@chromium.org \
--cc=daniel@ffwll.ch \
--cc=dgreid@chromium.org \
--cc=dstaessens@chromium.org \
--cc=egranata@google.com \
--cc=fziglio@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=keiichiw@chromium.org \
--cc=kiran.pawar@opensynergy.com \
--cc=kraxel@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=marcheu@chromium.org \
--cc=posciak@chromium.org \
--cc=samiullah.khawaja@opensynergy.com \
--cc=spice-devel@lists.freedesktop.org \
--cc=stevensd@chromium.org \
--cc=tfiga@chromium.org \
--cc=uril@redhat.com \
--cc=virtio-dev@lists.oasis-open.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