public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Marineau <marineam@engr.orst.edu>
To: Andrew Morton <akpm@osdl.org>, benh@kernel.crashing.org
Cc: Pavel Machek <pavel@ucw.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] Radeon acpi vgapost
Date: Sat, 27 Aug 2005 18:31:03 -0700	[thread overview]
Message-ID: <431113D7.5040304@engr.orst.edu> (raw)
In-Reply-To: <43111298.80507@engr.orst.edu>


[-- Attachment #1.1: Type: text/plain, Size: 213 bytes --]

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

[-- Attachment #1.2: radeonfb-vgapost.patch --]
[-- Type: text/x-patch, Size: 1823 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

  parent reply	other threads:[~2005-08-28  1:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-28  1:25 [PATCH 0/3] Radeon acpi vgapost Michael Marineau
2005-08-28  1:27 ` [PATCH 1/3] Generic " Michael Marineau
2005-08-28  8:07   ` Pavel Machek
2005-08-28 20:56   ` Jiri Slaby
2005-08-30 10:51   ` Dave Airlie
2005-08-28  1:31 ` Michael Marineau [this message]
2005-08-28  1:34 ` [PATCH 3/3] Documentation update for radeonfb Michael Marineau
2005-08-28  5:12 ` [PATCH 0/3] Radeon acpi vgapost Nishanth Aravamudan
2005-08-28  7:44   ` Michael Marineau
2005-08-28 18:08     ` Nishanth Aravamudan
2005-08-28  6:54 ` Manuel Lauss
2005-08-28  7:31   ` [PATCH 4/3] Radeon acpi vgapost only Rv250 (M9) Michael Marineau
2005-08-28 12:50 ` [PATCH 0/3] Radeon acpi vgapost Matthew Garrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=431113D7.5040304@engr.orst.edu \
    --to=marineam@engr.orst.edu \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox