From: Andrew Morton Cc: Andreas Mohr Cc: Dave Jones Signed-off-by: Andrew Morton --- drivers/char/agp/intel-agp.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff -puN drivers/char/agp/intel-agp.c~working-3d-dri-intel-agpko-resume-for-i815-chip-tidy drivers/char/agp/intel-agp.c --- a/drivers/char/agp/intel-agp.c~working-3d-dri-intel-agpko-resume-for-i815-chip-tidy +++ a/drivers/char/agp/intel-agp.c @@ -2030,8 +2030,10 @@ static int agp_i815_remember_state(struc * to be able to successfully restore X11 when AGP 3D is enabled * (register values given are after resume vs. before suspend): * - * I815_GMCHCFG (0x50; we need to set bit 1 (Aperture Access Global Enable) of I815_APCONT (0x51), - * thus use I815_GMCHCFG (0x50) as 32bit base register); 0x4fdd0040 instead of 0x4fdd0240 + * I815_GMCHCFG (0x50; we need to set bit 1 (Aperture Access Global + * Enable) of I815_APCONT (0x51), + * thus use I815_GMCHCFG (0x50) as 32bit base register); + * 0x4fdd0040 instead of 0x4fdd0240 * ??? (0x80); 0x07ce1cde instead of 0x07cb94de * I815_SM_RCOMP (0x98); 0x80648064 instead of 0x80548054 * I815_SM (0x9c); 0x00c48405 instead of 0x04848405 @@ -2039,7 +2041,8 @@ static int agp_i815_remember_state(struc * INTEL_AGPCTRL (0xb0); 0x00000000 instead of 0x00000080 * INTEL_APSIZE (0xb4); * INTEL_ATTBASE (0xb8); 0x00000000 instead of 0x024b0000 - * I815_ERRSTS?? (0xc8; undocumented for i815, see above); 0x00000000 instead of 0x00000800 + * I815_ERRSTS?? (0xc8; undocumented for i815, see above); + * 0x00000000 instead of 0x00000800 * ??? (0xe8); 0x1c700000 instead of 0x18500000 * * Other machines/chipsets/BIOS versions may require @@ -2062,12 +2065,12 @@ static int agp_i815_remember_state(struc if (restore) { u32 val; - for (p = i815_saved_regs; (p->reg != 0); p++) - { + for (p = i815_saved_regs; (p->reg != 0); p++) { pci_read_config_dword(pdev, p->reg, &val); if (val != p->value) { - printk(KERN_DEBUG "AGP: Writing back config space on " - "device %s at offset %x (was %x, writing %x)\n", + printk(KERN_DEBUG "AGP: Writing back config " + "space on device %s at offset %x (was " + "%x, writing %x)\n", pci_name(pdev), p->reg, val, p->value); pci_write_config_dword(pdev, p->reg, @@ -2096,8 +2099,8 @@ static int agp_i815_remember_state(struc * should be cleaned up, probably by implementing a generic Linux * PCI function to save/restore extended PCI config space * by supplying a register array or so... - * At this point, it would also be nice to clean up the _suspend()/_resume() functions - * to use some non-ugly and nicely generic restore mechanism. + * At this point, it would also be nice to clean up the _suspend()/_resume() + * functions to use some non-ugly and nicely generic restore mechanism. */ #define DEBUG_AGP_PM 0 _