1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00
freebsd/sys/dev/drm2
Doug Moore c8b0c33b03 log2: move log2 functions from linuxkpi to libkern
Linux has a header file that defines an ilog2 function and some simple
functions/macros that use it: roundup_pow_of_two, is_power_of_2,
rounddown_pow_of_two, and order_base_2.  This change moves three of
those simple functions (all but is_power_of_2) from linuxkpi to
libkern.  It also deletes a few implementations of these functions
that have previously been copied into code for various device drivers,
so that they can use the libkern version.  The is_power_of_2 macro was
not moved because powerof2 in param.h provides almost the same service
already (except that they disagree about whether 0 is a power of two).

Since the linux definitions of these functions were copied into
FreeBSD 11 years ago, linux has improved them, and this change
provides those improvements.  In particular, a giant table of log
values for evaluating ilog2 for constant values is no longer
necessary.

Reviewed by:	alc, markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D45536
2024-06-24 02:00:31 -05:00
..
ttm Avoid waiting on physical allocations that can't possibly be satisfied 2023-12-23 23:01:40 -06:00
drm_agpsupport.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_atomic.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_auth.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_buffer.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_buffer.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_bufs.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
drm_context.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_core.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_crtc_helper.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_crtc_helper.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_crtc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_crtc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_dma.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_dp_helper.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_dp_helper.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_dp_iic_helper.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
drm_drv.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_edid_modes.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_edid.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_edid.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_fb_helper.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_fb_helper.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_fixed.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_fops.c drm2: whack set-but-not-used warns 2023-09-18 21:11:26 +00:00
drm_fourcc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_gem_names.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
drm_gem_names.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_gem.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_global.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_global.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
drm_hashtab.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_hashtab.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_ioc32.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_ioctl.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_irq.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_linux_list_sort.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_linux_list.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_lock.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_mem_util.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_memory.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_mm.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_mm.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_mode.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
drm_modes.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_os_freebsd.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_os_freebsd.h log2: move log2 functions from linuxkpi to libkern 2024-06-24 02:00:31 -05:00
drm_pci.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_pciids.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
drm_platform.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_sarea.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_scatter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_stub.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_sysctl.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm_vm.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drm.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
drmP.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00