Ben, do I have your blessing on this one? Adds the video post method of resume for x86 to radeonfb to allow for resuming after S3 acpi suspend. -- Michael Marineau [email protected] Oregon State University
Index: linux-2.6.13-rc7/drivers/video/aty/radeon_pm.c =================================================================== --- linux-2.6.13-rc7.orig/drivers/video/aty/radeon_pm.c +++ linux-2.6.13-rc7/drivers/video/aty/radeon_pm.c @@ -2403,6 +2403,15 @@ static void radeon_reinitialize_QW(struc #endif /* CONFIG_PPC_OF */ +#if defined(CONFIG_ACPI) && defined(CONFIG_X86) +extern void acpi_vgapost (unsigned long slot); + +static void radeon_reinitialize_vgapost(struct radeonfb_info *rinfo) +{ + acpi_vgapost (rinfo->pdev->devfn); +} +#endif + static void radeon_set_suspend(struct radeonfb_info *rinfo, int suspend) { u16 pwr_cmd; @@ -2657,6 +2666,8 @@ int radeonfb_pci_resume(struct pci_dev * */ else if (rinfo->pm_mode & radeon_pm_d2) radeon_set_suspend(rinfo, 0); + if (rinfo->pm_mode & radeon_pm_post && rinfo->reinit_func != NULL) + rinfo->reinit_func(rinfo); rinfo->asleep = 0; } else @@ -2777,6 +2788,13 @@ void radeonfb_pm_init(struct radeonfb_in #endif } #endif /* defined(CONFIG_PM) && defined(CONFIG_PPC_OF) */ + +#if defined(CONFIG_ACPI) && defined(CONFIG_X86) + if (rinfo->is_mobility && rinfo->pm_reg) { + rinfo->reinit_func = radeon_reinitialize_vgapost; + rinfo->pm_mode |= radeon_pm_post; + } +#endif } void radeonfb_pm_exit(struct radeonfb_info *rinfo) Index: linux-2.6.13-rc7/drivers/video/aty/radeonfb.h =================================================================== --- linux-2.6.13-rc7.orig/drivers/video/aty/radeonfb.h +++ linux-2.6.13-rc7/drivers/video/aty/radeonfb.h @@ -271,6 +271,7 @@ enum radeon_pm_mode { radeon_pm_none = 0, /* Nothing supported */ radeon_pm_d2 = 0x00000001, /* Can do D2 state */ radeon_pm_off = 0x00000002, /* Can resume from D3 cold */ + radeon_pm_post = 0x00000004, /* Resume with vgapost */ }; struct radeonfb_info {
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- [PATCH 0/3] Radeon acpi vgapost
- From: Michael Marineau <[email protected]>
- [PATCH 0/3] Radeon acpi vgapost
- Prev by Date: [PATCH 1/3] Generic acpi vgapost
- Next by Date: [PATCH 3/3] Documentation update for radeonfb
- Previous by thread: Re: [PATCH 1/3] Generic acpi vgapost
- Next by thread: [PATCH 3/3] Documentation update for radeonfb
- Index(es):