Skip to content

renderer-native: Remove no_add_fb2

Daniel Stone requested to merge daniels/mutter:native-backend-use-addfb2 into master

drmModeAddFB2 allows userspace to specify a real format enum on non-ancient kernels, as an improvement over the legacy drmModeAddFB which derives format from a fixed depth/bpp mapping.

As an optimisation, Weston used to decide at the first failure of drmModeAddFB2 that the ioctl was unavailable: as non-existent DRM ioctls return -EINVAL rather than -ENOSYS or similar, bad parameters are not distinguishable from the ioctl not being present.

Mutter has also implemented the same optimisation for dumb framebuffers, which potentially papers over errors for the gain of avoiding one ioctl which will rapidly fail on ancient kernels. Remove the optimisation and always use AddFB2 where possible.

Closes: #14 (closed)

Edited by Daniel Stone

Merge request reports