Commit graph

3 commits

Author SHA1 Message Date
Lutz Bichler
872c817d52 linuxkpi: Correct DIV_ROUND_DOWN_ULL
This fixes a black screen issue with the i915 DRM driver from Linux v6.8

Fixes: c4e0746e7d ("LinuxKPI: Add helper macros IS_ALIGNED and DIV_ROUND_DOWN_ULL.")
Pull request: https://github.com/freebsd/freebsd-src/pull/1612

(cherry picked from commit ef037a028af7cc331e36ca6c8e2eb5612cdb1130)
2025-03-18 09:27:37 -04:00
Vladimir Kondratyev
42aeb3866c LinuxKPI: Add abs_diff to linux/math.h
It returns absolute value of the difference between the arguments.

Add LinuxKPI version check as the macro was moved from drm-kmod to
linux/math.h in Linux kernel commit 46f12960aad (6.6 timeframe).

Sponsored by:	Serenity Cyber Security, LLC
MFC after:	1 week
Reviewed by:	bz, emaste
Differential Revision:	https://reviews.freebsd.org/D45453

(cherry picked from commit afc450fac9f04f11cd916916ac28ffc52a973e1e)
2024-08-02 00:09:40 +03:00
Vladimir Kondratyev
9cc3f82da4 LinuxKPI: Move linux/math.h content out of linux/kernel.h
To match Linux and allow direct linux/math.h inclusion.

Sponsored by:	Serenity Cyber Security, LLC
MFC after:	1 week
Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D45452

(cherry picked from commit 588064e658d32f037854dd852b988728197a28de)
2024-08-02 00:09:39 +03:00