[virglrenderer-devel] virgl_renderer_resource_import_eglimage

Vasyl Vavrychuk vvavrychuk at gmail.com
Wed Aug 19 22:12:09 UTC 2020


On Wed, Aug 19, 2020 at 10:02 PM Chia-I Wu <olvaffe at gmail.com> wrote:
>
> On Wed, Aug 19, 2020 at 1:42 AM Vasyl Vavrychuk <vvavrychuk at gmail.com> wrote:
> >
> > Commit message for commit that adds "virgl_renderer_resource_import_eglimage" says this function supposed to be used from CrosVM. But I have checked CrosVM source and did not find virgl_renderer_resource_import_eglimage usage. Same for QEMU.
> >
> > As I understand virgl_renderer_resource_import_eglimage is essential to achieve zero copy. So, why QEMU/CrosVM do not use it. Are they using some other methods to achieve zero copy?
>
> I think crosvm moved from import model to export model a while ago.
> It probably uses virgl_renderer_export_query now (didn't verify).

You are right, crosvm does export fd and then "RegisterFdAtPciBarOffset".

But, as far as I understand, this means that resources are allocated
from host memory. In embedded systems, usually video memory is the
same as RAM, but here RAM accessible to the guest and video memory
provided by virglrenderer/crosvm will be separate. So I will have to
limit separately, that for example, my guest should have 2 GB of RAM
and 1 GB of video memory. Kindly please confirm that my understanding
is correct.


More information about the virglrenderer-devel mailing list