Re: [v7] Add udmabuf misc device

2018-09-14 Thread Tomeu Vizoso
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 wou

Re: [v7] Add udmabuf misc device

2018-09-14 Thread Gerd Hoffmann
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

Re: [v7] Add udmabuf misc device

2018-09-14 Thread Tomeu Vizoso
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 le

Re: [v7] Add udmabuf misc device

2018-09-14 Thread Gerd Hoffmann
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. > > (2) guest app passes the buffer to way

Re: [v7] Add udmabuf misc device

2018-09-14 Thread Gurchetan Singh
On Wed, Sep 12, 2018 at 11:44 PM Gerd Hoffmann wrote: > > On Wed, Sep 12, 2018 at 08:24:00PM -0700, Gurchetan Singh wrote: > > On Wed, Sep 12, 2018 at 12:03 AM Yann Droneaud wrote: > > > > > > Hi, > > > > > > Le lundi 27 août 2018 à 11:34 +0200, Gerd Hoffmann a écrit : > > > > A driver to let use

Re: [v7] Add udmabuf misc device

2018-09-12 Thread Gerd Hoffmann
On Wed, Sep 12, 2018 at 08:24:00PM -0700, Gurchetan Singh wrote: > On Wed, Sep 12, 2018 at 12:03 AM Yann Droneaud wrote: > > > > Hi, > > > > Le lundi 27 août 2018 à 11:34 +0200, Gerd Hoffmann a écrit : > > > A driver to let userspace turn memfd regions into dma-bufs. > > > > > > Use case: Allows

Re: [v7] Add udmabuf misc device

2018-09-12 Thread Gurchetan Singh
On Wed, Sep 12, 2018 at 12:03 AM Yann Droneaud wrote: > > Hi, > > Le lundi 27 août 2018 à 11:34 +0200, Gerd Hoffmann a écrit : > > A driver to let userspace turn memfd regions into dma-bufs. > > > > Use case: Allows qemu create dmabufs for the vga framebuffer or > > virtio-gpu ressources. Then t

Re: [v7] Add udmabuf misc device

2018-09-12 Thread Yann Droneaud
Hi, Le lundi 27 août 2018 à 11:34 +0200, Gerd Hoffmann a écrit : > A driver to let userspace turn memfd regions into dma-bufs. > > Use case: Allows qemu create dmabufs for the vga framebuffer or > virtio-gpu ressources. Then they can be passed around to display > those guest things on the host.

Re: [PATCH v7] Add udmabuf misc device

2018-09-11 Thread Gerd Hoffmann
> > >> +if (WARN_ON(vmf->pgoff >= ubuf->pagecount)) > > >> +return VM_FAULT_SIGBUS; > > > > > > Just curious, when do you expect this to happen ? > > > > It should not. If it actually happens it would be a bug somewhere, > > thats why the WARN_ON. > > But you seem to con

Re: [PATCH v7] Add udmabuf misc device

2018-09-11 Thread Daniel Vetter
On Tue, Sep 11, 2018 at 11:50 AM, Laurent Pinchart wrote: > Hi Gerd, > > On Tuesday, 11 September 2018 09:50:14 EEST Gerd Hoffmann wrote: >> Hi, >> >> >> +#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create) >> > >> > Why do you start at 0x42 if you reserve the 0x40-0x4f range ? >

Re: [PATCH v7] Add udmabuf misc device

2018-09-11 Thread Laurent Pinchart
Hi Gerd, On Tuesday, 11 September 2018 09:50:14 EEST Gerd Hoffmann wrote: > Hi, > > >> +#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create) > > > > Why do you start at 0x42 if you reserve the 0x40-0x4f range ? > > No particular strong reason, just that using 42 was less boring

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Gerd Hoffmann
Hi, > > +#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create) > > Why do you start at 0x42 if you reserve the 0x40-0x4f range ? No particular strong reason, just that using 42 was less boring than starting with 0x40. > > +#define UDMABUF_CREATE_LIST _IOW('u', 0x43, struct udma

Re: [PATCH v7] Add udmabuf misc device

2018-09-10 Thread Laurent Pinchart
Hi Gerd, Thank you for the patch. CC'ing the linux-api mailing list as this creates a new userspace API. On Monday, 27 August 2018 12:34:44 EEST Gerd Hoffmann wrote: > A driver to let userspace turn memfd regions into dma-bufs. > > Use case: Allows qemu create dmabufs for the vga framebuffer o

Re: [PATCH v7] Add udmabuf misc device

2018-08-31 Thread Daniel Vetter
On Mon, Aug 27, 2018 at 11:34:44AM +0200, Gerd Hoffmann wrote: > A driver to let userspace turn memfd regions into dma-bufs. > > Use case: Allows qemu create dmabufs for the vga framebuffer or > virtio-gpu ressources. Then they can be passed around to display > those guest things on the host. T

[PATCH v7] Add udmabuf misc device

2018-08-27 Thread Gerd Hoffmann
A driver to let userspace turn memfd regions into dma-bufs. Use case: Allows qemu create dmabufs for the vga framebuffer or virtio-gpu ressources. Then they can be passed around to display those guest things on the host. To spice client for classic full framebuffer display, and hopefully some d