Feature request: EXT_image_dma_buf_import `DRM_FORMAT_RGB888` support
Describe the problem
Attempting to use EXT_image_dma_buf_import with DRM_FORMAT_RGB888
does not work.
Describe the new feature behavior
Currently amdgpu supports 16-bit (BGR565) and 32-bit BGRA DRM fourcc types for textures created via EXT_image_dma_buf_import
. Looking at the amdgpu
source it seems that 24-bit RGB support is possible but has simply been omitted.
Describe the target user/application
Users of applications that wish to import RGB 24-bit textures directly, such as the Looking Glass project which provides an extremely low latency high performance interface to a VFIO virtual machine with a pass-through GPU. On more limited hardware such as laptops, the bandwidth saving by operating in 24-bit is highly desirable as it will save roughly 8MiB per frame at 4k, or 480MiB/s of bandwidth at 60FPS leading to CPU and power savings, along with a better overall user experience.
How do you plan to validate this feature
We have already implemented support into Looking Glass for when it is available. https://github.com/gnif/LookingGlass/commit/43a3fb0db3f0b44156a676b0249d316ad51ff580
Business case
- Reduces power consumption
- Reduces memory bandwidth consumption by 25%
- Reduces memory pressure by 25%
- Simplifies application logic for 24-bit texture imports
Draft of the userspace API
This is not a new userspace API, rather a request enhance amdgpu
to support DRM_FORMAT_RGB888 when using EXT_image_dma_buf_import
.