Bug 71547

Summary: R200 (8500) hang on startx (nforce2)
Product: Base System Reporter: Jason Henson <jason>
Component: kernAssignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.3-BETA3   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
agp_nvidia.c.diff
none
agp_nvidia.c-2.diff
none
agp_nvidia.c-3.diff none

Description Jason Henson 2004-09-10 03:20:19 UTC
When you startx with a R200 radeon and dri enabled the system hangs.  My monitor will switch to 128x1024@85hz and will be black with random color across the very top.  The mouse and power button works for a time, and the keyboard dies right away.  Mode 0666 is set in xorg conf.  
I don't see Loading R200 Microcode in my dmesg, and there are 2 different microcodes.  Only one shows up in dmesg so I put a line of code to show if the other one was being loaded.  Nether messsage showed up in my dmesg.  I then changed the code to always load the R200 code.  It did not work.  So no microcode for the radeon is being loaded on my system, ever.  I have an nforce 2 chipset.

Fix: 

Get the code to load.  Maybe the card is not being identified right?
How-To-Repeat: Edit xorg.conf to load dri.  Have a radeon 8500(or some R200 or maybe a R100 core).
startx
Comment 1 Eric Anholt freebsd_committer freebsd_triage 2005-01-17 04:49:39 UTC
Responsible Changed
From-To: freebsd-bugs->anholt

Looks like another report of nforce2 agp issues.
Comment 2 Eric Anholt 2005-01-17 05:25:55 UTC
When you kldload radeon, does the AGP size reported match what you
selected for aperture size in your bios (if you get to)?  Could you
please test the attached diff (cd /usr/src/sys/pci && patch -p0 <
~/agp_nvidia.c.diff) to see if it helps?

If that doesn't help, could you check that setting Option "BusType"
"PCI" in the Device section of your Xorg.conf does help (Option
"ForcePCIMode" "YES" on older X.Org/XFree86)

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 3 Eric Anholt 2005-01-17 05:28:05 UTC
Missed the attachment.  It's also at
http://people.freebsd.org/~anholt/agp_nvidia.c.diff for ease of
downloading.

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 4 Eric Anholt 2005-01-17 05:32:39 UTC
And, in reading logs from another submitter, I noticed that my guess was
wrong and my test code was wrong, so it wouldn't help.  Sigh.

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 5 Eric Anholt 2005-01-19 05:23:57 UTC
Here's a patch of diff-reduction to linux (add an or of 1 to attbase
setting), not pretending to have generic chipset support, and trying to
avoid the TLB flushing getting optimized away (not sure if it helps --
diffs of objdumps were uninformative).  The usual caveat of me having no
docs and none of this harwdare, and therefore it likely not helping,
applies.  The patch is also at:
http://people.freebsd.org/~anholt/agp_nvidia.c-2.diff

I'd love to hear if this helps/hurts in any way.

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 6 Eric Anholt 2005-06-24 02:27:59 UTC
I've attached a new patch, which is also located at:
http://people.freebsd.org/~anholt/agp_nvidia.c-3.diff
which I'm really hoping will fix this issue.

-- 
Eric Anholt                                     eta@lclark.edu
http://people.freebsd.org/~anholt/              anholt@FreeBSD.org
Comment 7 Eric Anholt freebsd_committer freebsd_triage 2005-09-17 00:00:03 UTC
State Changed
From-To: open->closed

Based on the response I got from one person, I think I've fixed this in 6.0. 
(oops, I should have set to "patched" rather than "closed", will fix 
momentarily.)
Comment 8 Eric Anholt freebsd_committer freebsd_triage 2005-09-17 00:01:09 UTC
State Changed
From-To: closed->patched
Comment 9 Eric Anholt freebsd_committer freebsd_triage 2005-11-18 20:38:14 UTC
State Changed
From-To: patched->closed

Patch has been merged to 6-STABLE now.