From owner-freebsd-x11@FreeBSD.ORG Fri Dec 28 17:12:52 2012 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 988E03DC; Fri, 28 Dec 2012 17:12:52 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr9.xs4all.nl (smtp-vbr9.xs4all.nl [194.109.24.29]) by mx1.freebsd.org (Postfix) with ESMTP id 06BF58FC08; Fri, 28 Dec 2012 17:12:51 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id qBSHCEK1007973; Fri, 28 Dec 2012 18:12:14 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id 02CCD1231D; Fri, 28 Dec 2012 18:12:13 +0100 (CET) Date: Fri, 28 Dec 2012 18:12:13 +0100 From: Roland Smith To: Bas Vermin Subject: Re: Your thoughts on a buffer sharing mechanism for FreeBSD (dma-buf for drm2) Message-ID: <20121228171213.GA4522@slackbox.erewhon.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: "freebsd-hackers@freebsd.org" , "freebsd-x11@freebsd.org" X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 17:12:52 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 26, 2012 at 12:37:10AM +0100, Bas Vermin wrote: > Hi Guys, >=20 > Today I decided to do something useful for the FreeBSD community, working= on > the TTM and KMS for the AMD graphics cards which I think a lot of people > could use. Great!=20 > As most of us know Intel KMS support was added to FreeBSD a few months ag= o, > and as far as I know this code was based on the Linux 3.1 kernel. The FAQ= in > the wiki states that in order to keep this code up to date the Linux comm= it > log would be checked and changes merged into FreeBSD. Then came Linux 3.3 > which added support for dma-buf, the buffer sharing mechanism to be used = by > PRIME for offloading work to different GPU's, a feature we obviously > want. The problem with dma-buf is that it is licensed under the GPL and h= as > now littered all over the otherwise MIT licensed drm code (even nVidia > wasn't allowed to use dma-buf for their propietary driver). The license would not be a problem as long as we don't copy the code, but j= ust provide the same interface. > My question is, does such a buffer sharing mechanism exist in FreeBSD? I may be off-base here, but what about buf(9)? > And if so, would it be somewhat compatible with what dma-buf is doing in = the PRIME code? >=20 > If not I think such a mechanism should be created, prehaps part of the vm= system (not separate as dma-buf is). Or am I just being stupid and is ther= e a much better way of solving this problem? Since the develompent of Xorg (and other systems like Wayland) is driven by Linux, it would probably make porting less painful if the FreeBSD kernel co= uld supply the same interfaces to drivers as Linux does. But I don't see most graphics chips vendors implement dma-buf in their (proprietary) drivers, because of its license. I do hope that in the end th= is will lead to more and better open-source drivers! Roland --=20 R.F.Smith http://rsmith.home.xs4all.nl/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlDd0u0ACgkQEnfvsMMhpyWGUwCgk8fspL8hrpxKXMX99Jz0VFSm RoQAmgNE1BkbEJV56K7ezqGQRN/PUBtT =KdyC -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--