svn commit: r324629 - head/sys/compat/linux
Tijl Coosemans
tijl at FreeBSD.org
Sun Oct 15 16:08:24 UTC 2017
Author: tijl
Date: Sun Oct 15 16:08:22 2017
New Revision: 324629
URL: https://svnweb.freebsd.org/changeset/base/324629
Log:
Add special handling for current in-tree drm devices, like r323692 added
for drm-next.
Modified:
head/sys/compat/linux/linux_util.c
Modified: head/sys/compat/linux/linux_util.c
==============================================================================
--- head/sys/compat/linux/linux_util.c Sun Oct 15 16:03:45 2017 (r324628)
+++ head/sys/compat/linux/linux_util.c Sun Oct 15 16:08:22 2017 (r324629)
@@ -146,6 +146,27 @@ linux_driver_get_major_minor(const char *node, int *ma
return (0);
}
+ sz = sizeof("dri/card") - 1;
+ if (strncmp(node, "dri/card", sz) == 0 && node[sz] != '\0') {
+ devno = strtoul(node + sz, NULL, 10);
+ *major = 226 + (devno / 256);
+ *minor = devno % 256;
+ return (0);
+ }
+ sz = sizeof("dri/controlD") - 1;
+ if (strncmp(node, "dri/controlD", sz) == 0 && node[sz] != '\0') {
+ devno = strtoul(node + sz, NULL, 10);
+ *major = 226 + (devno / 256);
+ *minor = devno % 256;
+ return (0);
+ }
+ sz = sizeof("dri/renderD") - 1;
+ if (strncmp(node, "dri/renderD", sz) == 0 && node[sz] != '\0') {
+ devno = strtoul(node + sz, NULL, 10);
+ *major = 226 + (devno / 256);
+ *minor = devno % 256;
+ return (0);
+ }
sz = sizeof("drm/") - 1;
if (strncmp(node, "drm/", sz) == 0 && node[sz] != '\0') {
devno = strtoul(node + sz, NULL, 10);
More information about the svn-src-all
mailing list