* Patch for stifb=bpp:x:y handling
@ 2004-11-01 22:12 Andy Walker
2004-11-01 22:04 ` [parisc-linux] " Helge Deller
0 siblings, 1 reply; 3+ messages in thread
From: Andy Walker @ 2004-11-01 22:12 UTC (permalink / raw)
To: Matthew Wilcox, parisc-linux; +Cc: Helge Deller
[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]
> ---------------------------- Original Message
---------------------------- > Subject: Re: Penguin color problems on
HCRX-24
> From: "Helge Deller" <deller@gmx.de>
> Date: Mon, November 1, 2004 6:21 pm
> To: "Andy Walker" <ajwalker@broadpark.no>
> Cc: "Johannes Raspe" <j.raspe@t-online.de>
> parisc-linux@lists.parisc-linux.org
> --------------------------------------------------------------------------
>
> On Monday 01 November 2004 15:03, Andy Walker wrote:
>> Hi Helge,
>>
>> The logic is all wrong though IMHO. What it say is:
>>
>> - If I have specified a bpp for *ANY* fb, then default
>> the others to their "capability" - for HCRX24 this is 32.
>>
>> - If I have not specified any bpp's then default to 8bpp
>> on all.
>>
>> e.g. with a Vis-EG on fb0 and an HCRX24's on fb1 and the commandline:
>>
>> stif=bpp:8
>>
>> fb0 comes up 8bpp and fb1 comes up 32bpp, but with no commandline they
>> both come up 8bpp. That's weird.
>>
>> My change made the logic:
>>
>> - Default all fb's to their "capability", except where the
>> user says otherwise for a given fb (you can default an fb
>> by setting 0 e.g. stifb=bpp=0:8).
>
> Ok - please commit your patch, but without this unnecessary part:
> + for (i = 0; i < MAX_STI_ROMS; i++)
> + stifb_bpp_pref[i] = 0;
>
> Rgs,
> Helge
Okay, here's the revised patch. Although the diff says its against
rc1-pa5 it should apply cleanly to rc1-pa8 (my rc1-pa5 has Helge's
second HCRX24 patch applied, making it equivalent to rc1-pa8).
Willy (or some other kind soul), can this get submitted please -
it fixes cruft in the previous options patch.
-Andy
[-- Attachment #2: stifb.c.awa.ud --]
[-- Type: application/octet-stream, Size: 2293 bytes --]
--- linux-2.6.10-rc1-pa5/drivers/video/stifb.c 2004-11-01 22:08:58.201750000 +0100
+++ linux-2.6.10-rc1-pa5.awa/drivers/video/stifb.c 2004-11-01 19:32:43.000000000 +0100
@@ -115,8 +115,7 @@
u32 pseudo_palette[256];
};
-static int __initdata bpp = 8; /* parameter from modprobe */
-static int __initdata stifb_force_bpp[MAX_STI_ROMS];
+static int __initdata stifb_bpp_pref[MAX_STI_ROMS];
/* ------------------- chipset specific functions -------------------------- */
@@ -1158,7 +1157,7 @@
*/
int __init
-stifb_init_fb(struct sti_struct *sti, int force_bpp)
+stifb_init_fb(struct sti_struct *sti, int bpp_pref)
{
struct fb_fix_screeninfo *fix;
struct fb_var_screeninfo *var;
@@ -1261,8 +1260,8 @@
#endif
fb->deviceSpecificConfig = __raw_readl(sti_rom_address);
if (IS_24_DEVICE(fb)) {
- if (force_bpp == 8 || force_bpp == 32)
- bpp = force_bpp;
+ if (bpp_pref == 8 || bpp_pref == 32)
+ bpp = bpp_pref;
else
bpp = 32;
} else
@@ -1412,21 +1411,24 @@
def_sti = sti_get_rom(0);
if (def_sti) {
- for (i = 1; i < MAX_STI_ROMS; i++) {
+ 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)
+ break;
+ if (sti == def_sti) {
+ stifb_init_fb(sti, stifb_bpp_pref[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 (bpp > 0)
- stifb_force_bpp[i] = bpp;
- stifb_init_fb(sti, stifb_force_bpp[i]);
+ if (sti == def_sti)
+ continue;
+ stifb_init_fb(sti, stifb_bpp_pref[i - 1]);
}
return 0;
}
@@ -1441,7 +1443,7 @@
struct sti_struct *sti;
int i;
- for (i = 1; i < MAX_STI_ROMS; i++) {
+ for (i = 1; i <= MAX_STI_ROMS; i++) {
sti = sti_get_rom(i);
if (!sti)
break;
@@ -1473,11 +1475,9 @@
if (strncmp(options, "bpp", 3) == 0) {
options += 3;
for (i = 0; i < MAX_STI_ROMS; i++) {
- if (*options++ == ':') {
- stifb_force_bpp[i] = simple_strtoul(options, &options, 10);
- bpp = -1;
- } else
+ if (*options++ != ':')
break;
+ stifb_bpp_pref[i] = simple_strtoul(options, &options, 10);
}
}
return 0;
^ permalink raw reply [flat|nested] 3+ messages in thread* [parisc-linux] Re: Patch for stifb=bpp:x:y handling
2004-11-01 22:12 Patch for stifb=bpp:x:y handling Andy Walker
@ 2004-11-01 22:04 ` Helge Deller
2004-11-02 9:38 ` Andy Walker
0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2004-11-01 22:04 UTC (permalink / raw)
To: Andy Walker; +Cc: parisc-linux
Hi Andy,
On Monday 01 November 2004 23:12, Andy Walker wrote:
> Okay, here's the revised patch. Although the diff says its against
> rc1-pa5 it should apply cleanly to rc1-pa8 (my rc1-pa5 has Helge's
> second HCRX24 patch applied, making it equivalent to rc1-pa8).
>
> Willy (or some other kind soul), can this get submitted please -
> it fixes cruft in the previous options patch.
Thanks!
I just committed it to CVS and it's now in 2.6.10-rc1-pa9.
Helge
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch for stifb=bpp:x:y handling
2004-11-01 22:04 ` [parisc-linux] " Helge Deller
@ 2004-11-02 9:38 ` Andy Walker
0 siblings, 0 replies; 3+ messages in thread
From: Andy Walker @ 2004-11-02 9:38 UTC (permalink / raw)
To: Helge Deller; +Cc: Andy Walker, parisc-linux
> Hi Andy,
>
> On Monday 01 November 2004 23:12, Andy Walker wrote:
>> Okay, here's the revised patch. Although the diff says its against
>> rc1-pa5 it should apply cleanly to rc1-pa8 (my rc1-pa5 has Helge's
>> second HCRX24 patch applied, making it equivalent to rc1-pa8).
>>
>> Willy (or some other kind soul), can this get submitted please -
>> it fixes cruft in the previous options patch.
>
> Thanks!
> I just committed it to CVS and it's now in 2.6.10-rc1-pa9.
>
> Helge
>
Thank you! Your HCRX24 went in the post first thing this morning.
Hope it gets there unharmed.
-Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-02 9:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-01 22:12 Patch for stifb=bpp:x:y handling Andy Walker
2004-11-01 22:04 ` [parisc-linux] " Helge Deller
2004-11-02 9:38 ` Andy Walker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox