Page MenuHomeFreeBSD

linuxkpi: Define `MINORBITS`
AcceptedPublic

Authored by dumbbell on Thu, Apr 16, 9:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 18, 9:55 AM
Unknown Object (File)
Sat, Apr 18, 7:47 AM
Unknown Object (File)
Sat, Apr 18, 7:47 AM
Unknown Object (File)
Sat, Apr 18, 6:10 AM
Unknown Object (File)
Fri, Apr 17, 4:06 AM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
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

Lint
Lint Skipped
Unit
Tests Skipped