Date: Thu, 12 May 2016 12:30:41 +0200 From: =?UTF-8?Q?Ren=C3=A9_Ladan?= <r.c.ladan@gmail.com> To: "K. Macy" <kmacy@freebsd.org> Cc: "freebsd-arch@freebsd.org" <arch@freebsd.org>, Mark Johnston <markj@freebsd.org>, Ed Maste <emaste@freebsd.org> Subject: Re: MMU Notifiers and the quest for graphics feature parity Message-ID: <CADL2u4jns0CH-WNa4YaZdjFf3216BG_0jNFmWwLvYsxxg7ZCXA@mail.gmail.com> In-Reply-To: <CAHM0Q_P1-Ak=xmuiBcpZvF66kf-2anT3urKK2sn=va-sRxwp1w@mail.gmail.com> References: <CAHM0Q_P1-Ak=xmuiBcpZvF66kf-2anT3urKK2sn=va-sRxwp1w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2016-05-12 5:37 GMT+02:00 K. Macy <kmacy@freebsd.org>: > My motivation for writing this email stems from my recent work extending = the > linuxkpi to facilitate updating graphics support for FreeBSD. I've made > reasonable progress limiting my changes to the linuxkpi so far. I have 3D= HW > acceleration working on an essentially unmodified 4.6-rc5 drm and i915 dr= iver. > The 4.6 i915 driver supports all of Haswell (3.8 doesn't), Broadwall, Sky= lake, > and the, as of yet, unreleased Kaby Lake processors. Additionally, I am > expecting a Thinkpad e565 (AMD based) to arrive on Friday which will allo= w me > to bring up amdgpu (the Radeon driver for post 2013 AMD GPU hardware) thi= s > weekend. I find this exciting as it means that FreeBSD will be able to ru= n on > _all_ x86 graphics hardware. Unfortunately, most if not all ARM GPU drive= rs > are closed source. > > This isn't quite everything though. There is a new "userptr" ioctl in > graphics drivers that allows applications to safely register user memory = with > the driver. This works because if pages are evicted or the process goes = away, > the driver will be notified first. This notification takes place through = the > "mmu notifier" facility. > > MMU Notifiers are essentially just VM callbacks (or in FreeBSD parlance > eventhandlers). They were first added to Linux to enable KVM to better > interoperate with the native VM's resident set management: > > https://lwn.net/Articles/266320/ > > They're now also used by IB, IOMMUs, MPSS (Xeon Phi), and graphics driver= s. > The API is well enough documented in the header file: > > http://lxr.free-electrons.com/source/include/linux/mmu_notifier.h > > > I don't have strong feelings for what these are called or their precise > location. I do, however, need to be able to support roughly equivalent > semantics when I register these eventhandlers from the notifer calls in t= he > linuxkpi. > > I haven't worked on the VM in a year or two so don't know quite how to pr= oceed. > I'm happy to produce patches for review, but fear that they might be reje= cted > out of hand for one reason or another. I'd like feedback on the approach > itself and what I might do to make any proposed patches more palatable. > I have a laptop with both an nVidia GeForce 940M and a built-in graphics card on the Intel i7 6500U CPU: vgapci0@pci0:0:2:0: class=3D0x030000 card=3D0x09851025 chip=3D0x1916808= 6 rev=3D0x07 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D 'HD Graphics 520' class =3D display subclass =3D VGA So if I understand correctly this 520 chip might work with your patch? Stock FreeBSD 11.0 r298793 with xf86-video-intel 2.21.15_9 does not see the driver. For now it does run with scfb. Thanks for your work, Ren=C3=A9 --=20 https://rene-ladan.nl/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADL2u4jns0CH-WNa4YaZdjFf3216BG_0jNFmWwLvYsxxg7ZCXA>