From: "Jordan Crouse" <jordan.crouse@amd.com>
To: "Andrew Morton" <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
info-linux@ldcmail.amd.com
Subject: Re: APM Screen Blanking fix
Date: Thu, 15 Dec 2005 14:56:55 -0700 [thread overview]
Message-ID: <20051215215655.GC14013@cosmic.amd.com> (raw)
In-Reply-To: <LYRIS-4270-4193-2005.12.15-14.45.16--jordan.crouse#amd.com@whitestar.amd.com>
> > 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;
>
> All the above doesn't actually have any functional changes does it?
No, thats actually the fix - Note that the original code only tried to
set the state on device 0x100, and then 0x1FF, and I added 0x101 to the
mix too. I just figured that while I was in there, I would re-do the
code to avoid a tiny if-then-else mess.
> > - if (error == APM_NOT_ENGAGED) {
> > + if (error == APM_NOT_ENGAGED && state != APM_STATE_READY) {
>
> And this is the actual fix/workaround?
Thats just prevents the error message from printing out twice.
I can't remember if it really fixed a problem with our BIOS returning
APM_NOT_ENGAGED when the READY state was set, but it still seems like
a good idea.
Jordan
next prev parent reply other threads:[~2005-12-15 21:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 21:12 [PATCH 1/3] Base support for AMD Geode GX/LX processors Jordan Crouse
2005-12-15 21:14 ` [PATCH 2/3] Geode LX HW RNG Support Jordan Crouse
2005-12-15 21:16 ` [PATCH 3/3] APM Screen Blanking fix Jordan Crouse
2005-12-15 21:45 ` Andrew Morton
[not found] ` <LYRIS-4270-4193-2005.12.15-14.45.16--jordan.crouse#amd.com@whitestar.amd.com>
2005-12-15 21:56 ` Jordan Crouse [this message]
2005-12-15 21:39 ` [PATCH 2/3] Geode LX HW RNG Support Andrew Morton
2005-12-15 21:44 ` Jordan Crouse
2005-12-15 22:06 ` Andrew Morton
2005-12-15 22:07 ` Jeff Garzik
2005-12-15 22:47 ` Andrew Morton
2005-12-15 22:48 ` Deepak Saxena
2005-12-15 21:36 ` [PATCH 1/3] Base support for AMD Geode GX/LX processors Andrew Morton
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=20051215215655.GC14013@cosmic.amd.com \
--to=jordan.crouse@amd.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox