Skip to contentSkip to conversation

offb.c fix

PATCH New Benjamin Herrenschmidt 1 participant 2 messages Dec 23, 1998

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 offb.c fix

Enclosed is a small patch to offb.c that fixes a problem with some ATI displays in 16
(and potentially 32) bpp. The kluge used for accessing the colormap should be used only for 8 bits, it broke 16 bits on my PowerBook G3 Series.

Geert, could you explain me briefly where I should put the static colormap that bootx gives me ? I mean, in 8 bits, especially for non-ATI display (without the hack), the colormap is fixed and currently set to the logo colors. I plan to set more useful colors but currently offb makes no use of the colormap provided by bootx. Implementing this would allow userland stuffs to know which colors were set by bootx.

I'm not sure of what I should do with this cmap, where I should store it in the fb device structures...

Signature · 2 lines
           E-Mail: <mailto:[email protected]>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>
#1 lore raw

PATCH 1/1 new offb.c fix

Enclosed is the latest version of the patch. I updated more pieces of code here or there so that offb.c can now theorically work in directcolor if the cmap_adr field is present.

However, I still disable this feature and uses the ATI kludge only in 8 bits since there is a difference in the way the color registers must be programmed between different models of ATI chips, and this broke for example 16 bits on PowerBook G3 Series (LT-G)

It still missing code for getting the default palette set by bootx but this is less urgent. This fix was more important since I would like everyone to be able to boot in "no video driver" mode, at least for the installer. That also means that the installer could be packaged with a kernel containing _only_ offb to save space.

Note: Geert, while testing in direct colors, I had a funny problem in 32
bits: everything was fine except the console cursor which had a different color on each virtual console. Since I remember reading about similar bugs in early versions of other fb devices, I guess it's a common mistake. Do you have a clue about what's going on ? It's not very important since we are always in truecolor with this version, but I'm curious ;-)

Signature · 2 lines
           E-Mail: <mailto:[email protected]>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>