Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Jan 2010 11:04:52 -0600
From:      Robert Noland <rnoland@FreeBSD.org>
To:        Norikatsu Shigemura <nork@FreeBSD.org>
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!
Message-ID:  <1262538293.2486.14.camel@balrog.2hip.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <rnoland@FreeBSD.org> 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 <rnoland@FreeBSD.org>
FreeBSD




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1262538293.2486.14.camel>