Merge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6
* 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6: agp: balance ioremap checks agp: Add device id for P4M900 to via-agp module efficeon-agp leaks 'struct agp_bridge_data' in error paths of agp_efficeon_probe()
This commit is contained in:
commit
6ae26fa468
@ -223,6 +223,8 @@ static int amd_irongate_configure(void)
|
|||||||
pci_read_config_dword(agp_bridge->dev, AMD_MMBASE, &temp);
|
pci_read_config_dword(agp_bridge->dev, AMD_MMBASE, &temp);
|
||||||
temp = (temp & PCI_BASE_ADDRESS_MEM_MASK);
|
temp = (temp & PCI_BASE_ADDRESS_MEM_MASK);
|
||||||
amd_irongate_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
|
amd_irongate_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
|
||||||
|
if (!amd_irongate_private.registers)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
/* Write out the address of the gatt table */
|
/* Write out the address of the gatt table */
|
||||||
writel(agp_bridge->gatt_bus_addr, amd_irongate_private.registers+AMD_ATTBASE);
|
writel(agp_bridge->gatt_bus_addr, amd_irongate_private.registers+AMD_ATTBASE);
|
||||||
|
@ -213,6 +213,9 @@ static int ati_configure(void)
|
|||||||
temp = (temp & 0xfffff000);
|
temp = (temp & 0xfffff000);
|
||||||
ati_generic_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
|
ati_generic_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
|
||||||
|
|
||||||
|
if (!ati_generic_private.registers)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
if (is_r200())
|
if (is_r200())
|
||||||
pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000);
|
pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000);
|
||||||
else
|
else
|
||||||
|
@ -375,6 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
|
|||||||
if (!r->start && r->end) {
|
if (!r->start && r->end) {
|
||||||
if (pci_assign_resource(pdev, 0)) {
|
if (pci_assign_resource(pdev, 0)) {
|
||||||
printk(KERN_ERR PFX "could not assign resource 0\n");
|
printk(KERN_ERR PFX "could not assign resource 0\n");
|
||||||
|
agp_put_bridge(bridge);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,6 +387,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
|
|||||||
*/
|
*/
|
||||||
if (pci_enable_device(pdev)) {
|
if (pci_enable_device(pdev)) {
|
||||||
printk(KERN_ERR PFX "Unable to Enable PCI device\n");
|
printk(KERN_ERR PFX "Unable to Enable PCI device\n");
|
||||||
|
agp_put_bridge(bridge);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,6 +221,7 @@ hp_zx1_lba_init (u64 hpa)
|
|||||||
if (cap != PCI_CAP_ID_AGP) {
|
if (cap != PCI_CAP_ID_AGP) {
|
||||||
printk(KERN_ERR PFX "Invalid capability ID 0x%02x at 0x%x\n",
|
printk(KERN_ERR PFX "Invalid capability ID 0x%02x at 0x%x\n",
|
||||||
cap, hp->lba_cap_offset);
|
cap, hp->lba_cap_offset);
|
||||||
|
iounmap(hp->lba_regs);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,6 +249,10 @@ static int i460_create_gatt_table (struct agp_bridge_data *bridge)
|
|||||||
num_entries = A_SIZE_8(temp)->num_entries;
|
num_entries = A_SIZE_8(temp)->num_entries;
|
||||||
|
|
||||||
i460.gatt = ioremap(INTEL_I460_ATTBASE, PAGE_SIZE << page_order);
|
i460.gatt = ioremap(INTEL_I460_ATTBASE, PAGE_SIZE << page_order);
|
||||||
|
if (!i460.gatt) {
|
||||||
|
printk(KERN_ERR PFX "ioremap failed\n");
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
/* These are no good, the should be removed from the agp_bridge strucure... */
|
/* These are no good, the should be removed from the agp_bridge strucure... */
|
||||||
agp_bridge->gatt_table_real = NULL;
|
agp_bridge->gatt_table_real = NULL;
|
||||||
|
@ -930,8 +930,10 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
temp &= 0xfff80000;
|
temp &= 0xfff80000;
|
||||||
|
|
||||||
intel_private.registers = ioremap(temp,128 * 4096);
|
intel_private.registers = ioremap(temp,128 * 4096);
|
||||||
if (!intel_private.registers)
|
if (!intel_private.registers) {
|
||||||
|
iounmap(intel_private.gtt);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
|
temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
|
||||||
global_cache_flush(); /* FIXME: ? */
|
global_cache_flush(); /* FIXME: ? */
|
||||||
@ -985,13 +987,15 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
temp &= 0xfff00000;
|
temp &= 0xfff00000;
|
||||||
intel_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024);
|
intel_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024);
|
||||||
|
|
||||||
if (!intel_private.gtt)
|
if (!intel_private.gtt)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
||||||
intel_private.registers = ioremap(temp,128 * 4096);
|
intel_private.registers = ioremap(temp,128 * 4096);
|
||||||
if (!intel_private.registers)
|
if (!intel_private.registers) {
|
||||||
return -ENOMEM;
|
iounmap(intel_private.gtt);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
|
temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
|
||||||
global_cache_flush(); /* FIXME: ? */
|
global_cache_flush(); /* FIXME: ? */
|
||||||
|
@ -157,6 +157,9 @@ static int nvidia_configure(void)
|
|||||||
nvidia_private.aperture =
|
nvidia_private.aperture =
|
||||||
(volatile u32 __iomem *) ioremap(apbase, 33 * PAGE_SIZE);
|
(volatile u32 __iomem *) ioremap(apbase, 33 * PAGE_SIZE);
|
||||||
|
|
||||||
|
if (!nvidia_private.aperture)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,6 +399,11 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
|
|||||||
.device_id = PCI_DEVICE_ID_VIA_P4M890,
|
.device_id = PCI_DEVICE_ID_VIA_P4M890,
|
||||||
.chipset_name = "P4M890",
|
.chipset_name = "P4M890",
|
||||||
},
|
},
|
||||||
|
/* P4M900 */
|
||||||
|
{
|
||||||
|
.device_id = PCI_DEVICE_ID_VIA_VT3364,
|
||||||
|
.chipset_name = "P4M900",
|
||||||
|
},
|
||||||
{ }, /* dummy final entry, always present */
|
{ }, /* dummy final entry, always present */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1290,6 +1290,7 @@
|
|||||||
#define PCI_DEVICE_ID_VIA_VT3324 0x0324
|
#define PCI_DEVICE_ID_VIA_VT3324 0x0324
|
||||||
#define PCI_DEVICE_ID_VIA_VT3336 0x0336
|
#define PCI_DEVICE_ID_VIA_VT3336 0x0336
|
||||||
#define PCI_DEVICE_ID_VIA_VT3351 0x0351
|
#define PCI_DEVICE_ID_VIA_VT3351 0x0351
|
||||||
|
#define PCI_DEVICE_ID_VIA_VT3364 0x0364
|
||||||
#define PCI_DEVICE_ID_VIA_8371_0 0x0391
|
#define PCI_DEVICE_ID_VIA_8371_0 0x0391
|
||||||
#define PCI_DEVICE_ID_VIA_8501_0 0x0501
|
#define PCI_DEVICE_ID_VIA_8501_0 0x0501
|
||||||
#define PCI_DEVICE_ID_VIA_82C561 0x0561
|
#define PCI_DEVICE_ID_VIA_82C561 0x0561
|
||||||
|
Loading…
x
Reference in New Issue
Block a user