mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 16:18:52 +02:00
Use a single options header, opt_drm.h, which controls debug code and linux
emulation enabling. Add options to makefiles to turn these on/off.
This commit is contained in:
parent
2ea4becd8b
commit
e19e0e4148
21 changed files with 115 additions and 84 deletions
|
|
@ -38,6 +38,13 @@
|
|||
#include <pci/agpvar.h>
|
||||
#endif
|
||||
|
||||
#include <opt_drm.h>
|
||||
#if DRM_DEBUG
|
||||
#undef DRM_DEBUG_CODE
|
||||
#define DRM_DEBUG_CODE 2
|
||||
#endif
|
||||
#undef DRM_DEBUG
|
||||
|
||||
#define DRM_TIME_SLICE (hz/20) /* Time slice for GLXContexts */
|
||||
|
||||
#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD= mga
|
||||
NOMAN= YES
|
||||
SRCS= mga_drv.c mga_state.c mga_warp.c mga_dma.c
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#MGA_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(MGA_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "mga.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD = r128
|
||||
NOMAN= YES
|
||||
SRCS = r128_cce.c r128_drv.c r128_state.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#R128_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(R128_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "r128.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD = radeon
|
||||
NOMAN= YES
|
||||
SRCS = radeon_cp.c radeon_drv.c radeon_state.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#RADEON_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(RADEON_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "radeon.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../
|
||||
.PATH: ${.CURDIR}/..
|
||||
KMOD= tdfx
|
||||
NOMAN= YES
|
||||
SRCS= tdfx_drv.c
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#TDFX_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(TDFX_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "tdfx.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,13 @@
|
|||
#include <pci/agpvar.h>
|
||||
#endif
|
||||
|
||||
#include <opt_drm.h>
|
||||
#if DRM_DEBUG
|
||||
#undef DRM_DEBUG_CODE
|
||||
#define DRM_DEBUG_CODE 2
|
||||
#endif
|
||||
#undef DRM_DEBUG
|
||||
|
||||
#define DRM_TIME_SLICE (hz/20) /* Time slice for GLXContexts */
|
||||
|
||||
#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD = gamma
|
||||
NOMAN= YES
|
||||
SRCS = gamma_drv.c gamma_dma.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#TDFX_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(TDFX_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
#include "gamma.h"
|
||||
#include "drmP.h"
|
||||
#include "drm.h"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "i810.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD= mga
|
||||
NOMAN= YES
|
||||
SRCS= mga_drv.c mga_state.c mga_warp.c mga_dma.c
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#MGA_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(MGA_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "mga.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD = r128
|
||||
NOMAN= YES
|
||||
SRCS = r128_cce.c r128_drv.c r128_state.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#R128_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(R128_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "r128.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
KMOD = radeon
|
||||
NOMAN= YES
|
||||
SRCS = radeon_cp.c radeon_drv.c radeon_state.c
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS += device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS += ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#RADEON_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(RADEON_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "radeon.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../
|
||||
.PATH: ${.CURDIR}/..
|
||||
KMOD= tdfx
|
||||
NOMAN= YES
|
||||
SRCS= tdfx_drv.c
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm_linux.h
|
||||
SRCS+= device_if.h bus_if.h pci_if.h opt_drm.h
|
||||
CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
||||
|
||||
@:
|
||||
|
|
@ -13,14 +13,17 @@ CFLAGS+= ${DEBUG_FLAGS} -I. -I..
|
|||
machine:
|
||||
ln -sf /sys/i386/include machine
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# This line enables linux ioctl handling
|
||||
# If you want support for this uncomment this line
|
||||
#TDFX_OPTS= "\#define DRM_LINUX" 1
|
||||
.if defined(DRM_DEBUG)
|
||||
DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
|
||||
.endif
|
||||
|
||||
opt_drm_linux.h:
|
||||
touch opt_drm_linux.h
|
||||
echo $(TDFX_OPTS) >> opt_drm_linux.h
|
||||
.if !defined(DRM_NOLINUX)
|
||||
DRM_LINUX_OPT= "\#define DRM_LINUX 1"
|
||||
.endif
|
||||
|
||||
opt_drm.h:
|
||||
touch opt_drm.h
|
||||
echo $(DRM_DEBUG_OPT) >> opt_drm.h
|
||||
echo $(DRM_LINUX_OPT) >> opt_drm.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <pci/pcivar.h>
|
||||
#include <opt_drm_linux.h>
|
||||
|
||||
#include "tdfx.h"
|
||||
#include "drmP.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue