diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-04-16 18:24:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:24:19 -0400 |
commit | 0c541b4406a68e74d94ddb667c69d9e03bce8681 (patch) | |
tree | 869506b6c3f7c00ac13f2aa80c35fb5e229cc329 /include/asm-ppc/pmac_feature.h | |
parent | 7a648b9ec09f32606fe0f27fb9d095311cf968ca (diff) |
[PATCH] ppc32: Fix AGP and sleep again
My previous patch that added sleep support for uninorth-agp and some AGP
"off" stuff in radeonfb and aty128fb is breaking some configs. More
specifically, it has problems with rage128 setups since the DRI code for
these in X doesn't properly re-enable AGP on wakeup or console switch
(unlike the radeon DRM).
This patch fixes the problem for pmac once for all by using a different
approach. The AGP driver "registers" special suspend/resume callbacks with
some arch code that the fbdev's can later on call to suspend and resume
AGP, making sure it's resumed back in the same state it was when suspended.
This is platform specific for now. It would be too complicated to try to
do a generic implementation of this at this point due to all sort of weird
things going on with AGP on other architectures. We'll re-work that whole
problem cleanly once we finally merge fbdev's and DRI.
In the meantime, please apply this patch which brings back some r128 based
laptops into working condition as far as system sleep is concerned.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc/pmac_feature.h')
-rw-r--r-- | include/asm-ppc/pmac_feature.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h index 98c206d8c024..639b690ce6f7 100644 --- a/include/asm-ppc/pmac_feature.h +++ b/include/asm-ppc/pmac_feature.h | |||
@@ -305,6 +305,17 @@ extern void pmac_call_early_video_resume(void); | |||
305 | 305 | ||
306 | #define PMAC_FTR_DEF(x) ((_MACH_Pmac << 16) | (x)) | 306 | #define PMAC_FTR_DEF(x) ((_MACH_Pmac << 16) | (x)) |
307 | 307 | ||
308 | /* The AGP driver registers itself here */ | ||
309 | extern void pmac_register_agp_pm(struct pci_dev *bridge, | ||
310 | int (*suspend)(struct pci_dev *bridge), | ||
311 | int (*resume)(struct pci_dev *bridge)); | ||
312 | |||
313 | /* Those are meant to be used by video drivers to deal with AGP | ||
314 | * suspend resume properly | ||
315 | */ | ||
316 | extern void pmac_suspend_agp_for_card(struct pci_dev *dev); | ||
317 | extern void pmac_resume_agp_for_card(struct pci_dev *dev); | ||
318 | |||
308 | 319 | ||
309 | /* | 320 | /* |
310 | * The part below is for use by macio_asic.c only, do not rely | 321 | * The part below is for use by macio_asic.c only, do not rely |