[RFC PATCH v2 0/6] Introduce sparse DRM shmem object allocations

Thomas Zimmermann tzimmermann at suse.de
Mon Mar 31 09:12:11 UTC 2025


Hi

Am 31.03.25 um 10:31 schrieb Boris Brezillon:
> Hi Thomas,
>
> On Mon, 31 Mar 2025 09:13:59 +0200
> Thomas Zimmermann <tzimmermann at suse.de> wrote:
>
>> Hi
>>
>> Am 26.03.25 um 03:14 schrieb Adrián Larumbe:
>>> This patch series is a proposal for implementing sparse page allocations
>>> for shmem objects. It was initially motivated by a kind of BO managed by
>>> the Panfrost driver, the tiler heap, which grows on demand every time the
>>> GPU faults on a virtual address within its drm_mm-managed ranged.
>> I've looked at panfrost_gem.h and found that the driver's gem structure
>> has grown quite a bit. It seems to have outgrown gem-shmem already.  I
>> think you should consider pulling a copy of gem-shmem into the driver
>> and building a dedicated memory manager on top.
> Actually, it's not just something we need for panfrost. I plan to use
> the same non-blocking allocation mechanism for panthor's heap
> chunks/buffers, and lima could use it for its heap buffers too. The
> non-blocking page allocation is also something i915 has been
> open-coding here [1], and I believe that some of this logic could
> (and should IMHO) live in common code rather than each driver coming
> with its own solution, thus increasing the risk of bugs/inconsistencies.
> That's even more important if we provide a common gem-shmem shrinker
> like Dmitry's has been proposing.

Thanks for the note.

Best regards
Thomas

>
> Best Regards,
>
> Boris
>
> [1]https://elixir.bootlin.com/linux/v6.13.7/source/drivers/gpu/drm/i915/gem/i915_gem_shmem.c#L89

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



More information about the dri-devel mailing list