diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel_driver.h | 15 | ||||
-rw-r--r-- | src/intel_module.c | 12 | ||||
-rw-r--r-- | src/legacy/i810/i810_dri.c | 2 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 8 | ||||
-rw-r--r-- | src/sna/sna_video_hwmc.c | 2 | ||||
-rw-r--r-- | src/uxa/intel.h | 12 |
8 files changed, 21 insertions, 36 deletions
diff --git a/src/intel_driver.h b/src/intel_driver.h index 7660f006..03668784 100644 --- a/src/intel_driver.h +++ b/src/intel_driver.h @@ -263,21 +263,6 @@ #endif -#define I85X_CAPID 0x44 -#define I85X_VARIANT_MASK 0x7 -#define I85X_VARIANT_SHIFT 5 -#define I855_GME 0x0 -#define I855_GM 0x4 -#define I852_GME 0x2 -#define I852_GM 0x5 - -#define I810_MEMBASE(p,n) (p)->regions[(n)].base_addr -#define VENDOR_ID(p) (p)->vendor_id -#define DEVICE_ID(p) (p)->device_id -#define SUBVENDOR_ID(p) (p)->subvendor_id -#define SUBSYS_ID(p) (p)->subdevice_id -#define CHIP_REVISION(p) (p)->revision - struct intel_device_info { int gen; }; diff --git a/src/intel_module.c b/src/intel_module.c index 90643d35..3c52c0f5 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -268,11 +268,11 @@ intel_detect_chipset(ScrnInfoPtr scrn, xf86DrvMsg(scrn->scrnIndex, from = X_CONFIG, "ChipID override: 0x%04X\n", ent->device->chipID); - DEVICE_ID(pci) = ent->device->chipID; + pci->device_id = ent->device->chipID; } for (i = 0; intel_chipsets[i].name != NULL; i++) { - if (DEVICE_ID(pci) == intel_chipsets[i].token) { + if (pci->device_id == intel_chipsets[i].token) { name = intel_chipsets[i].name; break; } @@ -281,7 +281,7 @@ intel_detect_chipset(ScrnInfoPtr scrn, int gen = 0; for (i = 0; intel_device_match[i].device_id != 0; i++) { - if (DEVICE_ID(pci) == intel_device_match[i].device_id) { + if (pci->device_id == intel_device_match[i].device_id) { const struct intel_device_info *info = (void *)intel_device_match[i].match_data; gen = info->gen >> 3; break; @@ -481,14 +481,14 @@ intel_scrn_create(DriverPtr driver, */ static Bool intel_pci_probe(DriverPtr driver, int entity_num, - struct pci_device *device, + struct pci_device *pci, intptr_t match_data) { - if (intel_open_device(entity_num, device, NULL) == -1) { + if (intel_open_device(entity_num, pci, NULL) == -1) { #if KMS_ONLY return FALSE; #else - switch (DEVICE_ID(device)) { + switch (pci->device_id) { case PCI_CHIP_I810: case PCI_CHIP_I810_DC100: case PCI_CHIP_I810_E: diff --git a/src/legacy/i810/i810_dri.c b/src/legacy/i810/i810_dri.c index 3bdb2ceb..26ad8559 100644 --- a/src/legacy/i810/i810_dri.c +++ b/src/legacy/i810/i810_dri.c @@ -867,7 +867,7 @@ I810DRIScreenInit(ScreenPtr pScreen) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] dma control initialized, using IRQ %d\n", pI810DRI->irq); - pI810DRI->deviceID = DEVICE_ID(pI810->PciInfo); + pI810DRI->deviceID = pI810->PciInfo->device_id; pI810DRI->width = pScrn->virtualX; pI810DRI->height = pScrn->virtualY; pI810DRI->mem = pScrn->videoRam * 1024; diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index ef9d7f47..9b469f39 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -3338,7 +3338,7 @@ const char *gen5_render_init(struct sna *sna, const char *backend) #if !NO_COMPOSITE_SPANS sna->render.check_composite_spans = gen5_check_composite_spans; sna->render.composite_spans = gen5_render_composite_spans; - if (DEVICE_ID(sna->PciInfo) == 0x0044) + if (sna->PciInfo->device_id == 0x0044) sna->render.prefer_gpu |= PREFER_GPU_SPANS; #endif sna->render.video = gen5_render_video; diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 09fdb67a..200406f5 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -3580,12 +3580,12 @@ static void gen6_render_fini(struct sna *sna) static bool is_gt2(struct sna *sna) { - return DEVICE_ID(sna->PciInfo) & 0x30; + return sna->PciInfo->device_id & 0x30; } static bool is_mobile(struct sna *sna) { - return (DEVICE_ID(sna->PciInfo) & 0xf) == 0x6; + return (sna->PciInfo->device_id & 0xf) == 0x6; } static bool gen6_render_setup(struct sna *sna) diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index b602fe34..fa6d998f 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -3740,12 +3740,12 @@ static void gen7_render_fini(struct sna *sna) static bool is_gt2(struct sna *sna) { - return DEVICE_ID(sna->PciInfo) & (sna->kgem.gen == 075 ? 0x30 : 0x20); + return sna->PciInfo->device_id & (sna->kgem.gen == 075 ? 0x30 : 0x20); } static bool is_mobile(struct sna *sna) { - return (DEVICE_ID(sna->PciInfo) & 0xf) == 0x6; + return (sna->PciInfo->device_id & 0xf) == 0x6; } static bool gen7_render_setup(struct sna *sna) @@ -3757,7 +3757,7 @@ static bool gen7_render_setup(struct sna *sna) if (sna->kgem.gen == 070) { state->info = &ivb_gt_info; - if (DEVICE_ID(sna->PciInfo) & 0xf) { + if (sna->PciInfo->device_id & 0xf) { state->info = &ivb_gt1_info; if (is_gt2(sna)) state->info = &ivb_gt2_info; /* XXX requires GT_MODE WiZ disabled */ @@ -3766,7 +3766,7 @@ static bool gen7_render_setup(struct sna *sna) state->info = &vlv_gt_info; } else if (sna->kgem.gen == 075) { state->info = &hsw_gt_info; - if (DEVICE_ID(sna->PciInfo) & 0xf) { + if (sna->PciInfo->device_id & 0xf) { state->info = &hsw_gt1_info; if (is_gt2(sna)) state->info = &hsw_gt2_info; diff --git a/src/sna/sna_video_hwmc.c b/src/sna/sna_video_hwmc.c index 52f1560b..2a9fd065 100644 --- a/src/sna/sna_video_hwmc.c +++ b/src/sna/sna_video_hwmc.c @@ -86,7 +86,7 @@ static int create_context(XvPortPtr port, XvMCContextPtr ctx, else priv->type = XVMC_I965_MPEG2_MC; priv->i965.is_g4x = sna->kgem.gen == 045; - priv->i965.is_965_q = DEVICE_ID(sna->PciInfo) == PCI_CHIP_I965_Q; + priv->i965.is_965_q = sna->PciInfo->device_id == PCI_CHIP_I965_Q; priv->i965.is_igdng = sna->kgem.gen == 050; } else priv->type = XVMC_I915_MPEG2_MC; diff --git a/src/uxa/intel.h b/src/uxa/intel.h index 2b1ff5e2..9b696cd8 100644 --- a/src/uxa/intel.h +++ b/src/uxa/intel.h @@ -364,14 +364,14 @@ typedef struct intel_screen_private { #define IS_HSW(intel) (INTEL_INFO(intel)->gen == 075) /* Some chips have specific errata (or limits) that we need to workaround. */ -#define IS_I830(intel) (DEVICE_ID((intel)->PciInfo) == PCI_CHIP_I830_M) -#define IS_845G(intel) (DEVICE_ID((intel)->PciInfo) == PCI_CHIP_845_G) -#define IS_I865G(intel) (DEVICE_ID((intel)->PciInfo) == PCI_CHIP_I865_G) +#define IS_I830(intel) ((intel)->PciInfo->device_id == PCI_CHIP_I830_M) +#define IS_845G(intel) ((intel)->PciInfo->device_id == PCI_CHIP_845_G) +#define IS_I865G(intel) ((intel)->PciInfo->device_id == PCI_CHIP_I865_G) -#define IS_I915G(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I915_G || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_E7221_G) -#define IS_I915GM(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I915_GM) +#define IS_I915G(pI810) ((intel)->PciInfo->device_id == PCI_CHIP_I915_G || (intel)->PciInfo->device_id == PCI_CHIP_E7221_G) +#define IS_I915GM(pI810) ((intel)->PciInfo->device_id == PCI_CHIP_I915_GM) -#define IS_965_Q(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_Q) +#define IS_965_Q(pI810) ((intel)->PciInfo->device_id == PCI_CHIP_I965_Q) /* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */ #define SUPPORTS_YTILING(pI810) (INTEL_INFO(intel)->gen >= 040) |