[PATCH 1/3] virtio-gpu uapi: Add VIRTIO_GPU_F_EXPLICIT_FLUSH feature

Gerd Hoffmann kraxel at redhat.com
Wed May 12 06:44:10 UTC 2021


  Hi,

> However, as part of this feature (explicit flush), I'd like to make the Guest wait until
> the current resource (as specified by resource_flush or set_scanout) is flushed or
> synchronized. But for a different feature I am thinking of (explicit sync), I'd like to
> make the Guest wait for the previous buffer/resource submitted (available via 
> old_state->fb).

For page-flipping I guess?  i.e. you want submit a new framebuffer, then
wait until the host doesn't need the previous one?  That is likewise
linked to a command, although it is set_scanout this time.

So, right now qemu simply queues the request and completes the command
when a guest sends a resource_flush our set_scanout command.  You want
be notified when the host is actually done processing the request.

I still think it makes sense extend the resource_flush and set_scanout
commands for that, for example by adding a flag for the flags field in
the request header.  That way it is clear what exactly you are waiting
for.  You can also attach a fence to the request which you can later
wait on.

take care,
  Gerd



More information about the dri-devel mailing list