#include "radeon.h" #define SUBSYS_ANY (~0) typedef struct { int chipType; int subsysVendor; int subsysCard; void (*hook)(RADEONInfoPtr); } radeon_quirk, *radeon_quirk_ptr; static void quirk_agpmode_2 (RADEONInfoPtr info) { info->quirk_flag |= QUIRK_AGPMODE_2; } static radeon_quirk radeon_quirk_list[] = { { PCI_CHIP_FOOBAR, xxx, xxx, quirk_agpmode_2 }, { 0, 0, 0, NULL }, }; void radeon_fixup_devices(ScrnInfoPtr scrn) { RADEONInfoPtr info = RADEONPTR(scrn); radeon_quirk_ptr p = radeon_quirk_list; int i; while (p && p->chipType != 0) { if (DEVICE_ID(info->PciInfo) == p->chipType && SUBVENDOR_ID(info->PciInfo) == p->subsysVendor && (SUBSYS_ID(info->PciInfo) == p->subsysCard || p->subsysCard == SUBSYS_ANY)) p->hook(pRadeon); ++p; } }