[v7] Add udmabuf misc device

Tomeu Vizoso tomeu.vizoso at collabora.com
Fri Sep 14 14:18:08 UTC 2018


On 09/14/2018 03:00 PM, Gerd Hoffmann wrote:
> On Fri, Sep 14, 2018 at 02:00:30PM +0200, Tomeu Vizoso wrote:
>> On 09/14/2018 08:37 AM, Gerd Hoffmann wrote:
>>>     Hi,
>>>
>>>>> Well, no.  This is *not* about 3D, it's about software rendering, for
>>>>> example cairo doing its work for gtk apps.  So the workflow would be
>>>>> along these lines:
>>>>>
>>>>> (1) guest app allocates dumb drm buffer from virtio-gpu, renders to it.
>>
>> Why not let clients keep allocating memory for buffers with memfd?
>>
>> The guest proxy would then create a virtio-gpu resource to wrap the shm pool
>> memory.
> 
> Should be workable too, with udmabuf in the guest.  Allocate with memfd,
> turn into dmabuf using udmabuf, let the virtio-gpu guest driver import
> the thing so you have a virtio-gpu resource handle for it.
> 
> I don't see why this is better than using virtio-gpu dumb buffers
> directly though.

Because wl_shm clients are allocating memory with memfd already, so they 
would need to be modified so they allocate dumb buffers instead. In 
practice, that means only modifying gtk, qt and sdl.

Cheers,

Tomeu


More information about the dri-devel mailing list