From skywizard@tomoyo.MyBSD.org.my  Thu Jul  1 08:52:47 2004
Return-Path: <skywizard@tomoyo.MyBSD.org.my>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 05FBE16A4CE; Thu,  1 Jul 2004 08:52:47 +0000 (GMT)
Received: from tomoyo.MyBSD.org.my (duke.void.net.my [202.157.186.223])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 6689443D4C; Thu,  1 Jul 2004 08:52:46 +0000 (GMT)
	(envelope-from skywizard@tomoyo.MyBSD.org.my)
Received: by tomoyo.MyBSD.org.my (Postfix, from userid 1033)
	id 407946CC21; Thu,  1 Jul 2004 16:54:14 +0800 (MYT)
Message-Id: <20040701085414.407946CC21@tomoyo.MyBSD.org.my>
Date: Thu,  1 Jul 2004 16:54:14 +0800 (MYT)
From: Ariff Abdullah <skywizard@MyBSD.org.my>
Reply-To: Ariff Abdullah <skywizard@MyBSD.org.my>
To: FreeBSD-gnats-submit@freebsd.org
Cc: freebsd-current@freebsd.org
Subject: Proper AGPv3/AGP 8x support for VIA KT400/400a/600
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68545
>Category:       kern
>Synopsis:       Proper AGPv3/AGP 8x support for VIA KT400/400a/600
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 01 09:00:39 GMT 2004
>Closed-Date:    Fri Jul 02 03:40:01 GMT 2004
>Last-Modified:  Fri Jul 02 03:40:01 GMT 2004
>Originator:     Ariff Abdullah
>Release:        FreeBSD 5.2-CURRENT
>Organization:
MyBSD
>Environment:
System: FreeBSD akane.MyBSD.org.my 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sat Jun 26 00:01:41 MYT 2004     root@kasumi.MyBSD.org.my:/usr/obj/usr/src/sys/AKANE  i386


>Description:
	Trying to enable dri/drm support on VIA KT400/400a/600 based
	chipset will lock up the machine, since the agp driver use
	the wrong hardware register (AGPv2, instead of AGPv3).
>How-To-Repeat:
	Load drm module for your card, enable dri in XF86Config, run X.
	If you're using AGP 8X card (Radeon 9200 for example), either
	your machine will come to abrupt halt, or suddenly become
	sluggish.
>Fix:
	Apply this patch. Rebuild kernel/modules.

--- sys/pci/agp_via.c.orig	Sun Jun  6 09:20:53 2004
+++ sys/pci/agp_via.c	Sun Jun  6 09:27:57 2004
@@ -89,6 +89,8 @@
 		return ("VIA 82C691 (Apollo Pro) host to PCI bridge");
 	case 0x31881106:
 		return ("VIA 8385 host to PCI bridge");
+	case 0x31891106:
+		return ("VIA 8377 (Apollo KT400/KT400A/KT600) host to PCI bridge");
 	};
 
 	if (pci_get_vendor(dev) == 0x1106)
@@ -123,6 +125,7 @@
 
 	switch (pci_get_devid(dev)) {
 	case 0x31881106:
+	case 0x31891106:
 		sc->regs = via_v3_regs;
 		break;
 	default:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jhb 
State-Changed-When: Fri Jul 2 03:39:39 GMT 2004 
State-Changed-Why:  
Committed, thanks! 

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