mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 18:08:05 +02:00
Make the FreeBSD drm build on FreeBSD 4.0.
This commit is contained in:
parent
a7a2bc8405
commit
db02ce25b8
6 changed files with 33 additions and 4 deletions
|
|
@ -49,7 +49,9 @@
|
|||
#include <sys/sysctl.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/bus.h>
|
||||
#if __FreeBSD_version >= 500005
|
||||
#include <sys/taskqueue.h>
|
||||
#endif
|
||||
|
||||
#ifdef DRM_AGP
|
||||
#include <pci/agpvar.h>
|
||||
|
|
@ -116,6 +118,17 @@ find_first_zero_bit(volatile u_int32_t *p, int max)
|
|||
|
||||
#define memset(p, v, s) bzero(p, s)
|
||||
|
||||
/*
|
||||
* Fake out the module macros for versions of FreeBSD where they don't
|
||||
* exist.
|
||||
*/
|
||||
#if __FreeBSD_version < 500002
|
||||
|
||||
#define MODULE_VERSION(a,b) struct __hack
|
||||
#define MODULE_DEPEND(a,b,c,d,e) struct __hack
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Software interrupts for DMA pipe feeding. The FreeBSD kernel apis
|
||||
* are severely lacking here.
|
||||
|
|
@ -504,7 +517,9 @@ typedef struct drm_device {
|
|||
int last_checked; /* Last context checked for DMA */
|
||||
int last_context; /* Last current context */
|
||||
int last_switch; /* Time at last context switch */
|
||||
#if __FreeBSD_version >= 500005
|
||||
struct task task;
|
||||
#endif
|
||||
struct timespec ctx_start;
|
||||
struct timespec lck_start;
|
||||
#if DRM_DMA_HISTOGRAM
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ KMOD = tdfx
|
|||
SRCS = tdfx_drv.c tdfx_context.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I..
|
||||
KERN = /usr/src/sys
|
||||
KMODDEPS = drm
|
||||
|
||||
@:
|
||||
ln -sf /sys @
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ SRCS = init.c memory.c auth.c context.c drawable.c bufs.c \
|
|||
agpsupport.c ctxbitmap.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I.. # -DDRM_AGP
|
||||
KERN = /usr/src/sys
|
||||
|
||||
@:
|
||||
ln -sf /sys @
|
||||
|
|
|
|||
15
bsd/drmP.h
15
bsd/drmP.h
|
|
@ -49,7 +49,9 @@
|
|||
#include <sys/sysctl.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/bus.h>
|
||||
#if __FreeBSD_version >= 500005
|
||||
#include <sys/taskqueue.h>
|
||||
#endif
|
||||
|
||||
#ifdef DRM_AGP
|
||||
#include <pci/agpvar.h>
|
||||
|
|
@ -116,6 +118,17 @@ find_first_zero_bit(volatile u_int32_t *p, int max)
|
|||
|
||||
#define memset(p, v, s) bzero(p, s)
|
||||
|
||||
/*
|
||||
* Fake out the module macros for versions of FreeBSD where they don't
|
||||
* exist.
|
||||
*/
|
||||
#if __FreeBSD_version < 500002
|
||||
|
||||
#define MODULE_VERSION(a,b) struct __hack
|
||||
#define MODULE_DEPEND(a,b,c,d,e) struct __hack
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Software interrupts for DMA pipe feeding. The FreeBSD kernel apis
|
||||
* are severely lacking here.
|
||||
|
|
@ -504,7 +517,9 @@ typedef struct drm_device {
|
|||
int last_checked; /* Last context checked for DMA */
|
||||
int last_context; /* Last current context */
|
||||
int last_switch; /* Time at last context switch */
|
||||
#if __FreeBSD_version >= 500005
|
||||
struct task task;
|
||||
#endif
|
||||
struct timespec ctx_start;
|
||||
struct timespec lck_start;
|
||||
#if DRM_DMA_HISTOGRAM
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ KMOD = gamma
|
|||
SRCS = gamma_drv.c gamma_dma.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I..
|
||||
KERN = /usr/src/sys
|
||||
KMODDEPS = drm
|
||||
|
||||
@:
|
||||
ln -sf /sys @
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ KMOD = tdfx
|
|||
SRCS = tdfx_drv.c tdfx_context.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I..
|
||||
KERN = /usr/src/sys
|
||||
KMODDEPS = drm
|
||||
|
||||
@:
|
||||
ln -sf /sys @
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue