Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2001 22:16:49 +0300 (MSK)
From:      Seva Gluschenko <gvs@rinet.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/32255: AMD761(tm) and MGA G550 are not known by PCI kernel routines
Message-ID:  <200111241916.fAOJGn024833@staff.rinet.ru>

next in thread | raw e-mail | index | archive | help

>Number:         32255
>Category:       kern
>Synopsis:       AMD761(tm) and MGA G550 are not known by PCI kernel routines
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 24 11:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Seva Gluschenko
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
Cronyx Plus LLC / ru.rinet LIR
>Environment:
System: FreeBSD staff.rinet.ru 4.4-STABLE FreeBSD 4.4-STABLE #0: Thu Oct 25 06:32:20 MSD 2001 root@:/usr/src/sys/compile/staff i386


	
>Description:
	1. AMD 761 recognition strings weren't added to kernel PCI routines
	which results, in parts, to unability to properly initialize AGP
	routines for this chipset. Therefore, AGP kernel module fails to
	work affecting the DRM and DRI functionality this way (actual for
	XFree86-4 and accelerated AGP cards).

	Once AMD 751 chipset has pretty the same routines needed to work
	with AGP (derived from AMD documentation studied), the only thing
	which is needed to be performed is to add AMD 761 identification
	codes recognition.

	2. Matrox MGA G550 graphics card (AGP, Dual-Head, DVI) ID wasn't
	added to the device recognitions strings as well.

>How-To-Repeat:

	If you have either AMD 761 based motherboard or MGA G550 card (or
	both), you will see FreeBSD standard messages for unknown generic
	devices of their types/subtypes during initial boot. If you
	compiled DRM module and try to load it in the boot time, you will
	get the message like "DRM probe_and_attach returned 12". It means
	that DRM module cannot connect to the AGP GART interface provided
	by AGP module.

	After that, when trying to start X, you will get message "drmOpen
	failed, disabling DRI".


	N.B.: The DRM modules supplied with XFree86-4 distribution (4.1.0)
	aren't working good at least with MGA. I've used drm-kmod-*-tar.gz
	taken from FreeBSD distfiles (they are for -current, but work
	just fine at least with MGA different models for -stable as well).

>Fix:

	Apply the patch below, as follows:

	# cd /usr/src/sys
	# patch < /path/to/diff

	Then rebuild your kernel and AGP module:

	# cd compile/YOUR_KERNEL_NAME
	# make depend all install
	# cd ../../modules/agp
	# make depend all install

	After reboot your AMD 761 and/or Matrox MGA G550 card should be
	recognized and handled properly.

	The patch itself follows:

--- i386/isa/pcibus.c.orig	Thu Nov 22 11:45:26 2001
+++ i386/isa/pcibus.c	Thu Nov 22 11:46:18 2001
@@ -131,6 +131,9 @@
 	case 0x70061022:
 		s = "AMD-751 host to PCI bridge";
 		break;
+	case 0x700e1022:
+		s = "AMD-761 host to PCI bridge";
+		break;
 
 		/* SiS -- vendor 0x1039 */
 	case 0x04961039:
--- pci/agp_amd.c.orig	Thu Nov 22 11:47:30 2001
+++ pci/agp_amd.c	Thu Nov 22 11:49:20 2001
@@ -163,6 +163,8 @@
 	switch (pci_get_devid(dev)) {
 	case 0x70061022:
 		return ("AMD 751 host to AGP bridge");
+	case 0x700e1022:
+		return ("AMD 761 host to AGP bridge");
 	};
 
 	return NULL;
--- pci/pcisupport.c.orig	Thu Nov 22 01:08:59 2001
+++ pci/pcisupport.c	Thu Nov 22 01:20:54 2001
@@ -713,7 +713,9 @@
 
 	/* AMD -- vendor 0x1022 */
 	case 0x70071022:
-		return ("AMD-751 PCI-PCI (AGP) bridge");
+		return ("AMD-751 PCI-PCI (1x/2x AGP) bridge");
+	case 0x700f1022:
+		return ("AMD-761 PCI-PCI (4x AGP) bridge");
 
 	/* DEC -- vendor 0x1011 */
 	case 0x00011011:
@@ -1269,6 +1271,8 @@
 	/* AMD -- vendor 0x1022 */
 	case 0x70061022:
 		return ("AMD-751 host to PCI bridge");
+	case 0x700e1022:
+		return ("AMD-761 host to PCI bridge");
 
 	/* NEC -- vendor 0x1033 */
 	case 0x00021033:
@@ -1462,6 +1466,8 @@
 			chip = "MGA G100"; break;
 		case 0x1001:
 			chip = "MGA G100 AGP"; break;
+		case 0x2527:
+			chip = "MGA G550 AGP"; break;
 
 		}
 		break;
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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