From owner-freebsd-x11@FreeBSD.ORG Tue Mar 1 21:45:10 2011 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E021065670 for ; Tue, 1 Mar 2011 21:45:10 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr2.xs4all.nl (smtp-vbr2.xs4all.nl [194.109.24.22]) by mx1.freebsd.org (Postfix) with ESMTP id EB5228FC21 for ; Tue, 1 Mar 2011 21:45:09 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id p21Lj8ni047910; Tue, 1 Mar 2011 22:45:08 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id DCF76BA7A; Tue, 1 Mar 2011 22:45:07 +0100 (CET) Date: Tue, 1 Mar 2011 22:45:07 +0100 From: Roland Smith To: Warren Block Message-ID: <20110301214507.GA36239@slackbox.erewhon.net> References: <20110228221844.GA2957@compaq.yuetime> <20110301191536.GA28125@slackbox.erewhon.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rwEMma7ioTxnRzrJ" 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-x11@freebsd.org Subject: Re: xf86-video-ati with patch-src-radeon_driver.c freeze the system 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: Tue, 01 Mar 2011 21:45:10 -0000 --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 01, 2011 at 02:05:45PM -0700, Warren Block wrote: > ...Well, that was interesting. Swapped out my 4650 and X1650 cards=20 > again, and starting X locked up. I swear it worked a couple of days ago= =20 > when I tested it with the stock port patches. :-) > Just swapped it for my normal HD4650. >=20 > FreeBSD lightning 8.2-STABLE FreeBSD 8.2-STABLE #0: Mon Feb 28 18:43:21= =20 > MST 2011 root@lightning:/usr/obj/usr/src/sys/LIGHTNING i386 >=20 > X1650: 512M, PCIE: mem_size 20000000, aper_size 0 > HD4650: 512M, PCIE: mem_size 20000000, aper_size 0 Mine doesn't set aper_size to zero. Could that have something to to with the i386/amd64 difference?=20 =20 > Yet the HD4650 has worked every time... Question is, does it work without the patch in the ports tree? > Is the original patch outdated? Here's the code: >=20 > /* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM - > Novell bug 204882 + along with lots of ubuntu ones */ > if (aper_size > mem_size) > mem_size =3D aper_size; On neither of our systems this code would be executed, since mem_size>aper_= size. > /* don't map the whole FB in the internal address space. > * we don't currently use fb space larger than the aperture > * size and on cards with more than 512 MB of vram, this can overflow > * the internal top of gart calculation on some systems. > * Limit it to cards with more than 512 MB as this causes problems > * on some other cards due to the way the ddx and drm set up the > * internal memory map. > * See fdo bug 24301. > */ =20 > And then the patch, with the exact opposite test: >=20 > if (mem_size > aper_size) > mem_size =3D aper_size; Typo? This is definitely what is giving me problems. > So unless they are equal, mem_size will be set to aper_size afterwards. > The original code continues: >=20 > if (mem_size > 0x20000000) > mem_size =3D aper_size; This will not be executed on my system, but it will be on yours, it seems. > Looks to me like it's not getting out of there without setting mem_size= =20 > to zero. Whether aper_size should really be zero, no idea. That seems= =20 > like an upstream bug. Since aper_size seems to be used to limit the size of the framebuffer, I'd = think that a value of 0 is a bug! I'm nuking the patch in my ports tree, that's for sure; # cd /usr/ports/x11-drivers/xf86-video-ati/files # truncate -s 0 patch-src-radeon_driver.c # chflags schg,sunlnk patch-src-radeon_driver.c Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --rwEMma7ioTxnRzrJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk1taOMACgkQEnfvsMMhpyUAsgCeKNdPHHiNwC62ucxK6gaNJV6q WzYAnjbmVU2dlzcU8XuD08fTk7I+EixF =z/k5 -----END PGP SIGNATURE----- --rwEMma7ioTxnRzrJ--