summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-05-27 19:45:30 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-05-27 19:45:30 +0000
commitdb5f6db1d3e912dd792a8013b5825b3922088bfe (patch)
tree61722b7cf9120909eab212098aa55191865dd704 /sys
parent6d2e844dc60d2d800fa27d11ad2794a7be3c1f56 (diff)
Since the vtophys stuff was nuked, drm now works on amd64 too. Add the
relavent config goo. DRM_NO_MTRR is still needed on amd64 since the mtrr apis differ between it and i386. ok kettenis@.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/conf.c5
-rw-r--r--sys/arch/amd64/conf/GENERIC13
-rw-r--r--sys/dev/pci/drm/drmP.h4
-rw-r--r--sys/dev/pci/drm/drm_atomic.h2
4 files changed, 21 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/conf.c b/sys/arch/amd64/amd64/conf.c
index f7f5aeb5867..9a0fce499b1 100644
--- a/sys/arch/amd64/amd64/conf.c
+++ b/sys/arch/amd64/amd64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.20 2008/05/14 20:49:46 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.21 2008/05/27 19:45:29 oga Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -173,6 +173,8 @@ cdev_decl(cztty);
cdev_decl(nvram);
#include "agp.h"
cdev_decl(agp);
+#include "drmbase.h"
+cdev_decl(drm);
#include "wsdisplay.h"
#include "wskbd.h"
@@ -296,6 +298,7 @@ struct cdevsw cdevsw[] =
cdev_bthub_init(NBTHUB,bthub), /* 84: bthub */
cdev_nvram_init(NNVRAM,nvram), /* 85: NVRAM interface */
cdev_agp_init(NAGP,agp), /* 86: agp */
+ cdev_drm_init(NDRMBASE,drm), /* 87: drm */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC
index e2de92acf80..6d8113af67c 100644
--- a/sys/arch/amd64/conf/GENERIC
+++ b/sys/arch/amd64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.230 2008/05/23 15:39:43 jasper Exp $
+# $OpenBSD: GENERIC,v 1.231 2008/05/27 19:45:29 oga Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -567,3 +567,14 @@ pseudo-device hotplug 1 # devices hot plugging
# mouse & keyboard multiplexor pseudo-devices
pseudo-device wsmux 2
pseudo-device crypto 1
+
+# DRM: direct rendering modules
+#option DRM_DEBUG
+#inteldrm* at vga? # Intel i915, i945 DRM driver
+#machdrm* at vga? # mach64 (3D Rage Pro, Rage) DRM driver
+#mgadrm* at vga? # Matrox G[24]00, G[45]50 DRM driver
+#ragedrm* at vga? # ATI Rage 128 DRM driver
+#radeondrm* at vga? # ATI Radeon DRM driver
+#savagedrm* at vga? # S3 Savage DRM driver
+#sisdrm* at vga? # SiS DRM driver
+#tdfxdrm* at vga? # 3dfx (voodoo) DRM driver
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index 0d951fb9fb4..e2ca5e3e3b0 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -130,6 +130,10 @@ typedef struct drm_file drm_file_t;
#include "drm_linux_list.h"
#include "drm_atomic.h"
+#ifdef __amd64__
+#define DRM_NO_MTRR
+#endif /* Until the mtrr apis are merged. */
+
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <opt_drm.h>
#endif
diff --git a/sys/dev/pci/drm/drm_atomic.h b/sys/dev/pci/drm/drm_atomic.h
index 08ac224d3fd..01042c6c43e 100644
--- a/sys/dev/pci/drm/drm_atomic.h
+++ b/sys/dev/pci/drm/drm_atomic.h
@@ -65,7 +65,7 @@ typedef u_int32_t atomic_t;
#endif /* !__FreeBSD__ */
#if !defined(__FreeBSD_version) || (__FreeBSD_version < 500000)
-#if defined(__i386__)
+#if defined(__i386__) || defined(__amd64__)
/* The extra atomic functions from 5.0 haven't been merged to 4.x */
static __inline int
atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)