Source-Changes-HG archive

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

[src/trunk]: src/sys drm: New option DRM_LEGACY.



details:   https://anonhg.NetBSD.org/src/rev/e1c12d111b79
branches:  trunk
changeset: 368698:e1c12d111b79
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Jul 28 21:52:36 2022 +0000

description:
drm: New option DRM_LEGACY.

This brings in the `drmums' components, which are the parts of the
current drm code base (sys/external/bsd/drm2) needed by legacy
user-mode-setting drivers (currently just viadrmums), in contrast to
the old drm code base (sys/external/bsd/drm).

This way, viadrmums.kmod can be loaded into GENERIC i386 kernels, but
platforms without any relevant legacy UMS drivers don't get the
legacy goo statically baked in.

diffstat:

 sys/arch/i386/conf/GENERIC             |   7 ++++---
 sys/external/bsd/drm2/drm/files.drmkms |  18 ++++++++++++++++--
 2 files changed, 20 insertions(+), 5 deletions(-)

diffs (67 lines):

diff -r 6dc92fd24420 -r e1c12d111b79 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Thu Jul 28 16:45:31 2022 +0000
+++ b/sys/arch/i386/conf/GENERIC        Thu Jul 28 21:52:36 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1238 2022/04/16 11:57:46 nia Exp $
+# $NetBSD: GENERIC,v 1.1239 2022/07/28 21:52:36 riastradh Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.1238 $"
+#ident         "GENERIC-$Revision: 1.1239 $"
 
 maxusers       64              # estimated number of users
 
@@ -554,7 +554,8 @@
 nouveau*       at pci? dev ? function ?
 nouveaufb*     at nouveaufbbus?
 
-# DRMUMS drivers
+# DRMUMS drivers -- make them loadable, but not statically linked in
+options        DRM_LEGACY
 #viadrmums*    at drm?
 
 # Serial Devices
diff -r 6dc92fd24420 -r e1c12d111b79 sys/external/bsd/drm2/drm/files.drmkms
--- a/sys/external/bsd/drm2/drm/files.drmkms    Thu Jul 28 16:45:31 2022 +0000
+++ b/sys/external/bsd/drm2/drm/files.drmkms    Thu Jul 28 21:52:36 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.drmkms,v 1.82 2022/07/28 10:43:35 riastradh Exp $
+#      $NetBSD: files.drmkms,v 1.83 2022/07/28 21:52:36 riastradh Exp $
 
 version        20180827
 
@@ -86,7 +86,17 @@
 makeoptions    drmkms  "CWARNFLAGS.drm_mm.c"+="${${ACTIVE_CC} == clang :? -Wno-unused-function :}"
 makeoptions    drmkms  "CWARNFLAGS.drm_modes.c"+="-Wno-shadow"
 
-# Legacy user-mode setting
+# Legacy user-mode setting -- for the following legacy drivers:
+#
+#       mach64*
+#       mga*
+#       savage*
+#       sis*
+#       tdfx*
+#       via
+#
+# * not yet adapted to current drm code base
+#
 define drmums: drmkms
 makeoptions    drmums  "CPPFLAGS.drmkms"+="-DCONFIG_DRM_LEGACY"
 makeoptions    drmums  "CPPFLAGS.drmums"+="${CPPFLAGS.drmkms}"
@@ -97,6 +107,10 @@
 file   external/bsd/drm2/drm/drm_lock.c                drmums
 file   external/bsd/drm2/drm/drm_scatter.c             drmums
 
+# Set `options DRM_LEGACY' to allow loading modules requiring drmums
+# even if none are statically linked into the kernel.
+defflag                DRM_LEGACY: drmums
+
 # GPU scheduler
 define drmkms_sched: drmkms
 makeoptions    drmkms_sched    "CPPFLAGS.drmkms_sched"+="${CPPFLAGS.drmkms}"



Home | Main Index | Thread Index | Old Index