mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luca <kronos@kronoz.cjb.net>
To: Pavel Machek <pavel@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Suspend to RAM: help with whitelist wanted
Date: Fri, 27 Jan 2006 18:04:06 +0100	[thread overview]
Message-ID: <20060127170406.GA6164@dreamland.darkstar.lan> (raw)
In-Reply-To: <20060126213611.GA1668@elf.ucw.cz>

Pavel Machek <pavel@suse.cz> ha scritto:
> Hi!
> 
> On www.sf.net/projects/suspend , there's s2ram.c program for
> suspending machines. It contains whitelist of known machines, along
> with methods to get their video working (similar to
> Doc*/power/video.txt). Unfortunately, video.txt does not allow me to
> fill in whitelist automatically, so I need your help.
> 
> I do not yet have solution for machines that need vbetool; fortunately
> my machines do not need that :-), and it is pretty complex (includes
> x86 emulator).

What about adding something like:

void s2ram_restore(void) {
        if (needed)
                fork_and_exec(vbetool);
}

machine_table could set a global flag or something. It would be
possibile to us an array to carry the informations about what need to be
done on restore, i.e. something like:

void machine_table() {
        if ((!strcmp(sys_vendor, "ASUS")) {
                if (!strcmp(sys_version, "My notebook")) {
                        machine_known();
                        on_resume[NEED_VBETOOL] = 1;
                        return;
                }
        }
}

void s2ram_restore(void) {
        if (on_resume[NEED_VBETOOL])
                fork_and_exec(vbetool);
        if (on_resume[NEED_RADEON_STUFF])
                radeon_stuff();
        if (on_resume[NEED_FOOBAR])
                black_magic();
}

Ugly? Maybe, but you don't have to fiddle with a x86 emulator.

Luca
-- 
Home: http://kronoz.cjb.net
Windows NT: Designed for the Internet. The Internet: Designed for Unix.

  reply	other threads:[~2006-01-27 17:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26 21:36 Pavel Machek
2006-01-27 17:04 ` Luca [this message]
2006-01-27 23:05   ` Pavel Machek
2006-01-28  1:05     ` Olivier Galibert
2006-01-28  8:12       ` Pavel Machek
2006-01-27 23:22   ` Pavel Machek
2006-01-28  1:31     ` Matthew Garrett
2006-01-28  8:42       ` Pavel Machek
2006-01-29  7:12         ` Matthew Garrett
2006-02-04 21:11           ` Pavel Machek
2006-01-28 15:58     ` Luca
2006-01-28 16:04       ` Jan De Luyck
2006-01-28 17:11         ` Luca
2006-01-28 16:27       ` Pavel Machek
2006-01-28 16:36       ` Pavel Machek
2006-01-29 14:42         ` Luca

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=20060127170406.GA6164@dreamland.darkstar.lan \
    --to=kronos@kronoz.cjb.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.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

all inboxes | Powered by JetHome®