All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jordan Crouse" <jordan.crouse@amd.com>
To: linux-kernel@vger.kernel.org
Cc: info-linux@ldcmail.amd.com
Subject: [PATCH 2/5] AMD Geode GX/LX support V2
Date: Wed, 5 Oct 2005 10:56:01 -0600	[thread overview]
Message-ID: <20051005165601.GB24950@cosmic.amd.com> (raw)
In-Reply-To: <20051005164626.GA25189@cosmic.amd.com>

No changes to this patch from V1, but included to keep from confusing
anybody.

This is a simple patch that fixes console APM blanking on the GX/LX
platforms with BIOSes that still support APM.  Please apply against
linux-2.4.14-rc2-mm2.

Index: linux-2.6.14-rc2-mm2/arch/i386/kernel/apm.c
===================================================================
--- linux-2.6.14-rc2-mm2.orig/arch/i386/kernel/apm.c
+++ linux-2.6.14-rc2-mm2/arch/i386/kernel/apm.c
@@ -1057,22 +1057,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) {


  parent reply	other threads:[~2005-10-05 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-05 16:46 [PATCH 0/5] AMD Geode GX/LX support V2 Jordan Crouse
2005-10-05 16:54 ` [PATCH 1/5] " Jordan Crouse
2005-10-05 16:59   ` Dave Hansen
2005-10-05 18:29   ` Lennart Sorensen
2005-10-05 19:27     ` Jordan Crouse
2005-10-05 19:15       ` Lennart Sorensen
     [not found]       ` <LYRIS-4271-66233-2005.10.05-13.16.03--john.zulauf#amd.com@whitestar.amd.com>
2005-10-05 23:01         ` John Zulauf
2005-10-05 16:56 ` Jordan Crouse [this message]
2005-10-05 16:57 ` [PATCH 3/5] " Jordan Crouse
2005-10-05 17:01 ` [PATCH 4/5] " Jordan Crouse
2005-10-05 17:02 ` [PATCH 5/5] " Jordan Crouse

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=20051005165601.GB24950@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.