Date: Sat, 18 Oct 2014 14:40:00 +0200 From: Tijl Coosemans <tijl@FreeBSD.org> To: "freebsd-x11@freebsd.org" <x11@freebsd.org> Cc: kwm@FreeBSD.org, Jukka Ukkonen <jau789@gmail.com>, Mike Harding <mvharding@gmail.com> Subject: Re: After the latest dri update X11 reports a KMS error with a Radeon card which previously worked just fine. Message-ID: <20141018144000.5e706e49@kalimero.tijl.coosemans.org> In-Reply-To: <54425C31.2090100@gmail.com> References: <54425C31.2090100@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--MP_/V4LYU_8W5Zv=tp/P6x+J7p9 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, 18 Oct 2014 15:25:21 +0300 Jukka Ukkonen <jau789@gmail.com> wrote: > Current version of pixman: 0.32.4 > Before reporting problems, check http://wiki.x.org > to make sure that you have the latest version. > Markers: (--) probed, (**) from config file, (==) default setting, > (++) from command line, (!!) notice, (II) informational, > (WW) warning, (EE) error, (NI) not implemented, (??) unknown. > (==) Log file: "/var/log/Xorg.0.log", Time: Sat Oct 18 14:25:50 2014 > (==) Using config file: "/usr/local/lib/X11/xorg.conf" > (==) Using system config directory "/usr/local/share/X11/xorg.conf.d" > *(II) [KMS] drm report modesetting isn't supported.* > > Fatal server error: > no screens found > > Please consult the The X.Org Foundation support > at http://wiki.x.org > for help. > Please also check the log file at "/var/log/Xorg.0.log" for additional > information. Please try the attached patch for graphics/libdrm. The library checks hw.dri.0.modesetting sysctl to see if KMS is available before loading the DRM kernel modules that provide that sysctl. --MP_/V4LYU_8W5Zv=tp/P6x+J7p9 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=libdrm.patch Index: graphics/libdrm/Makefile =================================================================== --- graphics/libdrm/Makefile (revision 371105) +++ graphics/libdrm/Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= libdrm PORTVERSION= 2.4.58 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= graphics x11 MASTER_SITES= http://dri.freedesktop.org/libdrm/ @@ -32,6 +33,7 @@ .if ${ARCH} == "amd64" || ${ARCH} == "i386" CONFIGURE_ARGS+=--enable-libkms PLIST_SUB+= KMS="" NOUVEAU="" +EXTRA_PATCHES+= ${FILESDIR}/extra-xf86drmMode.c .else CONFIGURE_ARGS+=--disable-libkms PLIST_SUB+= KMS="@comment " NOUVEAU="@comment " Index: graphics/libdrm/files/extra-xf86drmMode.c =================================================================== --- graphics/libdrm/files/extra-xf86drmMode.c (revision 0) +++ graphics/libdrm/files/extra-xf86drmMode.c (working copy) @@ -0,0 +1,42 @@ +--- xf86drmMode.c.orig 2010-09-08 14:23:39.000000000 +0200 ++++ xf86drmMode.c 2011-07-18 18:59:11.000000000 +0200 +@@ -774,38 +774,7 @@ + if (found) + return 0; + #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) +- char kbusid[1024], sbusid[1024]; +- char oid[128]; +- int domain, bus, dev, func; +- int i, modesetting, ret; +- size_t len; +- +- ret = sscanf(busid, "pci:%04x:%02x:%02x.%d", &domain, &bus, &dev, +- &func); +- if (ret != 4) +- return -EINVAL; +- snprintf(kbusid, sizeof(kbusid), "pci:%04x:%02x:%02x.%d", domain, bus, +- dev, func); +- +- /* How many GPUs do we expect in the machine ? */ +- for (i = 0; i < 16; i++) { +- snprintf(oid, sizeof(oid), "hw.dri.%d.busid", i); +- len = sizeof(sbusid); +- ret = sysctlbyname(oid, sbusid, &len, NULL, 0); +- if (ret == -1) { +- if (errno == ENOENT) +- continue; +- return -EINVAL; +- } +- if (strcmp(sbusid, kbusid) != 0) +- continue; +- snprintf(oid, sizeof(oid), "hw.dri.%d.modesetting", i); +- len = sizeof(modesetting); +- ret = sysctlbyname(oid, &modesetting, &len, NULL, 0); +- if (ret == -1 || len != sizeof(modesetting)) +- return -EINVAL; +- return (modesetting ? 0 : -ENOSYS); +- } ++ return 0; + #elif defined(__DragonFly__) + return 0; + #endif Property changes on: graphics/libdrm/files/extra-xf86drmMode.c ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property --MP_/V4LYU_8W5Zv=tp/P6x+J7p9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141018144000.5e706e49>