Date: Sun, 15 Oct 2017 16:08:23 +0000 (UTC) From: Tijl Coosemans <tijl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324629 - head/sys/compat/linux Message-ID: <201710151608.v9FG8NPc091347@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710151608.v9FG8NPc091347>