[PATCH] drm: Add support for two-ended allocation, v2

Christian König deathsimple at vodafone.de
Wed Apr 2 08:11:15 PDT 2014


Am 02.04.2014 16:54, schrieb Lauri Kasanen:
> On Wed, 02 Apr 2014 13:00:00 +0200
> Christian König <deathsimple at vodafone.de> wrote:
>
>> Nice idea, but I wouldn't put the decision where to place the buffer
>> into TTM based on it's size.
>>
>> Instead please make that a proper TTM placement flag because for example
>> for VM page tables we want them to be at the end of VRAM, not because
>> they are big (which they are anyway) but because they never accessed by
>> the CPU.
> I think there aren't many special cases like that, and they could
> already be handled by setting the first and last pages for the bo?

Nope, that would require the driver to find a certain position for the 
buffer by itself.

The placement flag should just move allocation from preferring the start 
of the address space to preferring the end of it.

What I wanted to note is that this way the driver could use this feature 
in a much more flexible way, not only to change placement of buffers 
based on the size, but also on other criteria as well (and yes I have 
couple of use cases for this in mind).

Additional to that you could also separate the patch into adding this 
functionality and enabling it for radeon, which in the end will allow 
people to easier bisect it in the case something is wrong.

Apart from that the patch is a really nice piece of work,
Christian.

>
> - Lauri



More information about the dri-devel mailing list