From owner-freebsd-current@FreeBSD.ORG Mon May 14 11:37:31 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6898C106566B; Mon, 14 May 2012 11:37:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id DB0318FC0C; Mon, 14 May 2012 11:37:30 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4EBbRjF077038; Mon, 14 May 2012 14:37:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4EBbQ5E029790; Mon, 14 May 2012 14:37:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4EBbQJM029789; Mon, 14 May 2012 14:37:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 14 May 2012 14:37:26 +0300 From: Konstantin Belousov To: Andriy Gapon Message-ID: <20120514113726.GH2358@deviant.kiev.zoral.com.ua> References: <20120512213950.GZ2358__17671.8018287376$1336859020$gmane$org@deviant.kiev.zoral.com.ua> <4FB0ED1A.3020909@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JD3qPFYKz0/ozIPR" Content-Disposition: inline In-Reply-To: <4FB0ED1A.3020909@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: x11@freebsd.org, current@freebsd.org Subject: Re: Intel GPU driver import X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 11:37:31 -0000 --JD3qPFYKz0/ozIPR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 14, 2012 at 02:31:38PM +0300, Andriy Gapon wrote: > on 13/05/2012 00:39 Konstantin Belousov said the following: > > With r235375, all required VM support for new Intel GPU driver was > > committed into HEAD. There are still some things to improve and > > change, but now the all.14.9.patch does not touch anything outside agp > > or drm. This allows to start the process of importing the new Intel > > GPU driver into HEAD. > >=20 > > I am writing this as initial head-up and to discuss some questions, > > for which I do have answers but would prefer to have additional > > feedback from people doing Xorg work. > >=20 > > The patch as-is just replaces the Intel DRI1 bits with DRI2 > > driver. Patch added most of the KMS infrastructure into DRM > > core. Also, patch completely changed the locking model used by Intel > > driver. I made absolutely minimal efforts needed to keep other DRI1 > > drivers compilable. Despite that, I got several surpising reports that > > Radeon DRI1 still works. > >=20 > > That said, for import I can (first choice) just apply the patch, > > replacing the Intel driver with new one. Or (second choice) I may > > create another directory, say sys/dev/drm2, and import _only_ Intel > > driver together with updated DRM core, there. > >=20 > > The positive points to the second approach is that we still have older > > kernel drivers around. Also, I have more freedom in changing the DRM > > core, without fearing breakage in the DRI1 land. Since I do not really > > want to deal with Gen2-3 hardware, and VGA console does not work with > > new driver (yet), there are definite advantages. > >=20 > > On the other hand, driver automatic loading will not work with > > dev/drm2 approach. New driver have to use different module name to > > co-exist with dri1 driver, so ddx driver cannot load new driver by old > > name. As result, users need to manually kldload new driver before > > starting Xorg. > >=20 > > My own preference is to implement second choice and put the driver > > into dev/drm2. >=20 >=20 > I think that I would prefer this path too for the reasons you already men= tioned above: > - potential problems for other drivers > - need to easily fallback for those who use the intel driver and may run = into > problems with the new code > - some missing bits related to kms like syscons support, which makes > troubleshooting harder >=20 > BTW, I think that we should patch xf86-video-intel port to try loading > "i915kms"/"i915gem"/... if i915 is not available. I think that that shou= ld be > fine for a FreeBSD-specific patch. > Alternatively, we could keep the same names for drivers/modules and then = have a > global knob (WITH_DRM2/WITH_KMS/etc) to select which source is code is us= ed to > build the drivers. No, I want both drivers to be presented in /boot/kernel in default=20 install. Also, I want to avoid forcing user to recompile her kernel for driver switching. Regarding the patching xf86-video-intel, I am completely fine with this, but the work should be done by xorg porters. Assuming they will to do this and then maintain the (should be quite trivial) patch. And I like the 'i915kms' name for the module. This and drm2.ko for core drm infrastructure sound good, thank you. --JD3qPFYKz0/ozIPR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+w7nYACgkQC3+MBN1Mb4gNMACg5BN/FrMl/d5qf12ZIp6jIwyF Z7sAoNt/T6Kq4ZSFfzyAVxt7+X7EKWzh =znef -----END PGP SIGNATURE----- --JD3qPFYKz0/ozIPR--