Since they're sensitive to KPI issues, using these modules on a kernel from a different FreeBSD minor version can result in anything from immediate panics at load to weird behaviour in corner cases (in my case, mode switch would hang, but only when HDMI 2.0 support was enabled on both my monitors).
These modules could print a warning on mismatched kernel osreldate, early during module load. They could also fail the kldload, but that might be too strict at this point.
Getting a version identifier that reliably matches/mismatches the same as KPI changes might not be possible, but even an incomplete discrimination based on osrelease would help.
Since they're sensitive to KPI issues, using these modules on a kernel from a different FreeBSD minor version can result in anything from immediate panics at load to weird behaviour in corner cases (in my case, mode switch would hang, but only when HDMI 2.0 support was enabled on both my monitors).
These modules could print a warning on mismatched kernel osreldate, early during module load. They could also fail the kldload, but that might be too strict at this point.
Getting a version identifier that reliably matches/mismatches the same as KPI changes might not be possible, but even an incomplete discrimination based on osrelease would help.