Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133131430
D16894.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D16894.diff
View Options
Index: sys/conf/kern.opts.mk
===================================================================
--- sys/conf/kern.opts.mk
+++ sys/conf/kern.opts.mk
@@ -38,6 +38,8 @@
IPSEC_SUPPORT \
ISCSI \
KERNEL_SYMBOLS \
+ MODULE_DRM \
+ MODULE_DRM2 \
NETGRAPH \
PF \
SOURCELESS_HOST \
Index: sys/dev/drm/drm.h
===================================================================
--- sys/dev/drm/drm.h
+++ sys/dev/drm/drm.h
@@ -1145,4 +1145,15 @@
typedef enum drm_bo_type drm_bo_type_t;
#endif
+#define DRM_PORT "graphics/drm-legacy-kmod"
+
+#define DRM_OBSOLETE(dev) \
+ do { \
+ device_printf(dev, "=======================================================\n"); \
+ device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \
+ device_printf(dev, "=======================================================\n"); \
+ gone_in_dev(dev, 13, "drm drivers"); \
+ } while (0)
+
+
#endif
Index: sys/dev/drm/drm_drv.c
===================================================================
--- sys/dev/drm/drm_drv.c
+++ sys/dev/drm/drm_drv.c
@@ -174,7 +174,8 @@
DRM_DEBUG("desc : %s\n", device_get_desc(kdev));
device_set_desc(kdev, id_entry->name);
}
- return 0;
+ DRM_OBSOLETE(kdev);
+ return BUS_PROBE_GENERIC;
}
return ENXIO;
Index: sys/dev/drm2/drm_os_freebsd.h
===================================================================
--- sys/dev/drm2/drm_os_freebsd.h
+++ sys/dev/drm2/drm_os_freebsd.h
@@ -154,6 +154,20 @@
*(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \
(vm_offset_t)(offset)) = htole64(val)
+#ifdef __LP64__
+#define DRM_PORT "graphics/drm-stable-kmod"
+#else
+#define DRM_PORT "graphics/drm-legacy-kmod"
+#endif
+
+#define DRM_OBSOLETE(dev) \
+ do { \
+ device_printf(dev, "=======================================================\n"); \
+ device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \
+ device_printf(dev, "=======================================================\n"); \
+ gone_in_dev(dev, 13, "drm2 drivers"); \
+ } while (0)
+
/* DRM_READMEMORYBARRIER() prevents reordering of reads.
* DRM_WRITEMEMORYBARRIER() prevents reordering of writes.
* DRM_MEMORYBARRIER() prevents reordering of reads and writes.
Index: sys/dev/drm2/drm_os_freebsd.c
===================================================================
--- sys/dev/drm2/drm_os_freebsd.c
+++ sys/dev/drm2/drm_os_freebsd.c
@@ -126,7 +126,8 @@
device_get_nameunit(kdev), id_entry->name);
device_set_desc(kdev, id_entry->name);
}
- return (0);
+ DRM_OBSOLETE(kdev);
+ return (-BUS_PROBE_GENERIC);
}
return (-ENXIO);
Index: sys/modules/Makefile
===================================================================
--- sys/modules/Makefile
+++ sys/modules/Makefile
@@ -583,8 +583,12 @@
_cpufreq= cpufreq
_cs= cs
_dpms= dpms
+.if ${MK_MODULE_DRM} != "no"
_drm= drm
+.endif
+.if ${MK_MODULE_DRM2} != "no"
_drm2= drm2
+.endif
_ed= ed
_em= em
_ena= ena
@@ -781,7 +785,9 @@
_cbb= cbb
_cfi= cfi
_cpufreq= cpufreq
+.if ${MK_MODULE_DRM} != "no"
_drm= drm
+.endif
_exca= exca
_ffec= ffec
_nvd= nvd
@@ -791,7 +797,9 @@
.endif
.if ${MACHINE_ARCH} == "powerpc64"
+.if ${MK_MODULE_DRM2} != "no"
_drm2= drm2
+.endif
_ipmi= ipmi
.endif
.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc"
Index: tools/build/options/WITHOUT_MODULE_DRM
===================================================================
--- /dev/null
+++ tools/build/options/WITHOUT_MODULE_DRM
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Disable creation of old drm video modules.
+
Index: tools/build/options/WITHOUT_MODULE_DRM2
===================================================================
--- /dev/null
+++ tools/build/options/WITHOUT_MODULE_DRM2
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Disable creation of old drm2 video modules.
Index: tools/build/options/WITH_MODULE_DRM
===================================================================
--- /dev/null
+++ tools/build/options/WITH_MODULE_DRM
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Enable creation of old drm video modules.
Index: tools/build/options/WITH_MODULE_DRM2
===================================================================
--- /dev/null
+++ tools/build/options/WITH_MODULE_DRM2
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Enable creation of old drm2 video modules.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 24, 5:41 AM (8 h, 31 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24122256
Default Alt Text
D16894.diff (4 KB)
Attached To
Mode
D16894: Put building of drm and drm2 modules behind options and Add big, nasty abandonware tags to this code.
Attached
Detach File
Event Timeline
Log In to Comment