Date: Sat, 9 Nov 2019 11:42:11 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Rozhuk Ivan <rozhuk.im@gmail.com>, freebsd-hackers@freebsd.org, Johannes Lundberg <johalun0@gmail.com> Subject: Re: Linux PCI drivers in user space Message-ID: <dbd90b30-27be-b81a-1900-2ed5df852933@selasky.org> In-Reply-To: <20191109080032.231cd203@rimwks> References: <20191109080032.231cd203@rimwks>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-11-09 06:00, Rozhuk Ivan wrote: > Hi! > > > Im frustrating with amdgpu on 12.1... > Current status DRM with linuxkpi - it hard to use and hard to support. > FreeBSD stable have no fresh drivers, FreeBSD current - unstable. > > But we have webcamd: > + almost all time fresh drivers from linux > + easy to pull drivers from linux > + easy to debug > + on crash - system continue work > + more secure - driver limited to process memory > - probably a bit slower > > > If add some kernel module that will export all pci devices and > allow to mmap() pci device memory to user space and somehow proxy > IRQ (like events to poll()/kqueue()), IO ports and registers then > webcamd will can work with this like it now works with USB devices, > and fbsd users can use latest DRM and some other drivers. > Also adding sysctl settings to webcamd devices will be very useful. > > Porting and updating drivers in user space webcamd easy then do same > in kernel. > Also all latest drivers will work on all actual FreeBSD versions. Hi, This is how X11 / X.org used to work. The biggest problem is sharing memory between applications if you put everything in user-space. I've been using the new DRM for a while, i915, and there aren't so many issues if you know what you are doing. The biggest problem is keeping the ports-modules up-to-date with the kernel re-builds. What might make life easier is to include the graphics drivers in base, though that might be a bit controversial .... Webcamd is a great tool for drivers, but is mostly focused around USB device. It could probably support PCI devices too, but then I guess libpci would need to be extended. And I would appreciate if more people would be interested contributing to webcamd, now on github :-) --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dbd90b30-27be-b81a-1900-2ed5df852933>
