6 releases

0.1.6 Aug 29, 2024
0.1.5 Aug 27, 2024

#866 in Hardware support

Download history 121/week @ 2024-08-05 121/week @ 2024-08-12 186/week @ 2024-08-19 315/week @ 2024-08-26 11/week @ 2024-09-16 7/week @ 2024-09-23 7/week @ 2024-09-30

278 downloads per month

MIT license

220KB
5.5K SLoC

HBM

HBM is a hardware buffer allocator.

hbm crate provides a Rust library to allocate, export/import, and access hardware buffers.

hbm-minigbm crate provides an unstable C API for minigbm's internal use.

hbm-gralloc crate will (it is currently empty) provide a HAL service for Graphics Allocator interface and an SP-HAL for Graphics Mapper interface on Android. It is mainly built via the Android build system rather than via cargo.

TODOs

  • multi-backend
    • e.g., drm-kms adds alignment and modifier constraints, vulkan decides the layout, dma-heap allocates dma-buf, and vulkan again maps/copies
  • more backends, such as vaapi, v4l2, libcamera, etc.
  • policy backend
    • collect constraints and generate a policy offline
    • load constraints from the policy at runtime
    • this is useful when sandboxed or for non-queryable constraints
  • require modifiers
  • no_std
  • hbm-gralloc
    • aidl codegen
    • implement allocator and mapper

Dependencies

~8.5MB
~195K SLoC