Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-12-07 Thread Maxime Ripard
On Tue, Dec 05, 2023 at 04:52:06PM +, Simon Ser wrote: > > I think the logicvc is a much better example for this, since it requires > > framebuffers to be in a specific area, with each plane having a > > dedicated area. > > > > AFAIK that's the most extreme example we have upstream. > > That

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-12-05 Thread Simon Ser
On Wednesday, November 29th, 2023 at 13:45, Maxime Ripard wrote: > > > Hi, > > Thanks for writing this down > > On Thu, Nov 16, 2023 at 03:53:20PM +, Simon Ser wrote: > > > On Thursday, November 9th, 2023 at 08:45, Simon Ser cont...@emersion.fr > > wrote: > > > > > User-space

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-29 Thread Maxime Ripard
Hi, Thanks for writing this down On Thu, Nov 16, 2023 at 03:53:20PM +, Simon Ser wrote: > On Thursday, November 9th, 2023 at 08:45, Simon Ser > wrote: > > > User-space sometimes needs to allocate scanout-capable memory for > > GPU rendering purposes. On a vc4/v3d split render/display SoC,

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-16 Thread Simon Ser
On Thursday, November 9th, 2023 at 08:45, Simon Ser wrote: > User-space sometimes needs to allocate scanout-capable memory for > GPU rendering purposes. On a vc4/v3d split render/display SoC, this > is achieved via DRM dumb buffers: the v3d user-space driver opens > the primary vc4 node,

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-13 Thread Maxime Ripard
On Fri, Nov 10, 2023 at 02:17:45PM +, Simon Ser wrote: > On Friday, November 10th, 2023 at 15:13, Maxime Ripard > wrote: > > > > > > We've talked with Sima at XDC about adding a symlink pointing to the > > > > > DMA heap and extra metadata files describing priorities and such. > > > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-13 Thread Maxime Ripard
On Fri, Nov 10, 2023 at 02:23:16PM +, Simon Ser wrote: > On Friday, November 10th, 2023 at 15:01, Maxime Ripard > wrote: > > > On Fri, Nov 10, 2023 at 11:21:15AM +, Simon Ser wrote: > > > > > On Thursday, November 9th, 2023 at 20:17, Maxime Ripard > > > mrip...@kernel.org wrote: > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Simon Ser
On Friday, November 10th, 2023 at 15:01, Maxime Ripard wrote: > On Fri, Nov 10, 2023 at 11:21:15AM +, Simon Ser wrote: > > > On Thursday, November 9th, 2023 at 20:17, Maxime Ripard mrip...@kernel.org > > wrote: > > > > > > Can we add another function pointer to the struct drm_driver (or

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Simon Ser
On Friday, November 10th, 2023 at 15:13, Maxime Ripard wrote: > > > > We've talked with Sima at XDC about adding a symlink pointing to the > > > > DMA heap and extra metadata files describing priorities and such. > > > > However we don't actually need that part for the purposes of v3d -- > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Maxime Ripard
On Fri, Nov 10, 2023 at 11:08:06AM +, Simon Ser wrote: > > On Thu, Nov 09, 2023 at 03:31:44PM +, Simon Ser wrote: > > > > > - What would be a good name for the heap? "vc4" is maybe a bit naive > > > > > and > > > > > not precise enough. Something with "cma"? Do we need to plan a naming >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Maxime Ripard
On Fri, Nov 10, 2023 at 11:21:15AM +, Simon Ser wrote: > On Thursday, November 9th, 2023 at 20:17, Maxime Ripard > wrote: > > > > Can we add another function pointer to the struct drm_driver (or > > > similar) to do the allocation, and move the actual dmabuf handling > > > code into the

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Simon Ser
On Thursday, November 9th, 2023 at 20:17, Maxime Ripard wrote: > > Can we add another function pointer to the struct drm_driver (or > > similar) to do the allocation, and move the actual dmabuf handling > > code into the core? > > Yeah, I agree here, it just seems easier to provide a global

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Simon Ser
On Thursday, November 9th, 2023 at 20:09, Maxime Ripard wrote: > On Thu, Nov 09, 2023 at 03:31:44PM +, Simon Ser wrote: > > > > - What would be a good name for the heap? "vc4" is maybe a bit naive and > > > > not precise enough. Something with "cma"? Do we need to plan a naming > > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Simon Ser
On Thursday, November 9th, 2023 at 19:38, Dave Stevenson wrote: > Hi Simon > > On Thu, 9 Nov 2023 at 17:46, Simon Ser wrote: > > > > On Thursday, November 9th, 2023 at 16:42, Dave Stevenson > > wrote: > > > > > > > - What would be a good name for the heap? "vc4" is maybe a bit naive > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-10 Thread Sebastian Wick
On Thu, Nov 09, 2023 at 06:38:20PM +, Dave Stevenson wrote: > Hi Simon > > On Thu, 9 Nov 2023 at 17:46, Simon Ser wrote: > > > > On Thursday, November 9th, 2023 at 16:42, Dave Stevenson > > wrote: > > > > > > > - What would be a good name for the heap? "vc4" is maybe a bit naive > > > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Maxime Ripard
On Thu, Nov 09, 2023 at 03:42:38PM +, Dave Stevenson wrote: > Hi Simon and Maxime > > On Thu, 9 Nov 2023 at 09:12, Maxime Ripard wrote: > > > > Hi Simon, > > > > On Thu, Nov 09, 2023 at 07:45:58AM +, Simon Ser wrote: > > > User-space sometimes needs to allocate scanout-capable memory for

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Maxime Ripard
On Thu, Nov 09, 2023 at 03:31:44PM +, Simon Ser wrote: > > > - What would be a good name for the heap? "vc4" is maybe a bit naive and > > > not precise enough. Something with "cma"? Do we need to plan a naming > > > scheme to accomodate for multiple vc4 devices? > > > > That's a general issue

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Dave Stevenson
Hi Simon On Thu, 9 Nov 2023 at 17:46, Simon Ser wrote: > > On Thursday, November 9th, 2023 at 16:42, Dave Stevenson > wrote: > > > > > - What would be a good name for the heap? "vc4" is maybe a bit naive and > > > > not precise enough. Something with "cma"? Do we need to plan a naming > > >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Simon Ser
On Thursday, November 9th, 2023 at 16:42, Dave Stevenson wrote: > > > - What would be a good name for the heap? "vc4" is maybe a bit naive and > > > not precise enough. Something with "cma"? Do we need to plan a naming > > > scheme to accomodate for multiple vc4 devices? > > > > That's a

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Dave Stevenson
Hi Simon and Maxime On Thu, 9 Nov 2023 at 09:12, Maxime Ripard wrote: > > Hi Simon, > > On Thu, Nov 09, 2023 at 07:45:58AM +, Simon Ser wrote: > > User-space sometimes needs to allocate scanout-capable memory for > > GPU rendering purposes. On a vc4/v3d split render/display SoC, this > > is

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Simon Ser
On Thursday, November 9th, 2023 at 16:14, T.J. Mercier wrote: > > + exp_info.priv = vc4; / TODO: unregister when unloading */ > > + > > So unregistering a heap isn't currently possible, but we're trying to > enable that here: >

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Simon Ser
On Thursday, November 9th, 2023 at 13:14, Maira Canal wrote: > On 11/9/23 04:45, Simon Ser wrote: > > User-space sometimes needs to allocate scanout-capable memory for > > GPU rendering purposes. On a vc4/v3d split render/display SoC, this > > is achieved via DRM dumb buffers: the v3d user-space

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Simon Ser
Thanks for the feedback Iago! I've replied to Maxime and I believe that covers your questions as well.

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Simon Ser
On Thursday, November 9th, 2023 at 10:11, Maxime Ripard wrote: > > - Does this approach make sense to y'all in general? > > Makes sense to me :) Great to hear! > > - What would be a good name for the heap? "vc4" is maybe a bit naive and > > not precise enough. Something with "cma"? Do we

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread T.J. Mercier
On Wed, Nov 8, 2023 at 11:46 PM Simon Ser wrote: > > +int vc4_dma_heap_create(struct vc4_dev *vc4) > +{ > + struct dma_heap_export_info exp_info; > + struct dma_heap *heap; > + > + exp_info.name = "vc4"; /* TODO: allow multiple? */ > + exp_info.ops = _dma_heap_ops; > +

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Maxime Ripard
Hi Maira, On Thu, Nov 09, 2023 at 09:14:29AM -0300, Maira Canal wrote: > On 11/9/23 04:45, Simon Ser wrote: > > User-space sometimes needs to allocate scanout-capable memory for > > GPU rendering purposes. On a vc4/v3d split render/display SoC, this > > is achieved via DRM dumb buffers: the v3d

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Maira Canal
Hi Simon, Thanks for working on this feature! On 11/9/23 04:45, Simon Ser wrote: User-space sometimes needs to allocate scanout-capable memory for GPU rendering purposes. On a vc4/v3d split render/display SoC, this is achieved via DRM dumb buffers: the v3d user-space driver opens the primary

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Iago Toral
Hi Simon, thanks for looking into this! I few comments below inline... El jue, 09-11-2023 a las 07:45 +, Simon Ser escribió: > User-space sometimes needs to allocate scanout-capable memory for > GPU rendering purposes. On a vc4/v3d split render/display SoC, this > is achieved via DRM dumb

Re: [RFC PATCH 2/2] vc4: introduce DMA-BUF heap

2023-11-09 Thread Maxime Ripard
Hi Simon, On Thu, Nov 09, 2023 at 07:45:58AM +, Simon Ser wrote: > User-space sometimes needs to allocate scanout-capable memory for > GPU rendering purposes. On a vc4/v3d split render/display SoC, this > is achieved via DRM dumb buffers: the v3d user-space driver opens > the primary vc4