From: Helge Deller <deller@gmx.de>
To: "Andy Walker" <ajwalker@broadpark.no>
Cc: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] Re: Penguin color problems on HCRX-24
Date: Mon, 1 Nov 2004 13:45:36 +0100 [thread overview]
Message-ID: <200411011345.36889.deller@gmx.de> (raw)
In-Reply-To: <34548.127.0.0.1.1099261219.squirrel@127.0.0.1>
[-- Attachment #1: Type: text/plain, Size: 900 bytes --]
On Sunday 31 October 2004 23:20, Andy Walker wrote:
> I'd like to submit the patch below to sanitize the stifb=bpp:x:y:z option
> handling. The recent patch (by Stuart Brady?) made fb initialization stop
> early once the default sti fb was initialized, possibly leaving other fb's
> uninitialized.
yes - this is a bug.
> Also the handling of a "global default" bpp was rather wacky,
I liked that idea. No need to initialize all bpps.
> and some array index/bounds problems were fixed.
Correct.
> Is initdata guaranteed to be zero'ed? If so then the loop setting all the
> elements of stifb_bpp_pref to zero can be dropped.
Yes, it's guaranteed.
> The patch has been tested with two fb's, switching console fb either by PDC or using the
> 'sti=' commandline option.
Could you please test the attached patch instead. It is based on your patch, but the "global bpp" is still there.
Helge
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 1210 bytes --]
Index: drivers/video/stifb.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/video/stifb.c,v
retrieving revision 1.13
diff -u -p -r1.13 stifb.c
--- drivers/video/stifb.c 31 Oct 2004 21:07:55 -0000 1.13
+++ drivers/video/stifb.c 1 Nov 2004 12:40:26 -0000
@@ -1411,21 +1411,27 @@ stifb_init(void)
def_sti = sti_get_rom(0);
if (def_sti) {
- for (i = 1; i < MAX_STI_ROMS; i++) {
+ /* initialize default sti before all others */
+ for (i = 1; i <= MAX_STI_ROMS; i++) {
sti = sti_get_rom(i);
- if (sti == def_sti && bpp > 0)
- stifb_force_bpp[i] = bpp;
+ if (sti != def_sti)
+ continue;
+ if (bpp > 0)
+ stifb_force_bpp[i-1] = bpp;
+ stifb_init_fb(def_sti, stifb_force_bpp[i-1]);
+ break;
}
- stifb_init_fb(def_sti, stifb_force_bpp[i]);
}
- for (i = 1; i < MAX_STI_ROMS; i++) {
+ for (i = 1; i <= MAX_STI_ROMS; i++) {
sti = sti_get_rom(i);
- if (!sti || sti==def_sti)
+ if (!sti)
break;
+ if (sti == def_sti)
+ continue;
if (bpp > 0)
- stifb_force_bpp[i] = bpp;
- stifb_init_fb(sti, stifb_force_bpp[i]);
+ stifb_force_bpp[i-1] = bpp;
+ stifb_init_fb(sti, stifb_force_bpp[i-1]);
}
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next prev parent reply other threads:[~2004-11-01 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-29 20:28 Fwd: Re: [parisc-linux] Re: STI crash on B132L with HCRX-24 Johannes Raspe
2004-10-29 23:25 ` Helge Deller
2004-10-31 9:10 ` Johannes Raspe
2004-10-31 12:12 ` Helge Deller
2004-10-31 13:06 ` Johannes Raspe
2004-10-31 13:56 ` Penguin color problems on HCRX-24 (was: [parisc-linux] Re: STI crash on B132L with HCRX-24) Helge Deller
2004-10-31 14:06 ` Johannes Raspe
2004-10-31 22:20 ` Penguin color problems on HCRX-24 Andy Walker
2004-11-01 12:45 ` Helge Deller [this message]
2004-11-01 14:03 ` Andy Walker
2004-11-01 17:21 ` [parisc-linux] " Helge Deller
2004-10-31 23:09 ` Penguin color problems on HCRX-24 (was: [parisc-linux] Re: STI crash on B132L with HCRX-24) Andy Walker
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=200411011345.36889.deller@gmx.de \
--to=deller@gmx.de \
--cc=ajwalker@broadpark.no \
--cc=parisc-linux@lists.parisc-linux.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