cdd7fe04 np Jan. 10, 2022, 9:05 p.m.
This ensures that the driver reports an error instead of failing
silently when an invalid media is requested.

Reported by:	Suhas Lokesha @ Chelsio
MFC after:	1 week
Sponsored by:	Chelsio Communications
cgit
94e6b3fe np Jan. 10, 2022, 8:35 p.m.
MFC after:	1 week
Sponsored by:	Chelsio Communications
cgit
39d5cbdc np Jan. 10, 2022, 8:15 p.m.
MFC after:	1 week
Sponsored by:	Chelsio Communications
cgit
6792568f np Jan. 10, 2022, 8:15 p.m.
MFC after:	1 week
Sponsored by:	Chelsio Communications
cgit
7356f661 wulf Jan. 10, 2022, 7:49 p.m.
swap parameter is not supported as it is rarely used in Linux kernel
and its implementation will add some preprocessor spaghetti to qsort.

Required by drm-kmod.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D33675
cgit
64dab63f wulf Jan. 10, 2022, 7:49 p.m.
compile time assertion on non-NULL pointers. Tests conducted show that
_Static_assert, negative array size method and current code does not
handle pointers well enough. Bit field method solves this problem.

This change is derrived from Linux implementation of BUILD_BUG_ON_ZERO.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D33674
cgit
307f78f3 wulf Jan. 10, 2022, 7:49 p.m.
MFC after:	1 week
Reviewed by:	bz, emaste, hselasky, manu
Differential Revision:	https://reviews.freebsd.org/D33562
cgit
98b12978 wulf Jan. 10, 2022, 7:49 p.m.
They are superseded by PAT and mostly useless nowadays but still can be
used on Pentium III/IV era processors. Unlike drm-kmod version, this one
ignores MTRR if PAT is available that fixes confusing "Failed to add WC
MTRR for [0xXXXX-0xYYYY]: 22; performance may suffer" message often
appearing during drm-kmod initialization process.

MFC after:	1 week
Reviewed by:	hselasky, manu
Differential Revision:	https://reviews.freebsd.org/D33561
cgit
14568164 wulf Jan. 10, 2022, 7:49 p.m.
Required by drm-kmod.

Obtained from:	OpenBSD
MFC after:	1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D33560
cgit
f9c8b588 wulf Jan. 10, 2022, 7:49 p.m.
Required by drm-kmod.

Obtained from:	DragonflyBSD
MFC after:	1 week
Reviewed by:	hselasky, manu

Differential Revision:	https://reviews.freebsd.org/D33559
cgit
2e194c20 wulf Jan. 10, 2022, 7:49 p.m.
Required by drm-kmod 5.7

MFC after:	1 week
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D33307
cgit
f3ddb82d wulf Jan. 10, 2022, 7:49 p.m.
static_cpu_has returns true if CPU supports requested feature.

Obtained from:	OpenBSD
MFC after:	1 week
Reviewed by:	hselasky, manu
Differential Revision:	https://reviews.freebsd.org/D33301
cgit
89bb7f9b wulf Jan. 10, 2022, 7:49 p.m.
efi_enabled(EFI_BOOT) returns true if machine was booted from EFI
Used by drm-kmod and some unported drm drivers like hyperv

MFC after:	1 week
Reviewed by:	hselasky, manu
Differential Revision:	https://reviews.freebsd.org/D33300
cgit
882f8d05 wulf Jan. 10, 2022, 7:49 p.m.
Required by drm-kmod

Obtained from:	DragonflyBSD
Differential Revision:	https://reviews.freebsd.org/D33299
cgit
0b1244bd wulf Jan. 10, 2022, 7:49 p.m.
Obsolete it usage but keep for a while for drm-kmod 5.4 compatibility

MFC after:	1 week
Reviewed by:	hselasky, manu
Differential Revision:	https://reviews.freebsd.org/D33298
cgit