linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stanley <jpsinthemix@verizon.net>
To: linux-fbdev@vger.kernel.org
Subject: Subject: [PATCH] savagefb: Fix savage4 series video chip detection
Date: Sat, 06 Aug 2011 22:27:21 +0000	[thread overview]
Message-ID: <4E3DBFC9.8090308@verizon.net> (raw)

From: John Stanley <jpsinthemix@verizon.net>

savagefb: Fix typo causing regression in savage4 series video chip detection

Two additional savage4 variants were added, but the S3_SAVAGE4_SERIES 
macro was
incompletely modified, resulting in a false positive detection of a 
savage4 card
regardless of which savage card is actually present. For non-savage4 series
cards, such as a Savage/IX-MV card, this results in garbled video and/or a
hard-hang at boot time. Fix this by changing an '||' to an '&&' in the
S3_SAVAGE4_SERIES macro.

Signed-off-by: John P. Stanley <jpsinthemix@verizon.net>
Reviewed-by: Tormod Volden <debian.tormod@gmail.com>
Cc: stable@kernel.org

---

Specifically, prior to linux-3.0, there were two savage4 variants 
(S3_SAVAGE4
and S3_PROSAVAGE). Hence, S3_SAVAGE4_SERIES was defined as

   S3_SAVAGE4 or S3_PROSAVAGE

In linux-3.0, two additional savage4 variants (S3_TWISTER and 
S3_PROSAVAGEDDR)
have been added. Hence S3_SAVAGE4_SERIES should be defined as

   S3_SAVAGE4, S3_PROSAVAGE, S3_TWISTER, or S3_PROSAVAGEDDR

However, the #define macro for S3_SAVAGE4_SERIES was incompletely 
updated: the
'||' should have been changed to an '&&'.

--- linux-3.0.0/drivers/video/savage/savagefb.h.orig    2011-07-21 
22:17:23.000000000 -0400
+++ linux-3.0.0/drivers/video/savage/savagefb.h 2011-07-31 
05:27:47.314798215 -0400
@@ -55,7 +55,7 @@

  #define S3_SAVAGE3D_SERIES(chip)  ((chip>=S3_SAVAGE3D) && 
(chip<=S3_SAVAGE_MX))

-#define S3_SAVAGE4_SERIES(chip)   ((chip>=S3_SAVAGE4) || 
(chip<=S3_PROSAVAGEDDR))
+#define S3_SAVAGE4_SERIES(chip)   ((chip>=S3_SAVAGE4) && 
(chip<=S3_PROSAVAGEDDR))

  #define S3_SAVAGE_MOBILE_SERIES(chip)  ((chip=S3_SAVAGE_MX) || 
(chip=S3_SUPERSAVAGE))


                 reply	other threads:[~2011-08-06 22:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4E3DBFC9.8090308@verizon.net \
    --to=jpsinthemix@verizon.net \
    --cc=linux-fbdev@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;
as well as URLs for NNTP newsgroup(s).