From nobody@FreeBSD.org  Tue Jun  8 06:59:41 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6E34C16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  8 Jun 2004 06:59:41 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 67CA143D48
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  8 Jun 2004 06:59:41 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i586xfvu058938
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 8 Jun 2004 06:59:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i586xfGm058937;
	Tue, 8 Jun 2004 06:59:41 GMT
	(envelope-from nobody)
Message-Id: <200406080659.i586xfGm058937@www.freebsd.org>
Date: Tue, 8 Jun 2004 06:59:41 GMT
From: "Jukka A. Ukkonen" <jau@iki.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Radeon DRM does not recognize certain Radeon 9200 IDs
X-Send-Pr-Version: www-2.3

>Number:         67702
>Category:       kern
>Synopsis:       [patch] Radeon DRM does not recognize certain Radeon 9200 IDs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 08 07:00:44 GMT 2004
>Closed-Date:    Sat May 07 01:03:39 GMT 2005
>Last-Modified:  Sat May 07 01:03:39 GMT 2005
>Originator:     Jukka A. Ukkonen
>Release:        FreeBSD 4.10-STABLE
>Organization:
>Environment:
FreeBSD mjolnir 4.10-STABLE FreeBSD 4.10-STABLE #0: Tue Jun  8 08:23:02 EEST 2004     root@mjolnir:/usr/src/sys/compile/Mjolnir  i386

>Description:
      Radeon DRM support does not recognize certain Radeon 9200 ID codes.

>How-To-Repeat:
      Assuming one has e.g. a Sapphire Radeon 9200 dual head card the
kernel module radeon.ko does not recognize it as a drm device. Obviously
there is no drm0 listed in the boot time dmesg messages.

>Fix:
      Apply the following patch to /usr/src/sys/dev/drm/radeon_drv.c.
(The TAB characters have been preserved by using xcut and xclipboard to
import the patch to the web form.)

--- radeon_drv.c.orig	Tue Jun  8 09:42:58 2004
+++ radeon_drv.c	Tue Jun  8 09:46:27 2004
@@ -74,6 +74,13 @@
 	{0x1002, 0x516A, 1, "ATI Radeon Qj R200"},
 	{0x1002, 0x516B, 1, "ATI Radeon Qk R200"},
 	{0x1002, 0x516C, 1, "ATI Radeon Ql R200"},
+
+	/*
+	 *  5961    Radeon 9200 (128MB) - Primary
+	 *  5941    Radeon 9200 (128MB) - Secondary
+	 */
+	{0x1002, 0x5941, 1, "ATI Radeon 9200"},
+	{0x1002, 0x5961, 1, "ATI Radeon 9200"},
 	{0, 0, 0, NULL}
 };
 

>Release-Note:
>Audit-Trail:

From: "Jukka A. Ukkonen" <Jukka.Ukkonen@mawit.com>
To: freebsd-gnats-submit@FreeBSD.org, jau@iki.fi
Cc:  
Subject: Re: kern/67702: Radeon DRM does not recognize certain Radeon 9200
 IDs
Date: Tue, 08 Jun 2004 19:15:34 +0300

 With my fix applied DRM/DRI works X11 as expected.
 Starting X also generates this in the dmesg buffer...
 
 drm0: <ATI Radeon 9200> port 0xd800-0xd8ff mem 
 0xff5f0000-0xff5fffff,0xe8000000-0xefffffff irq 5 at device 0.0 on pci1
 info: [drm] AGP at 0xf8000000 64MB
 info: [drm] Initialized radeon 1.8.0 20020828 on minor 0
 drm1: <ATI Radeon 9200> mem 0xff5e0000-0xff5effff,0xe0000000-0xe7ffffff at 
 device 0.1 on pci1
 info: [drm] AGP at 0xf8000000 64MB
 info: [drm] Initialized radeon 1.8.0 20020828 on minor 1
 
 This appears in /var/log/XFree86.0.log ...
 
 drmOpenDevice: node name is /dev/dri/card0
 drmOpenDevice: open result is 6, (OK)
 drmOpenDevice: minor is 0
 drmOpenDevice: node name is /dev/dri/card0
 drmOpenDevice: open result is 6, (OK)
 drmOpenDevice: minor is 1
 drmOpenDevice: node name is /dev/dri/card1
 drmOpenDevice: open result is 6, (OK)
 drmGetBusid returned ''
 (II) RADEON(0): [drm] loaded kernel module for "radeon" driver
 (II) RADEON(0): [drm] created "radeon" driver at busid "PCI:1:0:0"
 (II) RADEON(0): [drm] added 8192 byte SAREA at 0xc2887000
 (II) RADEON(0): [drm] mapped SAREA 0xc2887000 to 0x28309000
 (II) RADEON(0): [drm] framebuffer handle = 0xe8000000
 (II) RADEON(0): [drm] added 1 reserved context for kernel
 
 These should be big enough signs that the patch really works.
 And an even better sign is that e.g. 3d xlock modes run much
 smoother with less CPU load.
 
 	// jau

From: "Jukka A. Ukkonen" <Jukka.Ukkonen@mawit.com>
To: freebsd-gnats-submit@FreeBSD.org, jau@iki.fi
Cc:  
Subject: Re: kern/67702: Radeon DRM does not recognize certain Radeon 9200
 IDs
Date: Wed, 09 Jun 2004 08:10:42 +0300

 To better follow the style of other entries in the ID code array
 I added the Radeon version tag "RV280" also to my entries.
 Find the modified patch below.
 
 --- radeon_drv.c.orig	Tue Jun  8 09:42:58 2004
 +++ radeon_drv.c	Wed Jun  9 08:02:20 2004
 @@ -74,6 +74,13 @@
   	{0x1002, 0x516A, 1, "ATI Radeon Qj R200"},
   	{0x1002, 0x516B, 1, "ATI Radeon Qk R200"},
   	{0x1002, 0x516C, 1, "ATI Radeon Ql R200"},
 +
 +	/*
 +	 *  5961    Radeon 9200 (128MB) - Primary
 +	 *  5941    Radeon 9200 (128MB) - Secondary
 +	 */
 +	{0x1002, 0x5941, 1, "ATI Radeon RV280 9200"},
 +	{0x1002, 0x5961, 1, "ATI Radeon RV280 9200"},
   	{0, 0, 0, NULL}
   };
 
 
 Cheers,
 	// jau
 
State-Changed-From-To: open->patched 
State-Changed-By: anholt 
State-Changed-When: Fri Jun 11 03:32:08 GMT 2004 
State-Changed-Why:  
Fixed in latest merge from the DRM tree.  Leaving it in state "patched" and 
owner not-me because I don't plan on doing a merge, but someone should if they 
care about the DRI in -stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67702 
State-Changed-From-To: patched->closed 
State-Changed-By: anholt 
State-Changed-When: Sat May 7 01:02:41 GMT 2005 
State-Changed-Why:  
Closing, as I don't intend to commit more DRM changes to 4-stable.  Please 
update to 5-stable for current DRM updates. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67702 
>Unformatted:
