diff options
-rw-r--r-- | drm/nouveau/nvkm/subdev/pci/agp.c | 8 | ||||
-rw-r--r-- | lib/include/nvif/os.h | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drm/nouveau/nvkm/subdev/pci/agp.c b/drm/nouveau/nvkm/subdev/pci/agp.c index 814cb51cc..385a90f91 100644 --- a/drm/nouveau/nvkm/subdev/pci/agp.c +++ b/drm/nouveau/nvkm/subdev/pci/agp.c @@ -35,6 +35,8 @@ static const struct nvkm_device_agp_quirk nvkm_device_agp_quirks[] = { /* VIA Apollo PRO133x / GeForce FX 5600 Ultra - fdo#20341 */ { PCI_VENDOR_ID_VIA, 0x0691, PCI_VENDOR_ID_NVIDIA, 0x0311, 2 }, + /* SiS 761 does not support AGP cards, use PCI mode */ + { PCI_VENDOR_ID_SI, 0x0761, PCI_ANY_ID, PCI_ANY_ID, 0 }, {}, }; @@ -137,8 +139,10 @@ nvkm_agp_ctor(struct nvkm_pci *pci) while (quirk->hostbridge_vendor) { if (info.device->vendor == quirk->hostbridge_vendor && info.device->device == quirk->hostbridge_device && - pci->pdev->vendor == quirk->chip_vendor && - pci->pdev->device == quirk->chip_device) { + (quirk->chip_vendor == (u16)PCI_ANY_ID || + pci->pdev->vendor == quirk->chip_vendor) && + (quirk->chip_device == (u16)PCI_ANY_ID || + pci->pdev->device == quirk->chip_device)) { nvkm_info(subdev, "forcing default agp mode to %dX, " "use NvAGP=<mode> to override\n", quirk->mode); diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h index 4757cd477..d3581ef04 100644 --- a/lib/include/nvif/os.h +++ b/lib/include/nvif/os.h @@ -1057,6 +1057,9 @@ pci_disable_msi(struct pci_dev *pdev) #define pci_get_bus_and_slot(a, b) NULL #define pci_read_config_dword(a,b,c) *(c) = 0 +#define PCI_ANY_ID (~0) + +#define PCI_VENDOR_ID_SI 0x1039 #define PCI_VENDOR_ID_NVIDIA 0x10de #define PCI_VENDOR_ID_VIA 0x1106 |