GBM as standalone buffer allocator

Rob Clark robdclark at gmail.com
Mon Oct 23 19:35:38 UTC 2023


On Mon, Oct 23, 2023 at 6:22 AM Srinivas Pullakavi (QUIC)
<quic_spullaka at quicinc.com> wrote:
>
> Hi,
>
>
>
> We are planning to enhance GBM as a standalone buffer allocator, which can be used for all multi-media clients. Ex: video, camera, display etc;
>
>
>
> GBM create device expects a file descriptor to be passed, which points to drm node. This brings in a dependency on display for buffer allocation. On headless devices where display driver is not present, GBM cannot be used for buffer allocations. E.g. Recording cases where pipeline is setup between Camera, Video, Graphics.
>

Note that you need some sort of device to allocate buffers from.  With
mesa and upstream kernel, that would be the drm device.  (However as
Adam points out, a drm device does not necessarily need a display..
for example, several vendors have compute-only GPUs (pci) which have
no display outputs.)

You might want to look at ChromeOS's minigbm.  It already handles
these cases (buffer sharing across display/gpu/video/camera).

BR,
-R

[1] https://chromium.googlesource.com/chromiumos/platform/minigbm/

>
> Could you please share your comments on what will be a good design to make GBM flexible for above?
>
>
>
> Thanks,
>
> Srinivas
>
>


More information about the mesa-dev mailing list