Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys First draft of in-kernel drm2 attachment.
details: https://anonhg.NetBSD.org/src/rev/04c948081aad
branches: riastradh-drm2
changeset: 788629:04c948081aad
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jan 29 19:47:38 2014 +0000
description:
First draft of in-kernel drm2 attachment.
The drm2 `drm' device is now called `drmkms' (likewise `i915drmkms',
&c.) so that it can coexist with the old drm code to reduce diffs
from HEAD. (Can't call a device `drm2'.)
diffstat:
sys/conf/files | 8 +-
sys/dev/pci/files.pci | 6 +-
sys/dev/wsfb/files.wsfb | 7 +-
sys/external/bsd/drm2/conf/files.drm2 | 209 ++++++++++++++-------------
sys/external/bsd/drm2/drm/drm_drv.c | 71 ++++++++-
sys/external/bsd/drm2/drm/drm_module.c | 47 +++---
sys/external/bsd/drm2/drm/drm_vm.c | 8 +-
sys/external/bsd/drm2/i915drm/i915_module.c | 32 ++--
sys/external/bsd/drm2/i915drm/i915_pci.c | 43 +++++-
sys/external/bsd/drm2/include/linux/kgdb.h | 4 +-
sys/modules/drm2/Makefile | 4 +-
sys/modules/drm2/drm.ioconf | 8 +-
sys/modules/i915drm2/Makefile | 8 +-
sys/modules/i915drm2/i915drm.ioconf | 6 +-
14 files changed, 282 insertions(+), 179 deletions(-)
diffs (truncated from 879 to 300 lines):
diff -r 6ab78e654e44 -r 04c948081aad sys/conf/files
--- a/sys/conf/files Wed Jan 29 19:47:09 2014 +0000
+++ b/sys/conf/files Wed Jan 29 19:47:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.1077.2.2 2013/09/08 15:33:06 riastradh Exp $
+# $NetBSD: files,v 1.1077.2.3 2014/01/29 19:47:38 riastradh Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20100430
@@ -1093,9 +1093,11 @@
file dev/ic/lan9118.c smsh
# DRM - Direct Rendering Infrastructure: dev/drm
+# This is the old DRM; new DRM is in dev/pci/files.pci (XXX for now).
define drm {}
-#include "external/bsd/drm/conf/files.drm"
-#include "dev/drm/files.drm"
+include "external/bsd/drm/conf/files.drm"
+include "dev/drm/files.drm"
+
# Definitions for wscons
# device attributes: display, display with emulator, keyboard, and mouse
diff -r 6ab78e654e44 -r 04c948081aad sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci Wed Jan 29 19:47:09 2014 +0000
+++ b/sys/dev/pci/files.pci Wed Jan 29 19:47:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.pci,v 1.364.6.1 2013/07/23 21:07:35 riastradh Exp $
+# $NetBSD: files.pci,v 1.364.6.2 2014/01/29 19:47:38 riastradh Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@@ -1129,3 +1129,7 @@
device tdvfb: wsemuldisplaydev, rasops16, rasops32, vcons, videomode
attach tdvfb at pci
file dev/pci/tdvfb.c tdvfb
+
+# DRMKMS, DRM2 with kernel mode-switching, PCI-only for now.
+define drmkms
+include "external/bsd/drm2/conf/files.drm2"
diff -r 6ab78e654e44 -r 04c948081aad sys/dev/wsfb/files.wsfb
--- a/sys/dev/wsfb/files.wsfb Wed Jan 29 19:47:09 2014 +0000
+++ b/sys/dev/wsfb/files.wsfb Wed Jan 29 19:47:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.wsfb,v 1.7 2010/08/31 02:49:17 macallan Exp $
+# $NetBSD: files.wsfb,v 1.7.30.1 2014/01/29 19:47:38 riastradh Exp $
#
# wsdisplay framebuffer drivers
@@ -9,6 +9,7 @@
defflag opt_wsfb.h WSFB_ALLOW_OTHERS # allow to mmap() foreign ranges
# a generic framebuffer console
-device genfb: wsemuldisplaydev, rasops1, rasops2, rasops8, rasops15, rasops16, rasops24, rasops32, vcons, drm
-file dev/wsfb/genfb.c genfb needs-flag
+define genfbbase: rasops1, rasops2, rasops8, rasops15, rasops16, rasops24, rasops32, vcons
+device genfb: genfbbase, wsemuldisplaydev, drm
+file dev/wsfb/genfb.c genfbbase needs-flag
defflag opt_genfb.h GENFB_DEBUG GENFB_SHADOWFB
diff -r 6ab78e654e44 -r 04c948081aad sys/external/bsd/drm2/conf/files.drm2
--- a/sys/external/bsd/drm2/conf/files.drm2 Wed Jan 29 19:47:09 2014 +0000
+++ b/sys/external/bsd/drm2/conf/files.drm2 Wed Jan 29 19:47:38 2014 +0000
@@ -1,110 +1,121 @@
-# $NetBSD: files.drm2,v 1.1.2.5 2014/01/15 13:53:42 riastradh Exp $
+# $NetBSD: files.drm2,v 1.1.2.6 2014/01/29 19:47:38 riastradh Exp $
-define drm2base
-define drm2pci
-define drmbus { }
+define drmkmsbus { }
+
+device drmkms
+attach drmkms at drmkmsbus
-device drm: drm2base, drmbus
-attach drm at drmbus
+defflag opt_drmkms.h DRMKMS_DEBUG
+makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include"
+makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/uapi"
+makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include"
-defflag opt_drm.h DRM_DEBUG
-makeoptions drm2base CPPFLAGS+="-I$S/external/bsd/drm2/include"
-makeoptions drm2base CPPFLAGS+="-I$S/external/bsd/drm2/dist/uapi"
-makeoptions drm2base CPPFLAGS+="-I$S/external/bsd/drm2/dist/include"
+makeoptions drmkms "CWARNFLAGS.intel_panel.c"+="-Wno-shadow"
+makeoptions drmkms "CWARNFLAGS.intel_pm.c"+="-Wno-shadow"
+makeoptions drmkms "CWARNFLAGS.drm_crtc.c"+="-Wno-shadow"
+makeoptions drmkms "CWARNFLAGS.drm_edid.c"+="-Wno-shadow"
-# XXX Should probably be in a header file. opt_drm.h?
-makeoptions drm2base CPPFLAGS+="-D__KERNEL__"
+# XXX Should probably be in a header file. opt_drmkms.h?
+makeoptions drmkms CPPFLAGS+="-D__KERNEL__"
# XXX x86 kludge.
-makeoptions drm2base CPPFLAGS+="-DCONFIG_MTRR"
-makeoptions drm2base CPPFLAGS+="-DCONFIG_X86"
-makeoptions drm2base CPPFLAGS+="-DMTRR"
+makeoptions drmkms CPPFLAGS+="-DCONFIG_MTRR"
+makeoptions drmkms CPPFLAGS+="-DCONFIG_X86"
+makeoptions drmkms CPPFLAGS+="-DMTRR"
-makeoptions i915drm CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/i915"
-
-device i915drm: drm2base, drm2pci, drmbus, wsemuldisplaydev
-attach i915drm at pci
+file external/bsd/drm2/linux/linux_gfp.c drmkms
+file external/bsd/drm2/linux/linux_kmap.c drmkms
+file external/bsd/drm2/linux/linux_i2c.c drmkms
+file external/bsd/drm2/linux/linux_idr.c drmkms
+file external/bsd/drm2/linux/linux_list_sort.c drmkms
+file external/bsd/drm2/linux/linux_work.c drmkms
-#file external/bsd/drm2/dist/drm/ati_pcigart.c drm2base
-file external/bsd/drm2/dist/drm/drm_agpsupport.c drm2base
-file external/bsd/drm2/dist/drm/drm_auth.c drm2base
-file external/bsd/drm2/dist/drm/drm_buffer.c drm2base
-file external/bsd/drm2/dist/drm/drm_bufs.c drm2base
-#file external/bsd/drm2/dist/drm/drm_cache.c drm2base
-file external/bsd/drm2/dist/drm/drm_context.c drm2base
-file external/bsd/drm2/dist/drm/drm_crtc.c drm2base
-file external/bsd/drm2/dist/drm/drm_crtc_helper.c drm2base
-file external/bsd/drm2/dist/drm/drm_dma.c drm2base
-file external/bsd/drm2/dist/drm/drm_dp_helper.c drm2base
-file external/bsd/drm2/drm/drm_drv.c drm2base
-file external/bsd/drm2/dist/drm/drm_edid.c drm2base
-#file external/bsd/drm2/dist/drm/drm_encoder_slave.c drm2base
-#file external/bsd/drm2/dist/drm/drm_fb_helper.c drm2base
-file external/bsd/drm2/dist/drm/drm_fops.c drm2base
-file external/bsd/drm2/dist/drm/drm_gem.c drm2base
-file external/bsd/drm2/dist/drm/drm_global.c drm2base
-file external/bsd/drm2/dist/drm/drm_hashtab.c drm2base
-#file external/bsd/drm2/dist/drm/drm_info.c drm2base
-#file external/bsd/drm2/dist/drm/drm_ioc32.c drm2base
-file external/bsd/drm2/dist/drm/drm_irq.c drm2base
-file external/bsd/drm2/drm/drm_lock.c drm2base
-file external/bsd/drm2/drm/drm_memory.c drm2base
-file external/bsd/drm2/dist/drm/drm_mm.c drm2base
-file external/bsd/drm2/dist/drm/drm_modes.c drm2base
-file external/bsd/drm2/pci/drm_pci.c drm2base
-#file external/bsd/drm2/dist/drm/drm_platform.c drm2base
-#file external/bsd/drm2/dist/drm/drm_prime.c drm2base
-#file external/bsd/drm2/dist/drm/drm_proc.c drm2base
-file external/bsd/drm2/drm/drm_scatter.c drm2base
-file external/bsd/drm2/dist/drm/drm_stub.c drm2base
-file external/bsd/drm2/drm/drm_vm.c drm2base
+#file external/bsd/drm2/dist/drm/ati_pcigart.c drmkms
+file external/bsd/drm2/dist/drm/drm_agpsupport.c drmkms
+file external/bsd/drm2/dist/drm/drm_auth.c drmkms
+file external/bsd/drm2/dist/drm/drm_buffer.c drmkms
+file external/bsd/drm2/dist/drm/drm_bufs.c drmkms
+file external/bsd/drm2/drm/drm_cache.c drmkms
+file external/bsd/drm2/dist/drm/drm_context.c drmkms
+file external/bsd/drm2/dist/drm/drm_crtc.c drmkms
+file external/bsd/drm2/dist/drm/drm_crtc_helper.c drmkms
+file external/bsd/drm2/dist/drm/drm_dma.c drmkms
+file external/bsd/drm2/dist/drm/drm_dp_helper.c drmkms
+file external/bsd/drm2/drm/drm_drv.c drmkms
+file external/bsd/drm2/dist/drm/drm_edid.c drmkms
+#file external/bsd/drm2/dist/drm/drm_encoder_slave.c drmkms
+file external/bsd/drm2/dist/drm/drm_fb_helper.c drmkms
+file external/bsd/drm2/drm/drm_fops.c drmkms
+file external/bsd/drm2/dist/drm/drm_gem.c drmkms
+file external/bsd/drm2/dist/drm/drm_global.c drmkms
+file external/bsd/drm2/dist/drm/drm_hashtab.c drmkms
+#file external/bsd/drm2/dist/drm/drm_info.c drmkms
+#file external/bsd/drm2/dist/drm/drm_ioc32.c drmkms
+file external/bsd/drm2/dist/drm/drm_ioctl.c drmkms
+file external/bsd/drm2/dist/drm/drm_irq.c drmkms
+file external/bsd/drm2/drm/drm_lock.c drmkms
+file external/bsd/drm2/drm/drm_memory.c drmkms
+file external/bsd/drm2/dist/drm/drm_mm.c drmkms
+file external/bsd/drm2/dist/drm/drm_modes.c drmkms
+file external/bsd/drm2/pci/drm_pci.c drmkms # XXX pci
+#file external/bsd/drm2/dist/drm/drm_platform.c drmkms
+#file external/bsd/drm2/dist/drm/drm_prime.c drmkms
+#file external/bsd/drm2/dist/drm/drm_proc.c drmkms
+file external/bsd/drm2/drm/drm_scatter.c drmkms
+file external/bsd/drm2/dist/drm/drm_stub.c drmkms
+file external/bsd/drm2/drm/drm_vm.c drmkms
+
+file external/bsd/drm2/drm/drm_gem_vm.c drmkms
+file external/bsd/drm2/drm/drm_module.c drmkms
+file external/bsd/drm2/drm/drm_sysfs.c drmkms
-file external/bsd/drm2/drm/drm_gem_vm.c drm2base
-file external/bsd/drm2/drm/drm_module.c drm2base
-file external/bsd/drm2/drm/drm_sysfs.c drm2base
+device i915drmkms: drmkms, drmkmsbus, genfbbase, wsemuldisplaydev
+attach i915drmkms at pci
+
+makeoptions i915drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/i915"
-file external/bsd/drm2/i915drm/i915_pci.c i915drm
-file external/bsd/drm2/dist/drm/i915/dvo_ch7017.c i915drm
-file external/bsd/drm2/dist/drm/i915/dvo_ch7xxx.c i915drm
-file external/bsd/drm2/dist/drm/i915/dvo_ivch.c i915drm
-file external/bsd/drm2/dist/drm/i915/dvo_ns2501.c i915drm
-file external/bsd/drm2/dist/drm/i915/dvo_sili164.c i915drm
-file external/bsd/drm2/dist/drm/i915/dvo_tfp410.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_debugfs.c i915drm
-file external/bsd/drm2/dist/drm/i915/i915_dma.c i915drm
-file external/bsd/drm2/dist/drm/i915/i915_drv.c i915drm
-file external/bsd/drm2/drm/i915drm/i915_gem.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_context.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_debug.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_dmabuf.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_evict.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_gtt.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c i915drm
-#file external/bsd/drm2/dist/drm/i915/i915_ioc32.c i915drm
-file external/bsd/drm2/i915drm/i915_irq.c i915drm
-file external/bsd/drm2/dist/drm/i915/i915_suspend.c i915drm
-file external/bsd/drm2/i915drm/i915_sysfs.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_bios.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_crt.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_ddi.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_display.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_dp.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_dvo.c i915drm
-file external/bsd/drm2/i915drm/intel_fb.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_hdmi.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_i2c.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_lvds.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_modes.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_opregion.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_overlay.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_panel.c i915drm
-file external/bsd/drm2/i915drm/intel_pm.c i915drm
-file external/bsd/drm2/i915drm/intel_ringbuffer.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_sdvo.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_sprite.c i915drm
-file external/bsd/drm2/dist/drm/i915/intel_tv.c i915drm
+file external/bsd/drm2/dist/drm/i915/dvo_ch7017.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/dvo_ch7xxx.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/dvo_ivch.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/dvo_ns2501.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/dvo_sil164.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/dvo_tfp410.c i915drmkms
+#file external/bsd/drm2/dist/drm/i915/i915_debugfs.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_dma.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_drv.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem_context.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem_debug.c i915drmkms
+#file external/bsd/drm2/dist/drm/i915/i915_gem_dmabuf.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem_evict.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c i915drmkms
+file external/bsd/drm2/i915drm/i915_gem_gtt.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c i915drmkms
+#file external/bsd/drm2/dist/drm/i915/i915_ioc32.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_irq.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/i915_suspend.c i915drmkms
+file external/bsd/drm2/i915drm/i915_sysfs.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_bios.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_crt.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_ddi.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_display.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_dp.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_dvo.c i915drmkms
+file external/bsd/drm2/i915drm/intel_fb.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_hdmi.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_i2c.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_lvds.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_modes.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_opregion.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_overlay.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_panel.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_pm.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_sdvo.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_sprite.c i915drmkms
+file external/bsd/drm2/dist/drm/i915/intel_tv.c i915drmkms
-file external/bsd/drm2/i915drm/i915_module.c i915drm
-file external/bsd/drm2/i915drm/i915_pci.c i915drm
+file external/bsd/drm2/i915drm/i915_module.c i915drmkms
+file external/bsd/drm2/i915drm/i915_pci.c i915drmkms
+file external/bsd/drm2/i915drm/intel_gtt.c i915drmkms
diff -r 6ab78e654e44 -r 04c948081aad sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Wed Jan 29 19:47:09 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Wed Jan 29 19:47:38 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.1.2.34 2014/01/22 16:40:53 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.1.2.35 2014/01/29 19:47:38 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.34 2014/01/22 16:40:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.35 2014/01/29 19:47:38 riastradh Exp $");
#include <sys/param.h>
Home |
Main Index |
Thread Index |
Old Index