remove test for VGA subclass, also match PCI_PRODUCT_ATI_RAGE3AGP4XT

this makes r128fb work on 2nd generation iMacs
From Brett Slager
This commit is contained in:
macallan 2008-05-30 19:56:14 +00:00
parent cd2143c845
commit 55bd0f3dd6

View File

@ -1,4 +1,4 @@
/* $NetBSD: r128fb.c,v 1.4 2008/05/08 01:47:49 macallan Exp $ */
/* $NetBSD: r128fb.c,v 1.5 2008/05/30 19:56:14 macallan Exp $ */
/*
* Copyright (c) 2007 Michael Lorenz
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.4 2008/05/08 01:47:49 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.5 2008/05/30 19:56:14 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -165,14 +165,14 @@ r128fb_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY ||
PCI_SUBCLASS(pa->pa_class) != PCI_SUBCLASS_DISPLAY_VGA)
if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY)
return 0;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_ATI)
return 0;
/* only card tested on so far - likely need a list */
if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ATI_RAGE1AGP4XT)
/* only cards tested on so far - likely need a list */
if ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ATI_RAGE1AGP4XT) ||
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ATI_RAGE3AGP4XT))
return 100;
return (0);
}