Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-08 Thread Miguel Angel Vico
On Wed, 6 Dec 2017 16:57:45 -0800 James Jones wrote: > On 12/06/2017 03:25 AM, Nicolai Hähnle wrote: > > On 06.12.2017 08:07, James Jones wrote: > > [snip] > >> So lets say you have a setup where both display and GPU supported > >> FOO/tiled, but only GPU

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread James Jones
On 12/06/2017 03:25 AM, Nicolai Hähnle wrote: On 06.12.2017 08:07, James Jones wrote: [snip] So lets say you have a setup where both display and GPU supported FOO/tiled, but only GPU supported compressed (FOO/CC) and cached (FOO/cached).  But the GPU supported the following transitions:    

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Nicolai Hähnle
On 06.12.2017 14:25, Rob Clark wrote: On Wed, Dec 6, 2017 at 2:07 AM, James Jones wrote: Note I also posed the question of whether things like cached (and similarly compression, since I view compression as roughly an equivalent mechanism to a cache) in one of the open

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 6:25 AM, Nicolai Hähnle wrote: > On 06.12.2017 08:07, James Jones wrote: > [snip] > >> So lets say you have a setup where both display and GPU supported >> FOO/tiled, but only GPU supported compressed (FOO/CC) and cached >> (FOO/cached). But

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 2:07 AM, James Jones wrote: > On 12/01/2017 01:52 PM, Miguel Angel Vico wrote: >> >> >> >> On Fri, 1 Dec 2017 13:38:41 -0500 >> Rob Clark wrote: >> >>> >>> sure, this was just a hypothetical example. But to take this case as >>>

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 12:52 AM, James Jones wrote: > On 11/30/2017 10:48 AM, Rob Clark wrote: >> >> On Thu, Nov 30, 2017 at 1:28 AM, James Jones wrote: >>> >>> On 11/29/2017 01:10 PM, Rob Clark wrote: On Wed, Nov 29, 2017 at 12:33 PM, Jason

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Nicolai Hähnle
On 06.12.2017 08:07, James Jones wrote: [snip] So lets say you have a setup where both display and GPU supported FOO/tiled, but only GPU supported compressed (FOO/CC) and cached (FOO/cached).  But the GPU supported the following transitions:     trans_a: FOO/CC -> null     trans_b: FOO/cached

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Nicolai Hähnle
On 06.12.2017 08:01, James Jones wrote: On 12/01/2017 10:34 AM, Nicolai Hähnle wrote: On 01.12.2017 18:09, Nicolai Hähnle wrote: [snip] As for the actual transition API, I accept that some metadata may be required, and the metadata probably needs to depend on the memory layout, which is

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-05 Thread James Jones
On 12/01/2017 01:52 PM, Miguel Angel Vico wrote: On Fri, 1 Dec 2017 13:38:41 -0500 Rob Clark wrote: On Fri, Dec 1, 2017 at 12:09 PM, Nicolai Hähnle wrote: On 01.12.2017 16:06, Rob Clark wrote: On Thu, Nov 30, 2017 at 5:43 PM, Nicolai Hähnle

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-05 Thread James Jones
On 12/01/2017 10:34 AM, Nicolai Hähnle wrote: On 01.12.2017 18:09, Nicolai Hähnle wrote: [snip] As for the actual transition API, I accept that some metadata may be required, and the metadata probably needs to depend on the memory layout, which is often vendor-specific. But even linear

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-05 Thread James Jones
On 11/30/2017 12:06 PM, Lyude Paul wrote: On Thu, 2017-11-30 at 13:20 -0500, Rob Clark wrote: On Thu, Nov 30, 2017 at 12:59 AM, James Jones wrote: On 11/29/2017 04:09 PM, Miguel Angel Vico wrote: On Wed, 29 Nov 2017 16:28:15 -0500 Rob Clark wrote:

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-05 Thread James Jones
On 11/30/2017 10:48 AM, Rob Clark wrote: On Thu, Nov 30, 2017 at 1:28 AM, James Jones wrote: On 11/29/2017 01:10 PM, Rob Clark wrote: On Wed, Nov 29, 2017 at 12:33 PM, Jason Ekstrand wrote: On Sat, Nov 25, 2017 at 1:20 PM, Rob Clark

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-01 Thread Miguel Angel Vico
On Fri, 1 Dec 2017 13:38:41 -0500 Rob Clark wrote: > On Fri, Dec 1, 2017 at 12:09 PM, Nicolai Hähnle wrote: > > On 01.12.2017 16:06, Rob Clark wrote: > >> > >> On Thu, Nov 30, 2017 at 5:43 PM, Nicolai Hähnle > >> wrote: > >>> >

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-01 Thread Rob Clark
On Fri, Dec 1, 2017 at 12:09 PM, Nicolai Hähnle wrote: > On 01.12.2017 16:06, Rob Clark wrote: >> >> On Thu, Nov 30, 2017 at 5:43 PM, Nicolai Hähnle >> wrote: >>> >>> Hi, >>> >>> I've had a chance to look a bit more closely at the allocator prototype >>>

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-01 Thread Nicolai Hähnle
On 01.12.2017 18:09, Nicolai Hähnle wrote: [snip] As for the actual transition API, I accept that some metadata may be required, and the metadata probably needs to depend on the memory layout, which is often vendor-specific. But even linear layouts need some transitions for caches. We probably

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-01 Thread Nicolai Hähnle
On 01.12.2017 16:06, Rob Clark wrote: On Thu, Nov 30, 2017 at 5:43 PM, Nicolai Hähnle wrote: Hi, I've had a chance to look a bit more closely at the allocator prototype repository now. There's a whole bunch of low-level API design feedback, but for now let's focus on the

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-01 Thread Rob Clark
On Thu, Nov 30, 2017 at 5:43 PM, Nicolai Hähnle wrote: > Hi, > > I've had a chance to look a bit more closely at the allocator prototype > repository now. There's a whole bunch of low-level API design feedback, but > for now let's focus on the high-level stuff first. > > Going

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Nicolai Hähnle
Hi, I've had a chance to look a bit more closely at the allocator prototype repository now. There's a whole bunch of low-level API design feedback, but for now let's focus on the high-level stuff first. Going by the 4.5 major object types (as also seen on slide 5 of your presentation [0]),

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Lyude Paul
On Thu, 2017-11-30 at 13:20 -0500, Rob Clark wrote: > On Thu, Nov 30, 2017 at 12:59 AM, James Jones wrote: > > On 11/29/2017 04:09 PM, Miguel Angel Vico wrote: > > > > > > On Wed, 29 Nov 2017 16:28:15 -0500 > > > Rob Clark wrote: > > > > > > > > Do we

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Lyude Paul
On Thu, 2017-11-30 at 14:20 -0500, Alex Deucher wrote: > On Thu, Nov 30, 2017 at 2:10 PM, Nicolai Hähnle wrote: > > On 30.11.2017 19:52, Rob Clark wrote: > > > > > > On Thu, Nov 30, 2017 at 4:21 AM, Nicolai Hähnle > > > wrote: > > > > > > > > On

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Alex Deucher
On Thu, Nov 30, 2017 at 2:10 PM, Nicolai Hähnle wrote: > On 30.11.2017 19:52, Rob Clark wrote: >> >> On Thu, Nov 30, 2017 at 4:21 AM, Nicolai Hähnle >> wrote: >>> >>> On 30.11.2017 01:09, Miguel Angel Vico wrote: >> >> >> It seems to me that

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Nicolai Hähnle
On 30.11.2017 19:52, Rob Clark wrote: On Thu, Nov 30, 2017 at 4:21 AM, Nicolai Hähnle wrote: On 30.11.2017 01:09, Miguel Angel Vico wrote: It seems to me that $new_thing should grow as a separate thing whether it ends up replacing GBM or GBM internals are somewhat

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Rob Clark
On Thu, Nov 30, 2017 at 4:21 AM, Nicolai Hähnle wrote: > On 30.11.2017 01:09, Miguel Angel Vico wrote: It seems to me that $new_thing should grow as a separate thing whether it ends up replacing GBM or GBM internals are somewhat rewritten on top of it. If

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Rob Clark
On Thu, Nov 30, 2017 at 1:28 AM, James Jones wrote: > On 11/29/2017 01:10 PM, Rob Clark wrote: >> >> On Wed, Nov 29, 2017 at 12:33 PM, Jason Ekstrand >> wrote: >>> >>> On Sat, Nov 25, 2017 at 1:20 PM, Rob Clark wrote:

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Rob Clark
On Thu, Nov 30, 2017 at 12:59 AM, James Jones wrote: > On 11/29/2017 04:09 PM, Miguel Angel Vico wrote: >> >> On Wed, 29 Nov 2017 16:28:15 -0500 >> Rob Clark wrote: >>> >>> Do we need to define both in-place and copy transitions? Ie. what if >>> GPU is

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Nicolai Hähnle
On 30.11.2017 07:28, James Jones wrote: This is all a really long-winded way of saying yeah I think it would be technically feasible to implement GBM on top of the generic allocator mechanisms, but I don't think that's a very interesting undertaking. It'd just be an ABI-compatibility thing for

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-30 Thread Nicolai Hähnle
On 30.11.2017 01:09, Miguel Angel Vico wrote: It seems to me that $new_thing should grow as a separate thing whether it ends up replacing GBM or GBM internals are somewhat rewritten on top of it. If I'm reading you both correctly, you agree with that, so in order to move forward, should we go

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread James Jones
On 11/29/2017 01:10 PM, Rob Clark wrote: On Wed, Nov 29, 2017 at 12:33 PM, Jason Ekstrand wrote: On Sat, Nov 25, 2017 at 1:20 PM, Rob Clark wrote: On Sat, Nov 25, 2017 at 12:46 PM, Jason Ekstrand wrote: On November 24, 2017

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread James Jones
On 11/29/2017 04:09 PM, Miguel Angel Vico wrote: On Wed, 29 Nov 2017 16:28:15 -0500 Rob Clark wrote: On Wed, Nov 29, 2017 at 2:41 PM, Miguel Angel Vico wrote: Many of you may already know, but James is going to be out for a few weeks and I'll be

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Miguel Angel Vico
On Wed, 29 Nov 2017 16:28:15 -0500 Rob Clark wrote: > On Wed, Nov 29, 2017 at 2:41 PM, Miguel Angel Vico > wrote: > > Many of you may already know, but James is going to be out for a few > > weeks and I'll be taking over this in the meantime. > > >

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Rob Clark
On Wed, Nov 29, 2017 at 2:41 PM, Miguel Angel Vico wrote: > Many of you may already know, but James is going to be out for a few > weeks and I'll be taking over this in the meantime. > > See inline for comments. > > On Wed, 29 Nov 2017 09:33:29 -0800 > Jason Ekstrand

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Rob Clark
On Wed, Nov 29, 2017 at 12:33 PM, Jason Ekstrand wrote: > On Sat, Nov 25, 2017 at 1:20 PM, Rob Clark wrote: >> >> On Sat, Nov 25, 2017 at 12:46 PM, Jason Ekstrand >> wrote: >> > On November 24, 2017 09:29:43 Rob Clark

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Miguel Angel Vico
Many of you may already know, but James is going to be out for a few weeks and I'll be taking over this in the meantime. See inline for comments. On Wed, 29 Nov 2017 09:33:29 -0800 Jason Ekstrand wrote: > On Sat, Nov 25, 2017 at 1:20 PM, Rob Clark

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Jason Ekstrand
On Wed, Nov 29, 2017 at 4:19 AM, Nicolai Hähnle wrote: > On 25.11.2017 18:46, Jason Ekstrand wrote: > >> I'm not quite some sure what I think about this. I think I would like to >> see $new_thing at least replace the guts of GBM. Whether GBM becomes a >> wrapper around

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Jason Ekstrand
On Sat, Nov 25, 2017 at 1:20 PM, Rob Clark wrote: > On Sat, Nov 25, 2017 at 12:46 PM, Jason Ekstrand > wrote: > > On November 24, 2017 09:29:43 Rob Clark wrote: > >> > >> > >> On Mon, Nov 20, 2017 at 8:11 PM, James Jones

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-29 Thread Nicolai Hähnle
On 25.11.2017 18:46, Jason Ekstrand wrote: I'm not quite some sure what I think about this.  I think I would like to see $new_thing at least replace the guts of GBM. Whether GBM becomes a wrapper around $new_thing or $new_thing implements the GBM API, I'm not sure.  What I don't think I want

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-25 Thread Rob Clark
On Sat, Nov 25, 2017 at 12:46 PM, Jason Ekstrand wrote: > On November 24, 2017 09:29:43 Rob Clark wrote: >> >> >> On Mon, Nov 20, 2017 at 8:11 PM, James Jones wrote: >>> >>> As many here know at this point, I've been working on

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-25 Thread Jason Ekstrand
On November 24, 2017 09:29:43 Rob Clark wrote: On Mon, Nov 20, 2017 at 8:11 PM, James Jones wrote: As many here know at this point, I've been working on solving issues related to DMA-capable memory allocation for various devices for some time now.

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-24 Thread Jason Ekstrand
On November 24, 2017 09:45:07 Jason Ekstrand wrote: On November 23, 2017 09:00:05 Emil Velikov wrote: Hi James, On 21 November 2017 at 01:11, James Jones wrote: -I have also heard some general comments that regardless

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-24 Thread Jason Ekstrand
On November 23, 2017 09:00:05 Emil Velikov wrote: Hi James, On 21 November 2017 at 01:11, James Jones wrote: -I have also heard some general comments that regardless of the relationship between GBM and the new allocator mechanisms, it might be

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-24 Thread Rob Clark
On Mon, Nov 20, 2017 at 8:11 PM, James Jones wrote: > As many here know at this point, I've been working on solving issues related > to DMA-capable memory allocation for various devices for some time now. I'd > like to take this opportunity to apologize for the way I handled

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-11-23 Thread Emil Velikov
Hi James, On 21 November 2017 at 01:11, James Jones wrote: > -I have also heard some general comments that regardless of the relationship > between GBM and the new allocator mechanisms, it might be time to move GBM > out of Mesa so it can be developed as a stand-alone