From 6409a78036a89825c899f94692a33de719298dbb Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 16 Oct 2000 08:53:00 +0000 Subject: [PATCH] Added support for i815. --- sys/dev/agp/agp_i810.c | 18 ++++++++++++++++-- sys/pci/agp_i810.c | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 3b209bd51596..79fd56683214 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -84,6 +84,9 @@ agp_i810_match(device_t dev) case 0x71258086: return ("Intel 82810E (i810E GMCH) SVGA controller"); + + case 0x11328086: + return ("Intel 82815 (i815 GMCH) SVGA controller"); }; return NULL; @@ -100,9 +103,20 @@ agp_i810_find_bridge(device_t dev) u_int32_t devid; /* - * XXX assume that the bridge device's ID is one minus the vga ID. + * Calculate bridge device's ID. */ - devid = pci_get_devid(dev) - 0x10000; + devid = pci_get_devid(dev); + switch (devid) { + case 0x71218086: + case 0x71238086: + case 0x71258086: + devid -= 0x10000; + break; + + case 0x11328086: + devid = 0x11308086; + break; + }; if (device_get_children(device_get_parent(dev), &children, &nchildren)) return 0; diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c index 3b209bd51596..79fd56683214 100644 --- a/sys/pci/agp_i810.c +++ b/sys/pci/agp_i810.c @@ -84,6 +84,9 @@ agp_i810_match(device_t dev) case 0x71258086: return ("Intel 82810E (i810E GMCH) SVGA controller"); + + case 0x11328086: + return ("Intel 82815 (i815 GMCH) SVGA controller"); }; return NULL; @@ -100,9 +103,20 @@ agp_i810_find_bridge(device_t dev) u_int32_t devid; /* - * XXX assume that the bridge device's ID is one minus the vga ID. + * Calculate bridge device's ID. */ - devid = pci_get_devid(dev) - 0x10000; + devid = pci_get_devid(dev); + switch (devid) { + case 0x71218086: + case 0x71238086: + case 0x71258086: + devid -= 0x10000; + break; + + case 0x11328086: + devid = 0x11308086; + break; + }; if (device_get_children(device_get_parent(dev), &children, &nchildren)) return 0;