Bug 32255

Summary: AMD761(tm) and MGA G550 are not known by PCI kernel routines
Product: Base System Reporter: Seva Gluschenko <gvs>
Component: kernAssignee: Murray Stokely <murray>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Seva Gluschenko 2001-11-24 19:30:01 UTC
	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.

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:
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).
Comment 1 Murray Stokely freebsd_committer freebsd_triage 2001-11-28 20:41:48 UTC
State Changed
From-To: open->analyzed

This patch doesn't apply to -CURRENT as things have moved around a bit. 



Comment 2 Murray Stokely freebsd_committer freebsd_triage 2001-11-28 20:41:48 UTC
Responsible Changed
From-To: freebsd-bugs->murray

I'll update the patch and commit this to -CURRENT soon.
Comment 3 Murray Stokely freebsd_committer freebsd_triage 2001-12-10 09:30:45 UTC
Ok.  -CURRENT does things differently.  I believe the video stuff is
done by PCI class now, instead of by individual chipset, so there is
no need to add an entry for the MGA G550 in -CURRENT.  Most of the
AMD761 stuff was also already in -CURRENT but I added one more id
string so that the correct message will be displayed to identify the
device at boot.  

I will merge your patches to -STABLE next week.
Comment 4 Murray Stokely freebsd_committer freebsd_triage 2001-12-20 11:11:06 UTC
State Changed
From-To: analyzed->closed

Your patch has been applied to -STABLE.  This fix will be present in 
the upcoming FreeBSD 4.5.  Thanks for your submission!