intel-agp: introduce IS_I915 and do some cleanups..
Add a new IS_I915 and also do some checkpatch whitespace cleanups. Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
9119f85a0c
commit
f011ae7437
|
@ -35,6 +35,14 @@
|
|||
#define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40
|
||||
#define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42
|
||||
|
||||
/* cover 915 and 945 variants */
|
||||
#define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB)
|
||||
|
||||
#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82G35_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
|
||||
|
@ -544,26 +552,14 @@ static void intel_i830_init_gtt_entries(void)
|
|||
break;
|
||||
case I915_GMCH_GMS_STOLEN_48M:
|
||||
/* Check it's really I915G */
|
||||
if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB ||
|
||||
IS_I965 || IS_G33)
|
||||
if (IS_I915 || IS_I965 || IS_G33)
|
||||
gtt_entries = MB(48) - KB(size);
|
||||
else
|
||||
gtt_entries = 0;
|
||||
break;
|
||||
case I915_GMCH_GMS_STOLEN_64M:
|
||||
/* Check it's really I915G */
|
||||
if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB ||
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB ||
|
||||
IS_I965 || IS_G33)
|
||||
if (IS_I915 || IS_I965 || IS_G33)
|
||||
gtt_entries = MB(64) - KB(size);
|
||||
else
|
||||
gtt_entries = 0;
|
||||
|
@ -614,9 +610,8 @@ static void intel_i830_setup_flush(void)
|
|||
return;
|
||||
|
||||
intel_private.i8xx_page = alloc_page(GFP_KERNEL | __GFP_ZERO | GFP_DMA32);
|
||||
if (!intel_private.i8xx_page) {
|
||||
if (!intel_private.i8xx_page)
|
||||
return;
|
||||
}
|
||||
|
||||
/* make page uncached */
|
||||
map_page_into_agp(intel_private.i8xx_page);
|
||||
|
@ -748,7 +743,8 @@ static void intel_i830_cleanup(void)
|
|||
iounmap(intel_private.registers);
|
||||
}
|
||||
|
||||
static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int type)
|
||||
static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start,
|
||||
int type)
|
||||
{
|
||||
int i, j, num_entries;
|
||||
void *temp;
|
||||
|
@ -918,7 +914,7 @@ static void intel_i9xx_setup_flush(void)
|
|||
if (intel_private.ifp_resource.start) {
|
||||
intel_private.i9xx_flush_page = ioremap_nocache(intel_private.ifp_resource.start, PAGE_SIZE);
|
||||
if (!intel_private.i9xx_flush_page)
|
||||
printk("unable to ioremap flush page - no chipset flushing");
|
||||
printk(KERN_INFO "unable to ioremap flush page - no chipset flushing");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1043,9 +1039,9 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = pg_start; i < (mem->page_count + pg_start); i++) {
|
||||
for (i = pg_start; i < (mem->page_count + pg_start); i++)
|
||||
writel(agp_bridge->scratch_page, intel_private.gtt+i);
|
||||
}
|
||||
|
||||
readl(intel_private.gtt+i-1);
|
||||
|
||||
agp_bridge->driver->tlb_flush(mem);
|
||||
|
|
Loading…
Reference in a new issue