Bug 71753

Summary: DRI loads but fails to render on Radeon 9200se(RV280).
Product: Base System Reporter: Adam Gregoire <ebola>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.3-BETA4   
Hardware: Any   
OS: Any   

Description Adam Gregoire 2004-09-15 08:10:13 UTC
$ dmesg | grep agp
agp0: <VIA 8385 host to PCI bridge> mem 0xf8000000-0xfbffffff at device 0.0 on pci0

$ dmesg | grep drm
drm0: <ATI Radeon RV280 9200 SE> port 0xa000-0xa0ff mem 0xfd400000-0xfd40ffff,0xe8000000-0xefffffff irq 16 at device 0.0 on pci1
info: [drm] AGP at 0xf8000000 64MB
info: [drm] Initialized radeon 1.11.0 20020828 on minor 0
info: [drm] Loading R200 Microcode

$ glxinfo | grep rendering
direct rendering: Yes

$ glxgears
drmCommandWrite: -22
drmRadeonCmdBuffer: -22 (exiting)

and the following gets written to syslog:
error: [drm:pid5296:radeon_cp_cmdbuf] *ERROR* bad cmd_type 0 at 0x561e10

Fix: 

N/A
How-To-Repeat: Load DRI on amd64(others) on the radeon 9200se (RV280) chipset.

Running glxgears produces:
drmCommandWrite: -22
drmRadeonCmdBuffer: -22 (exiting)
Comment 1 John Baldwin freebsd_committer freebsd_triage 2004-09-15 22:24:09 UTC
On Tuesday 14 September 2004 05:53 pm, Adam Gregoire wrote:
> >Number:         71753
> >Category:       amd64
> >Synopsis:       DRI loads but fails to render on Radeon 9200se(RV280).
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-amd64
> >State:          open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Wed Sep 15 07:10:13 GMT 2004
> >Closed-Date:
> >Last-Modified:
> >Originator:     Adam Gregoire
> >Release:        FreeBSD 5.3-BETA4 amd64
> >Organization:
>
> N/A
>
> >Environment:
>
> System: FreeBSD S01060080c83f4fb0 5.3-BETA4 FreeBSD 5.3-BETA4 #3: Mon Sep
> 13 03:39:47 EDT 2004 root@S01060080c83f4fb0:/usr/obj/usr/src/sys/OPTMZD
> amd64
>
> $ pkg_info | grep 'dri-'
> dri-5.0.2,1         OpenGL hardware acceleration drivers for the DRI
>
> $pkg_info | grep 'xorg-'
> xorg-clients-6.7.0_4 X client programs and related files from X.Org
> xorg-fonts-encodings-6.7.0 X.Org font encoding files
> xorg-fonts-miscbitmaps-6.7.0 X.Org miscellaneous bitmap fonts
> xorg-fonts-truetype-6.7.0 X.Org TrueType fonts
> xorg-libraries-6.7.0_1 X11 libraries and headers from X.Org
> xorg-server-6.7.0_7 X.Org X server and related programs
>
> >Description:
>
> $ dmesg | grep agp
> agp0: <VIA 8385 host to PCI bridge> mem 0xf8000000-0xfbffffff at device 0.0
> on pci0
>
> $ dmesg | grep drm
> drm0: <ATI Radeon RV280 9200 SE> port 0xa000-0xa0ff mem
> 0xfd400000-0xfd40ffff,0xe8000000-0xefffffff irq 16 at device 0.0 on pci1
> info: [drm] AGP at 0xf8000000 64MB
> info: [drm] Initialized radeon 1.11.0 20020828 on minor 0
> info: [drm] Loading R200 Microcode
>
> $ glxinfo | grep rendering
> direct rendering: Yes
>
> $ glxgears
> drmCommandWrite: -22
> drmRadeonCmdBuffer: -22 (exiting)
>
> and the following gets written to syslog:
> error: [drm:pid5296:radeon_cp_cmdbuf] *ERROR* bad cmd_type 0 at 0x561e10
>
> >How-To-Repeat:
>
> Load DRI on amd64(others) on the radeon 9200se (RV280) chipset.
>
> Running glxgears produces:
> drmCommandWrite: -22
> drmRadeonCmdBuffer: -22 (exiting)
>
> >Fix:
>
> N/A
>
> >Release-Note:
> >Audit-Trail:
> >Unformatted:

Do you have any errors in Xorg.0.log?  Also, did you add an 'AGPSize' option 
to your Xorg config file to tell it you have a 64MB aperture?  X seems to 
assume a default size of 8MB unless you explicitly tell it you have more.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Comment 2 Eric Anholt freebsd_committer freebsd_triage 2004-09-16 02:07:52 UTC
On Wed, 2004-09-15 at 14:24, John Baldwin wrote:
> Do you have any errors in Xorg.0.log?  Also, did you add an 'AGPSize' option 
> to your Xorg config file to tell it you have a 64MB aperture?  X seems to 
> assume a default size of 8MB unless you explicitly tell it you have more.

The AGPSize is just to say how much of the aperture to allocate and bind
for use.  It turns out that 8MB is all that's really necessary, due to
poor or nonexistent use of AGP textures, so that basically what gets
used in AGP are the 3MB of vertex/indirect/ring buffers.

I wasn't previously aware of any 64-bit issues in the Radeon/R200 DRI
(and some have used these on 64-bit machines before), but to me that
seems like the most likely reason to find bad command buffers.

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 3 bsdunx 2004-09-16 04:23:42 UTC
> Do you have any errors in Xorg.0.log?  Also, did you
> add an 'AGPSize' option 
> to your Xorg config file to tell it you have a 64MB
> aperture?  X seems to 
> assume a default size of 8MB unless you explicitly
> tell it you have more.

$ grep EE /var/log/Xorg.0.log
        (WW) warning, (EE) error, (NI) not
implemented, (??) unknown.
(II) Loading extension MIT-SCREEN-SAVER
Nothing unusual here.

I also added the following to xorg.conf.
    Option "AGPSize" "64"

DRI still loads, and rendering still fails with same
error.

Adam Gregoire


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
Comment 4 bsdunx 2004-09-18 00:34:34 UTC
Well, I have tried playing with all X Options for AGP, tried changing BIOS
settings, to no effect.

Today I borrowed an ATI Radeon QY RV100 7000/VE and have the same error from
any program trying to use DRI:
drmCommandWrite: -22
drmRadeonCmdBuffer: -22 (exiting)

Now I really am starting to think that it is a 64-bit issue.

Any suggestions?



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
Comment 5 David E. O'Brien freebsd_committer freebsd_triage 2004-12-20 16:27:31 UTC
State Changed
From-To: open->closed

Fixed in drm_os_freebsd.h commit.