From owner-freebsd-x11@FreeBSD.ORG Sun Jan 3 17:05:01 2010 Return-Path: Delivered-To: x11@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 211391065676; Sun, 3 Jan 2010 17:05:01 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id E6C7D8FC1B; Sun, 3 Jan 2010 17:05:00 +0000 (UTC) Received: from [192.168.1.4] (adsl-1-207-120.bna.bellsouth.net [65.1.207.120]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id o03H4wKp040959 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 3 Jan 2010 12:04:59 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Norikatsu Shigemura In-Reply-To: <20100104011519.5f414b76.nork@FreeBSD.org> References: <20091205104243.f66171bb.nork@FreeBSD.org> <20091221003422.f13f9cbd.nork@ninth-nine.com> <20091221045848.9ffc345d.nork@FreeBSD.org> <1261463198.9743.39.camel@balrog.2hip.net> <20091223020315.890e2ee0.nork@FreeBSD.org> <1261501994.2304.12.camel@balrog.2hip.net> <20100104011519.5f414b76.nork@FreeBSD.org> Content-Type: text/plain Organization: FreeBSD Date: Sun, 03 Jan 2010 11:04:52 -0600 Message-Id: <1262538293.2486.14.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_00, FH_DATE_PAST_20XX, RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: ports@FreeBSD.org, x11@FreeBSD.org, flz@FreeBSD.org Subject: Re: [HEADS UP] Experimental 3D HW accel support for Radeon HD 2xxx, 3xxx and 4xxx, 2nd! X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 17:05:01 -0000 On Mon, 2010-01-04 at 01:15 +0900, Norikatsu Shigemura wrote: > Hi rnoland. > > On Tue, 22 Dec 2009 11:13:14 -0600 > Robert Noland wrote: > > The problem is that updating nouveau will mean that drm support will be > > lost. The fake buffer object bits were removed only leaving full TTM > > support. We don't have TTM support in the kernel yet and my kernel > > patch relies on the fake buffer object code to function. > > > P.S. libdrm was update to 2.4.17, so I'll update... > > That is the issue, if we update libdrm then we lose drm support for > > nouveau. The only immediate option that I see is to repo-copy libdrm to > > keep 2.4.12 for nouveau, but that leads to dependency nightmares... > > I did combination tests, Mesa3D 7.4.4/libdrm 2.4.12 v.s. > Mesa3D 7.6.1/libdrm 2.4.17, xf86-video-radeonhd-devel on > Radeon HD 4860 v.s. xf86-video-nouveau/nvidia-driver195.22 on > GeForce GT240 v.s. xf86-video-intel on Intel i915. > > > [I] Intel i915 [G] GeForce GT240 [R] Radeon HD 4860 > NG = doesn't compile. > OK = compile and run some 3D applications OK. > libdrm > | 2.4.12 | 2.4.17 > Mesa3D --------+---------------+------------ > 7.4.4 |OK [I][G] | NG > 7.6.1 |NG | OK [I][R] The key issue is libdrm_nouveau. It is needed for nouveau to continue to work for EXA and Xv. Hardware 3d is not supported / working, so as long as swrast is ok, then that is the only concern for mesa w/ nouveau. One additional option that I've been considering, though I haven't tried it yet, it to construct a patch for 2.4.17 that essentially rolls libdrm_nouveau back to the 2.4.12 API. If we can pull that off, then everything is solved, at least for now. I have kernel work queued up that is going to break nouveau already. I have additional patches that will fix things up again, but it is going to get a bit more complicated determining which kernel patch to use for which branch. What you have outlined seems fairly reasonable, although not a trivial amount of work. If you would like to attempt the reverse patch on the nouveau directory in libdrm, that may be far simpler. I will try and put this together in the next few days if not. robert. > On Mesa3D 7.6.1/libdrm 2.4.17 and nvidia-driver-195.22, I > confirmed that 3D applications run OK. > [SEE ALSO] attached Xorg-radeon-and-geforce.log > > So I suggest that: > 1. repocopy libdrm -> libdrm2412 and introduce WITH_NOUVEAU > global macro for depending on libdrm2412. (fixing all > ports depending on libdrm) > > 2. libdrm and libdrm2412 are CONFLICTS. > > 3. bsd.mesalib.mk supports 7.4.4 and 7.6.1, and switches version > WITH_NOUVEAU. Of course switch pkg_plist WITH_NOUVEAU. > > 4. xf86-video-nouveau depends on libdrm2412, explicitly. > > 5. update libdrm to 2.4.17. > > 6. on no 'WITH_NOUVEAU' (= default), Mesa3D 7.6.1 and libdrm 2.4.17 > are installing. > > Maybe, I should be announce on UPDATING before these update for > xf86-video-nouveau user, do 'portupgrade -o graphics/libdrm2412 > libdrm-2.4.12'. > > How about? If OK, I'll make patches and write closeup procedure manual. > > I have some additional ideas: > [no repocopy idea] > libdrm supports 2.4.12 and 2.4.17 switching WITH_NOUVEAU. > > [OPTIONS idea] > I can add OPTIONS=NOUVEAU for all Mesa3D7.4.4 and libdrm 2.4.12 > related ports, if you hate global WITH_NOUVEAU macro. -- Robert Noland FreeBSD