Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart: [AGPGART] Make AGP depend on PCI [AGPGART] remove unused variable [AGPGART] Fix pci_register_driver checking in amd64-agp [AGPGART] Compile fix for ati-agp [AGPGART] Suspend/Resume support for nVidia nForce AGP. [AGPGART] Suspend/Resume improvements for ATI AGP [AGPGART] Whitespace cleanups for ati-agp
This commit is contained in:
commit
82991c6f2c
@ -1,6 +1,7 @@
|
|||||||
config AGP
|
config AGP
|
||||||
tristate "/dev/agpgart (AGP Support)"
|
tristate "/dev/agpgart (AGP Support)"
|
||||||
depends on ALPHA || IA64 || PPC || X86
|
depends on ALPHA || IA64 || PPC || X86
|
||||||
|
depends on PCI
|
||||||
---help---
|
---help---
|
||||||
AGP (Accelerated Graphics Port) is a bus system mainly used to
|
AGP (Accelerated Graphics Port) is a bus system mainly used to
|
||||||
connect graphics cards to the rest of the system.
|
connect graphics cards to the rest of the system.
|
||||||
|
@ -734,7 +734,7 @@ int __init agp_amd64_init(void)
|
|||||||
|
|
||||||
if (agp_off)
|
if (agp_off)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (pci_register_driver(&agp_amd64_pci_driver) > 0) {
|
if (pci_register_driver(&agp_amd64_pci_driver) < 0) {
|
||||||
struct pci_dev *dev;
|
struct pci_dev *dev;
|
||||||
if (!agp_try_unsupported && !agp_try_unsupported_boot) {
|
if (!agp_try_unsupported && !agp_try_unsupported_boot) {
|
||||||
printk(KERN_INFO PFX "No supported AGP bridge found.\n");
|
printk(KERN_INFO PFX "No supported AGP bridge found.\n");
|
||||||
|
@ -41,7 +41,6 @@ static struct gatt_mask ati_generic_masks[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _ati_page_map {
|
typedef struct _ati_page_map {
|
||||||
unsigned long *real;
|
unsigned long *real;
|
||||||
unsigned long __iomem *remapped;
|
unsigned long __iomem *remapped;
|
||||||
@ -141,7 +140,8 @@ static int ati_create_gatt_pages(int nr_tables)
|
|||||||
ati_generic_private.num_tables = nr_tables;
|
ati_generic_private.num_tables = nr_tables;
|
||||||
ati_generic_private.gatt_pages = tables;
|
ati_generic_private.gatt_pages = tables;
|
||||||
|
|
||||||
if (retval != 0) ati_free_gatt_pages();
|
if (retval != 0)
|
||||||
|
ati_free_gatt_pages();
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
@ -245,19 +245,21 @@ static int ati_configure(void)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int agp_ati_resume(struct pci_dev *dev)
|
|
||||||
{
|
|
||||||
pci_restore_state(dev);
|
|
||||||
|
|
||||||
return ati_configure();
|
|
||||||
}
|
|
||||||
|
|
||||||
static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
|
static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
|
||||||
{
|
{
|
||||||
pci_save_state(dev);
|
pci_save_state(dev);
|
||||||
|
pci_set_power_state(dev, 3);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int agp_ati_resume(struct pci_dev *dev)
|
||||||
|
{
|
||||||
|
pci_set_power_state(dev, 0);
|
||||||
|
pci_restore_state(dev);
|
||||||
|
|
||||||
|
return ati_configure();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -321,9 +323,9 @@ static int ati_remove_memory(struct agp_memory * mem, off_t pg_start,
|
|||||||
unsigned long __iomem *cur_gatt;
|
unsigned long __iomem *cur_gatt;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
|
|
||||||
if (type != 0 || mem->type != 0) {
|
if (type != 0 || mem->type != 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
for (i = pg_start; i < (mem->page_count + pg_start); i++) {
|
for (i = pg_start; i < (mem->page_count + pg_start); i++) {
|
||||||
addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
|
addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
|
||||||
cur_gatt = GET_GATT(addr);
|
cur_gatt = GET_GATT(addr);
|
||||||
@ -505,7 +507,6 @@ found:
|
|||||||
|
|
||||||
bridge->driver = &ati_generic_bridge;
|
bridge->driver = &ati_generic_bridge;
|
||||||
|
|
||||||
|
|
||||||
printk(KERN_INFO PFX "Detected Ati %s chipset\n",
|
printk(KERN_INFO PFX "Detected Ati %s chipset\n",
|
||||||
devs[j].chipset_name);
|
devs[j].chipset_name);
|
||||||
|
|
||||||
@ -546,8 +547,8 @@ static struct pci_driver agp_ati_pci_driver = {
|
|||||||
.probe = agp_ati_probe,
|
.probe = agp_ati_probe,
|
||||||
.remove = agp_ati_remove,
|
.remove = agp_ati_remove,
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.resume = agp_ati_resume,
|
|
||||||
.suspend = agp_ati_suspend,
|
.suspend = agp_ati_suspend,
|
||||||
|
.resume = agp_ati_resume,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -376,6 +376,29 @@ static void __devexit agp_nvidia_remove(struct pci_dev *pdev)
|
|||||||
agp_put_bridge(bridge);
|
agp_put_bridge(bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||||
|
{
|
||||||
|
pci_save_state (pdev);
|
||||||
|
pci_set_power_state (pdev, 3);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int agp_nvidia_resume(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
/* set power state 0 and restore PCI space */
|
||||||
|
pci_set_power_state (pdev, 0);
|
||||||
|
pci_restore_state(pdev);
|
||||||
|
|
||||||
|
/* reconfigure AGP hardware again */
|
||||||
|
nvidia_configure();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static struct pci_device_id agp_nvidia_pci_table[] = {
|
static struct pci_device_id agp_nvidia_pci_table[] = {
|
||||||
{
|
{
|
||||||
.class = (PCI_CLASS_BRIDGE_HOST << 8),
|
.class = (PCI_CLASS_BRIDGE_HOST << 8),
|
||||||
@ -403,6 +426,10 @@ static struct pci_driver agp_nvidia_pci_driver = {
|
|||||||
.id_table = agp_nvidia_pci_table,
|
.id_table = agp_nvidia_pci_table,
|
||||||
.probe = agp_nvidia_probe,
|
.probe = agp_nvidia_probe,
|
||||||
.remove = agp_nvidia_remove,
|
.remove = agp_nvidia_remove,
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
.suspend = agp_nvidia_suspend,
|
||||||
|
.resume = agp_nvidia_resume,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init agp_nvidia_init(void)
|
static int __init agp_nvidia_init(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user