[Lima] [PATCH 2/2] drm/lima: driver for ARM Mali4xx GPUs

Koenig, Christian Christian.Koenig at amd.com
Fri Mar 15 16:19:39 UTC 2019


Am 15.03.19 um 17:05 schrieb Eric Anholt:
> [SNIP]
>>>>> I think for lima not having this is fine, but for panfrost it really
>>>>> should have it.
>>>>>
>>>>> If you can implement vulkan you probably want this, nouveau hasn't a
>>>>> vulkan driver because of exactly this problem in their uapi, so maybe
>>>>> adjust panfrost to do user-space managed vma.
>>>> Wouldn't this just require an allocation flag to not map the BO up
>>>> front and then new ioctl's like above to map and unmap at specified
>>>> VAs? Seems like we could add that when we get there.
>>> Sounds pretty reasonable to me.
>> I can only advise to NOT do this.
>>
>> A address space manager in userspace is rather easily doable, but fixing
>> up UAPI without breaking existing applications isn't.
> Can you expand on what goes wrong with Rob's idea?  The only thing I can
> come up with is maybe dmabuf imports don't have a flag for
> don't-automatically-map?

Suppressing automatically mapping is not the problem. The problem is 
that you need exactly one instance to have the authority over the 
address space management.

With Vulkan and features like PRT this must be done by userspace. So 
can't just go ahead in the kernel and allocate some address space and 
map your buffers.

You can of course hope that all client respect this and you don't have 
combinations of multiple clients in the same process, but from 
experience I can say that this won't work at all.

Regards,
Christian.



More information about the lima mailing list