Re: [virtio-dev] Re: [PATCH v2 0/1] VirtIO video device specification

Gerd Hoffmann
2020-01-13T13:27:07Z

Hi,

> > Well, no. Tomasz Figa had splitted the devices into three groups:
> >
> > (1) requires single buffer.
> > (2) allows any layout (including the one (1) devices want).
> > (3) requires per-plane buffers.
> >
> > Category (3) devices are apparently rare and old. Both category (1)+(2)
> > devices can handle single buffers just fine. So maybe support only
> > that?
>
> From the guest implementation point of view, Linux V4L2 currently
> supports 2 cases, if used in allocation-mode (i.e. the buffers are
> allocated locally by V4L2):
>
> i) single buffer with plane offsets predetermined by the format, (can
> be handled by devices from category 1) and 2))
> ii) per-plane buffers with planes at the beginning of their own
> buffers. (can be handled by devices from category 2) and 3))
>
> Support for ii) is required if one wants to be able to import buffers
> with arbitrary plane offsets, so I'd consider it unavoidable.

If you have (1) hardware you simply can't import buffers with arbitrary
plane offsets, so I'd expect software would prefer the single buffer
layout (i) over (ii), even when using another driver + dmabuf
export/import, to be able to support as much hardware as possible.
So (ii) might end up being unused in practice.

But maybe not, was just an idea, feel free to scratch it.

cheers,
Gerd