From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux Frame Buffer Device Development
<linux-fbdev-devel@lists.sourceforge.net>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
penguinppc-team@lists.penguinppc.org
Subject: Re: [Linux-fbdev-devel] Generic VESA framebuffer driver and Video card BOOT?
Date: Fri, 15 Oct 2004 11:29:02 -0700 [thread overview]
Message-ID: <20041015112902.A12631@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.GSO.4.61.0410151437050.10040@waterleaf.sonytel.be>; from geert@linux-m68k.org on Fri, Oct 15, 2004 at 02:38:01PM +0200
On Fri, Oct 15, 2004 at 02:38:01PM +0200, Geert Uytterhoeven wrote:
> On Fri, 15 Oct 2004, Gerd Knorr wrote:
> > Have you talked to the powermanagement guys btw.? One of the major
> > issues with suspend-to-ram is to get the graphics card back online,
> > and SNAPBoot might help to fix this too. I'm not sure a userspace
> > solution would work for *that* through.
>
> Why not? Of course you won't get any output before the graphics card has been
> re-initialized to a sane and usable state...
>
True. I do it on my Dell 600m (Radeon 9000M) using usermodehelper and it works just fine. It works both with VGA and X. I need to split up the thaw_processes into two stages though. It may not work with fb as fb driver resumes earlier. I use the patch below for the kernel and a userlevel x86 emulator.
I have to say though, it will help if we have a such an emulator in the kernel.
Thanks,
Venki
--- linux-2.6.9-rc2/kernel/power/main.c.org 2004-09-12 18:23:00.671546520 -0700
+++ linux-2.6.9-rc2/kernel/power/main.c 2004-09-12 18:22:27.548581976 -0700
@@ -106,12 +106,28 @@ static int suspend_enter(u32 state)
* console that we've allocated.
*/
+int vgapost_usermode(void)
+{
+ char *argv[3] = {NULL, NULL, NULL};
+ char *envp[3] = {NULL, NULL, NULL};
+
+ argv[0] = "/root/emu/video_post";
+
+ /* minimal command environment */
+ envp[0] = "HOME=/";
+ envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
+
+ return call_usermodehelper(argv[0], argv, envp, 1);
+}
+
static void suspend_finish(u32 state)
{
int retval;
device_resume();
if (pm_ops && pm_ops->finish)
pm_ops->finish(state);
+ thaw_processes_kernel();
+ retval = vgapost_usermode();
thaw_processes();
pm_restore_console();
--- linux-2.6.9-rc2/kernel/power/process.c.org 2004-09-12 18:21:48.266553752 -0700
+++ linux-2.6.9-rc2/kernel/power/process.c 2004-09-12 18:22:06.851728376 -0700
@@ -97,6 +97,29 @@ int freeze_processes(void)
return 0;
}
+void thaw_processes_kernel(void)
+{
+ struct task_struct *g, *p;
+
+ printk( "Restarting kernel tasks..." );
+ read_lock(&tasklist_lock);
+ do_each_thread(g, p) {
+ if (!freezeable(p))
+ continue;
+ if (p->parent->pid != 1)
+ continue;
+ if (p->flags & PF_FROZEN) {
+ p->flags &= ~PF_FROZEN;
+ wake_up_process(p);
+ } else
+ printk(KERN_INFO " Strange, %s not stopped\n", p->comm );
+ } while_each_thread(g, p);
+
+ read_unlock(&tasklist_lock);
+ schedule();
+ printk( " done\n" );
+}
+
void thaw_processes(void)
{
struct task_struct *g, *p;
@@ -106,6 +129,8 @@ void thaw_processes(void)
do_each_thread(g, p) {
if (!freezeable(p))
continue;
+ if (p->parent->pid == 1)
+ continue;
if (p->flags & PF_FROZEN) {
p->flags &= ~PF_FROZEN;
wake_up_process(p);
next prev parent reply other threads:[~2004-10-15 18:29 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 19:02 Generic VESA framebuffer driver and Video card BOOT? Kendall Bennett
2004-10-14 19:59 ` Zachary Smith
2004-10-15 23:36 ` Ian Romanick
2004-10-14 20:48 ` Zachary Smith
2004-10-15 18:05 ` Kendall Bennett
2004-10-15 18:55 ` Zachary Smith
2004-10-15 19:18 ` Geert Uytterhoeven
2004-10-15 22:22 ` Kendall Bennett
2004-10-15 0:27 ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-10-15 18:36 ` Kendall Bennett
2004-10-15 21:51 ` Antonino A. Daplas
2004-10-15 23:20 ` Jon Smirl
2004-10-15 23:51 ` Kendall Bennett
2004-10-15 23:58 ` Jon Smirl
2004-10-19 21:15 ` Pavel Machek
2004-10-16 1:50 ` Antonino A. Daplas
2004-10-16 2:03 ` Jon Smirl
2004-10-18 19:34 ` Kendall Bennett
2004-10-18 20:34 ` Richard Smith
2004-10-18 20:47 ` [Linux-fbdev-devel] " Kendall Bennett
2004-10-18 21:04 ` Richard Smith
2004-10-18 21:16 ` Jon Smirl
2004-10-18 22:34 ` Richard Smith
2004-10-18 23:28 ` [Linux-fbdev-devel] " Jon Smirl
2004-10-19 0:18 ` Richard Smith
2004-10-19 0:55 ` [Linux-fbdev-devel] " Kendall Bennett
2004-10-19 1:39 ` Richard Smith
2004-10-19 17:54 ` Kendall Bennett
2004-10-19 21:48 ` [Linux-fbdev-devel] " Pavel Machek
2004-10-20 17:01 ` Kendall Bennett
2004-10-20 19:08 ` [Linux-fbdev-devel] " Pavel Machek
2004-10-21 19:36 ` Kendall Bennett
2004-10-19 21:42 ` [Linux-fbdev-devel] " Pavel Machek
2004-10-15 12:05 ` Gerd Knorr
2004-10-15 12:38 ` Geert Uytterhoeven
2004-10-15 12:45 ` Alan Cox
2004-10-19 21:54 ` Pavel Machek
2004-10-15 13:13 ` Gerd Knorr
2004-10-17 12:07 ` Martin Waitz
2004-10-18 8:36 ` Gerd Knorr
2004-10-18 11:39 ` [Linux-fbdev-devel] " Martin Waitz
2004-10-18 12:10 ` Gerd Knorr
2004-10-18 20:21 ` [Linux-fbdev-devel] " Helge Hafting
2004-10-18 20:42 ` Oliver Neukum
2004-10-19 16:57 ` Martin Waitz
2004-10-15 18:29 ` Venkatesh Pallipadi [this message]
2004-10-16 9:01 ` Nigel Cunningham
2004-10-15 18:36 ` [Linux-fbdev-devel] " Kendall Bennett
2004-10-15 13:48 ` Helge Hafting
2004-10-15 18:36 ` Kendall Bennett
2004-10-15 21:44 ` Helge Hafting
2004-10-15 22:12 ` Kendall Bennett
2004-10-16 0:41 ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-10-26 11:14 ` Paulo Marques
2004-10-27 1:58 ` Kendall Bennett
2004-10-27 11:11 ` Paulo Marques
2004-10-27 19:52 ` Kendall Bennett
2004-10-15 21:51 ` Antonino A. Daplas
2004-10-16 17:44 ` Jon Smirl
2004-10-18 19:34 ` Kendall Bennett
2004-10-19 21:00 ` Pavel Machek
2004-10-19 21:11 ` Pavel Machek
2004-10-20 17:01 ` Kendall Bennett
2004-10-20 17:31 ` [Linux-fbdev-devel] " Pavel Machek
2004-10-20 18:44 ` Kendall Bennett
2004-10-20 19:10 ` [Linux-fbdev-devel] " Pavel Machek
2004-10-21 19:36 ` Kendall Bennett
2004-10-21 20:47 ` [Linux-fbdev-devel] " Richard Smith
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=20041015112902.A12631@unix-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=geert@linux-m68k.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=penguinppc-team@lists.penguinppc.org \
/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;
as well as URLs for NNTP newsgroup(s).