Page MenuHomeFreeBSD

linuxkpi: Define `MINORBITS`
ClosedPublic

Authored by dumbbell on Apr 16 2026, 9:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 2:34 PM
Unknown Object (File)
Sun, May 17, 2:18 AM
Unknown Object (File)
Thu, May 14, 2:51 AM
Unknown Object (File)
Sun, May 10, 8:34 PM
Unknown Object (File)
Wed, May 6, 8:31 PM
Unknown Object (File)
Tue, May 5, 4:39 PM
Unknown Object (File)
Tue, May 5, 2:30 PM
Unknown Object (File)
Sun, May 3, 5:38 PM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
Commits
rGae1f6954e2c8: linuxkpi: Define `MINORBITS`
Summary

We can't really define a proper value for this constant because minor and major are encoded in a complex way on FreeBSD which cannot be represented with a simple shift.

The DRM generic code started to use it in Linux 6.12. In this context, MINORBITS is used to define an upper limit passed to xa_alloc(). Therefore it is not used to encode or decode minors. It is used as an arbitrary value. Therefore, we define the constant to 20, like on Linux.

This is part of the update of DRM drivers to Linux 6.12.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable