lkml.org 
[lkml]   [2005]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/3] Radeon acpi vgapost
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
marineam@engr.orst.edu
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 {[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-08-28 03:33    [W:0.149 / U:0.232 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site