Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules/drmkms Make drmkms.kmod build again on amd64.



details:   https://anonhg.NetBSD.org/src/rev/e10f5fe678e9
branches:  trunk
changeset: 835279:e10f5fe678e9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:53:42 2018 +0000

description:
Make drmkms.kmod build again on amd64.

diffstat:

 sys/modules/drmkms/Makefile     |  50 +++++++++++++++++++++++++---------------
 sys/modules/drmkms/Makefile.inc |  27 +++++++++++++++------
 2 files changed, 50 insertions(+), 27 deletions(-)

diffs (147 lines):

diff -r 1dc72c779801 -r e10f5fe678e9 sys/modules/drmkms/Makefile
--- a/sys/modules/drmkms/Makefile       Mon Aug 27 13:53:32 2018 +0000
+++ b/sys/modules/drmkms/Makefile       Mon Aug 27 13:53:42 2018 +0000
@@ -1,45 +1,69 @@
-# $NetBSD: Makefile,v 1.9 2015/03/05 17:50:41 riastradh Exp $
+# $NetBSD: Makefile,v 1.10 2018/08/27 13:53:42 riastradh Exp $
 
 .include "../Makefile.inc"
 .include "Makefile.inc"
 
+KMOD=  drmkms
+MKLDSCRIPT=yes
+
 .PATH: ${S}/external/bsd/drm2/drm
 .PATH: ${S}/external/bsd/drm2/i2c
 .PATH: ${S}/external/bsd/drm2/pci
+
 .PATH: ${S}/external/bsd/drm2/dist/drm
 
-MKLDSCRIPT=yes
-KMOD=  drmkms
+# NetBSD additions.
+SRCS+= drm_cdevsw.c
+SRCS+= drm_gem_cma_helper.c
+SRCS+= drm_gem_vm.c
+SRCS+= drm_module.c
+SRCS+= drm_sysctl.c
+
+# Generic, unaccelerated kms framebuffer.
+SRCS+= drmfb.c
+
+# XXX ttm
+
+# XXX CWARNFLAGS.foo.c doesn't work.
+COPTS.drm_atomic_helper.c+=    -Wno-shadow
+COPTS.drm_crtc.c+=             -Wno-missing-field-initializers
+COPTS.drm_crtc.c+=             -Wno-shadow
+COPTS.drm_edid.c+=             -Wno-shadow
+COPTS.drm_ioctl.c+=            -Wno-shadow
 
 # Upstream source files.
 #SRCS+=        ati_pcigart.c           # Moved to drmkms_pci module.
 #SRCS+=        drm_agpsupport.c        # Moved to drmkms_pci module.
+SRCS+= drm_atomic.c
+SRCS+= drm_atomic_helper.c
 SRCS+= drm_auth.c
-SRCS+= drm_buffer.c
+SRCS+= drm_bridge.c
 SRCS+= drm_bufs.c
 SRCS+= drm_cache.c
 SRCS+= drm_context.c
 SRCS+= drm_crtc.c
 SRCS+= drm_crtc_helper.c
+SRCS+= drm_debugfs.c
 SRCS+= drm_dma.c
 SRCS+= drm_dp_helper.c
+SRCS+= drm_dp_mst_topology.c
 SRCS+= drm_drv.c
 SRCS+= drm_edid.c
 SRCS+= drm_encoder_slave.c
-SRCS+= drm_fb_helper.c         # XXX Rewrite for wsconsole.
+SRCS+= drm_fb_helper.c
 SRCS+= drm_flip_work.c
 SRCS+= drm_fops.c
 SRCS+= drm_gem.c
 SRCS+= drm_global.c
 SRCS+= drm_hashtab.c
 #SRCS+=        drm_info.c              # XXX Rewrite for sysctl or something.
-#SRCS+=        drm_ioc32.c
 SRCS+= drm_ioctl.c
 SRCS+= drm_irq.c
 SRCS+= drm_lock.c
 SRCS+= drm_memory.c
 SRCS+= drm_mm.c
 SRCS+= drm_modes.c
+SRCS+= drm_modeset_lock.c
 #SRCS+=        drm_pci.c               # Moved to drmkms_pci module.
 SRCS+= drm_plane_helper.c
 #SRCS+=        drm_platform.c          # XXX Rewrite per platform.
@@ -47,21 +71,9 @@
 SRCS+= drm_probe_helper.c
 SRCS+= drm_rect.c
 SRCS+= drm_scatter.c
-SRCS+= drm_stub.c
-SRCS+= drm_sysctl.c
 SRCS+= drm_sysfs.c
+SRCS+= drm_trace_points.c
 SRCS+= drm_vm.c
 SRCS+= drm_vma_manager.c
 
-# NetBSD additions.
-SRCS+= drm_gem_vm.c
-SRCS+= drm_module.c
-SRCS+= drmfb.c
-
-COPTS.drm_crtc.c+=     -Wno-shadow
-COPTS.drm_crtc.c+=     -Wno-missing-field-initializers
-COPTS.drm_edid.c+=     -Wno-shadow
-
-CPPFLAGS+=             -DNACPICA=1
-
 .include <bsd.kmodule.mk>
diff -r 1dc72c779801 -r e10f5fe678e9 sys/modules/drmkms/Makefile.inc
--- a/sys/modules/drmkms/Makefile.inc   Mon Aug 27 13:53:32 2018 +0000
+++ b/sys/modules/drmkms/Makefile.inc   Mon Aug 27 13:53:42 2018 +0000
@@ -1,22 +1,33 @@
-# $NetBSD: Makefile.inc,v 1.4 2014/07/16 20:56:25 riastradh Exp $
+# $NetBSD: Makefile.inc,v 1.5 2018/08/27 13:53:42 riastradh Exp $
 
 # Common makefile cruft for drm2 code.
 
 # XXX All the -D crap needs to go in a header file instead so changing
 # it correctly triggers rebuilds.
 
+# Overrides first.
 CPPFLAGS+=     -I${S}/external/bsd/drm2/include
-CPPFLAGS+=     -I${S}/external/bsd/drm2/dist
+
+CPPFLAGS+=     -I${S}/external/bsd/common/include
+
+# Then upstream.
 CPPFLAGS+=     -I${S}/external/bsd/drm2/dist/include
 CPPFLAGS+=     -I${S}/external/bsd/drm2/dist/include/drm
 CPPFLAGS+=     -I${S}/external/bsd/drm2/dist/uapi
-CPPFLAGS+=     -I${S}/external/bsd/common/include
+
+# Must come last because some header file names are repeated in
+# dist/drm (I'm looking ta you, drm_legacy.h), while others sometimes
+# explicitly write <uapi/...>.  (Maybe that should have been imported
+# under dist/include/uapi rather than dist/uapi.)
+CPPFLAGS+=     -I${S}/external/bsd/drm2/dist
+
+# XXX Should probably be in a header file.  opt_drmkms.h?
 CPPFLAGS+=     -D__KERNEL__
 
+CPPFLAGS+=     -DCONFIG_BACKLIGHT_CLASS_DEVICE=0
+CPPFLAGS+=     -DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0
+CPPFLAGS+=     -DCONFIG_DRM_FBDEV_EMULATION=0
+CPPFLAGS+=     -DCONFIG_FB=0
+
 # XXX Is this the right place to set this?
 CPPFLAGS+=     -DDIAGNOSTIC
-
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-CPPFLAGS+=     -DCONFIG_MTRR
-CPPFLAGS+=     -DCONFIG_X86
-.endif



Home | Main Index | Thread Index | Old Index