From: "Jordan Crouse" <jordan.crouse@amd.com>
To: linux-kernel@vger.kernel.org
Cc: info-linux@ldcmail.amd.com
Subject: [PATCH 2/6] AMD Geode GX/LX Support (Refreshed)
Date: Fri, 28 Oct 2005 09:46:11 -0600 [thread overview]
Message-ID: <20051028154611.GC19854@cosmic.amd.com> (raw)
In-Reply-To: <LYRIS-4270-74122-2005.10.28-09.38.17--jordan.crouse#amd.com@whitestar.amd.com>
This is a simple patch that fixes console APM blanking on the GX/LX
platforms with BIOSes that still support APM.
apm.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
Index: linux-2.6.14/arch/i386/kernel/apm.c
===================================================================
--- linux-2.6.14.orig/arch/i386/kernel/apm.c
+++ linux-2.6.14/arch/i386/kernel/apm.c
@@ -1054,22 +1054,23 @@ static int apm_engage_power_management(u
static int apm_console_blank(int blank)
{
- int error;
- u_short state;
+ int error, i;
+ u_short state;
+ u_short dev[3] = { 0x100, 0x1FF, 0x101 };
state = blank ? APM_STATE_STANDBY : APM_STATE_READY;
- /* Blank the first display device */
- error = set_power_state(0x100, state);
- if ((error != APM_SUCCESS) && (error != APM_NO_ERROR)) {
- /* try to blank them all instead */
- error = set_power_state(0x1ff, state);
- if ((error != APM_SUCCESS) && (error != APM_NO_ERROR))
- /* try to blank device one instead */
- error = set_power_state(0x101, state);
+
+ for (i = 0; i < 3; i++) {
+ error = set_power_state(dev[i], state);
+
+ if ((error == APM_SUCCESS) || (error == APM_NO_ERROR))
+ return 1;
+
+ if (error == APM_NOT_ENGAGED)
+ break;
}
- if ((error == APM_SUCCESS) || (error == APM_NO_ERROR))
- return 1;
- if (error == APM_NOT_ENGAGED) {
+
+ if (error == APM_NOT_ENGAGED && state != APM_STATE_READY) {
static int tried;
int eng_error;
if (tried++ == 0) {
next prev parent reply other threads:[~2005-10-28 15:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <LYRIS-4270-74122-2005.10.28-09.38.17--jordan.crouse#amd.com@whitestar.amd.com>
2005-10-28 15:44 ` [PATCH 1/6] AMD Geode GX/LX Support (Refreshed) Jordan Crouse
2005-10-30 22:39 ` Alan Cox
2005-10-31 15:37 ` Jordan Crouse
2005-11-01 23:10 ` Jordan Crouse
2005-11-01 23:53 ` Alan Cox
2005-10-28 15:46 ` Jordan Crouse [this message]
2005-10-28 15:48 ` [PATCH 3/6] " Jordan Crouse
2005-10-28 15:51 ` [PATCH 4/6] " Jordan Crouse
2005-11-09 23:00 ` Bartlomiej Zolnierkiewicz
2005-10-28 15:53 ` [PATCH 5/6] " Jordan Crouse
2005-10-28 15:55 ` [6/6] " Jordan Crouse
2005-11-09 22:25 ` Bartlomiej Zolnierkiewicz
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=20051028154611.GC19854@cosmic.amd.com \
--to=jordan.crouse@amd.com \
--cc=info-linux@ldcmail.amd.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.