* [PATCH] fbgen & multiple RGBA
@ 2001-06-22 14:08 Romain Dolbeau
2001-06-22 16:31 ` James Simmons
2001-06-26 8:32 ` [PATCH] fbgen & multiple RGBA (w/ memcmp) Romain Dolbeau
0 siblings, 2 replies; 7+ messages in thread
From: Romain Dolbeau @ 2001-06-22 14:08 UTC (permalink / raw)
To: linux kernel, linux fbdev
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
Hello,
the attached patch fix a problem with fbgen when changing the
RGBA components but not the depth ; fbgen would not change
the colormap in this case, where it should.
--
romain
[-- Attachment #2: fbgen.patch.gz --]
[-- Type: application/gzip, Size: 532 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fbgen & multiple RGBA
2001-06-22 14:08 [PATCH] fbgen & multiple RGBA Romain Dolbeau
@ 2001-06-22 16:31 ` James Simmons
2001-06-25 8:14 ` [Linux-fbdev-devel] " Romain Dolbeau
2001-06-26 8:32 ` [PATCH] fbgen & multiple RGBA (w/ memcmp) Romain Dolbeau
1 sibling, 1 reply; 7+ messages in thread
From: James Simmons @ 2001-06-22 16:31 UTC (permalink / raw)
To: Romain Dolbeau; +Cc: linux kernel, linux fbdev
> the attached patch fix a problem with fbgen when changing the
> RGBA components but not the depth ; fbgen would not change
> the colormap in this case, where it should.
It would be much easier to use a memcmp.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-fbdev-devel] Re: [PATCH] fbgen & multiple RGBA
2001-06-22 16:31 ` James Simmons
@ 2001-06-25 8:14 ` Romain Dolbeau
2001-06-26 20:26 ` James Simmons
0 siblings, 1 reply; 7+ messages in thread
From: Romain Dolbeau @ 2001-06-25 8:14 UTC (permalink / raw)
To: linux fbdev; +Cc: James Simmons, Romain Dolbeau, linux kernel
James Simmons wrote:
>
> > the attached patch fix a problem with fbgen when changing the
> > RGBA components but not the depth ; fbgen would not change
> > the colormap in this case, where it should.
>
> It would be much easier to use a memcmp.
For the color component, yes, but you can't use a memcmp
on the 'fb_var_screeninfo', as some member of the struct
are irrelevant to colormap switching (you don't want
to reinstall the colormap if only the refresh rate changed,
for instance).
--
DOLBEAU Romain | l'histoire est entierement vraie, puisque
ENS Cachan / Ker Lann | je l'ai imaginee d'un bout a l'autre
dolbeau@irisa.fr | -- Boris Vian
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] fbgen & multiple RGBA (w/ memcmp)
2001-06-22 14:08 [PATCH] fbgen & multiple RGBA Romain Dolbeau
2001-06-22 16:31 ` James Simmons
@ 2001-06-26 8:32 ` Romain Dolbeau
1 sibling, 0 replies; 7+ messages in thread
From: Romain Dolbeau @ 2001-06-26 8:32 UTC (permalink / raw)
To: linux fbdev; +Cc: linux kernel
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
Romain Dolbeau wrote:
> the attached patch fix a problem with fbgen when changing the
> RGBA components but not the depth ; fbgen would not change
> the colormap in this case, where it should.
This is the same patch but using memcmp() on the 3 color
components.
--
DOLBEAU Romain | l'histoire est entierement vraie, puisque
ENS Cachan / Ker Lann | je l'ai imaginee d'un bout a l'autre
dolbeau@irisa.fr | -- Boris Vian
[-- Attachment #2: fbgen.patch.gz --]
[-- Type: application/x-gzip, Size: 525 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-fbdev-devel] Re: [PATCH] fbgen & multiple RGBA
2001-06-25 8:14 ` [Linux-fbdev-devel] " Romain Dolbeau
@ 2001-06-26 20:26 ` James Simmons
2001-06-26 21:17 ` Romain Dolbeau
0 siblings, 1 reply; 7+ messages in thread
From: James Simmons @ 2001-06-26 20:26 UTC (permalink / raw)
To: Romain Dolbeau; +Cc: linux fbdev, Romain Dolbeau, linux kernel
> For the color component, yes, but you can't use a memcmp
> on the 'fb_var_screeninfo', as some member of the struct
> are irrelevant to colormap switching (you don't want
> to reinstall the colormap if only the refresh rate changed,
> for instance).
But it does. If you look at the console code it always calls set_palette
which in turn calls fbcon_set_palette which in turn calls fb_set_cmap.
This happens every time you VC switch. A few driver writers noticed this
and don't bother with calling fb_Set_var in con_switch but instead a few
pieces of the function. But because of the way the current console system
is designed the colormap will always be set on VC switches.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-fbdev-devel] Re: [PATCH] fbgen & multiple RGBA
2001-06-26 20:26 ` James Simmons
@ 2001-06-26 21:17 ` Romain Dolbeau
2001-06-26 21:28 ` Romain Dolbeau
0 siblings, 1 reply; 7+ messages in thread
From: Romain Dolbeau @ 2001-06-26 21:17 UTC (permalink / raw)
To: James Simmons; +Cc: Linux-fbdev-devel, linux-kernel
> This happens every time you VC switch.
[snip]
> But because of the way the current console system
> is designed the colormap will always be set on VC switches.
The fix wasn't intended for VC switch, but for any change of
fb_var_screeninfo parameter. Those can happen without VC switching,
that's exactly what 'fbset' is for.
If on your console you do a 'fbset -depth 16 -rgba 5,6,5,0' followed by
a 'fbset -depth 16 -rgba 5,5,5,1' [1], any driver using fbdev will end
up with a crazy colormap because it hasn't been reinstalled after the
RGBA change.
Hence the need for the fix.
[1] yes, in fbset, "-depth" really mean "-bpp" ...
--
DOLBEAU Romain |
ENS Cachan / Ker Lann | l'histoire est entierement vraie, puisque
Thesard IRISA / CAPS | je l'ai imaginee d'un bout a l'autre
dolbeaur@club-internet.fr | -- Boris Vian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-fbdev-devel] Re: [PATCH] fbgen & multiple RGBA
2001-06-26 21:17 ` Romain Dolbeau
@ 2001-06-26 21:28 ` Romain Dolbeau
0 siblings, 0 replies; 7+ messages in thread
From: Romain Dolbeau @ 2001-06-26 21:28 UTC (permalink / raw)
To: jsimmons; +Cc: Linux-fbdev-devel, linux-kernel
Romain Dolbeau wrote:
> If on your console you do a 'fbset -depth 16 -rgba 5,6,5,0' followed by
> a 'fbset -depth 16 -rgba 5,5,5,1' [1], any driver using fbdev will end
^^^^^^^^
That should have been 'fbgen', sorry for the momentary lapse of reason
and the waste of bandwith.
> up with a crazy colormap because it hasn't been reinstalled after the
> RGBA change.
--
DOLBEAU Romain | The Gods made Heavy Metal
ENS Cachan / Ker Lann | and it's never gonna die
Thesard IRISA / CAPS | -- Manowar
dolbeaur@club-internet.fr | in 'The Gods made Heavy Metal'
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-06-26 21:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-22 14:08 [PATCH] fbgen & multiple RGBA Romain Dolbeau
2001-06-22 16:31 ` James Simmons
2001-06-25 8:14 ` [Linux-fbdev-devel] " Romain Dolbeau
2001-06-26 20:26 ` James Simmons
2001-06-26 21:17 ` Romain Dolbeau
2001-06-26 21:28 ` Romain Dolbeau
2001-06-26 8:32 ` [PATCH] fbgen & multiple RGBA (w/ memcmp) Romain Dolbeau
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).