Hi Nico,
I found some time to get back to the topic and actually I am clueless...
What I have tried:
1. Use libgfxinit to initialize graphics in coreboot and display the
bootsplash image in JPG and BMP formats. JPG has the mentioned issue
with colors, while BMP doesn't.
2. Compared the libgfxinit provided framebuffer with the one provided by
VGA option rom and they are identical. Despite that the JPG bootsplash
is displayed differently in coreboot.
3. Used VGA option rom to initialize graphics and display the bootsplash
in coreboot and SeaBIOS as well. What surprised me is that coreboot
displayed the bootsplash incorrectly (the same color issues as with
libgfxinit) while SeaBIOS displayed it with the expected colors.
Now the only thing that comes to my mind are the VGA interrupts, because
SeaBIOS has more complete interrupt services than coreboot. Any comments
or suggestions on that? I think my next step would be to trace all INT
10h and compare the differences and fix it possibly in SeaVGABIOS.
Thanks in advance.
Regards,
--
Michał Żygowski
Firmware Engineer
https://3mdeb.com | @3mdeb_com
On 3/30/20 10:21 AM, Michal Zygowski wrote:
> On 3/29/20 1:54 AM, Nico Huber wrote:
>> On 28.03.20 11:43, Michal Zygowski wrote:
>>> I used the same picture laoding code and the same image. The only thing
>>> that changed was the graphics initialization: VGA ROM vs libgfxinit.
>> If you want to change the encoding (I never tried this) PLANE_CTL bit
>> 20 seems to do the trick. For older generations, 0xe << 26 instead of
>> 0x6 << 26 in PRI_CTL.
>>
>>> I have used SeaBIOS with the same bootsplash image. AFAIK it searches
>>> for a compatible (for given image resolution) VESA mode and displays the
>>> boot splash. The image was a JPG 1024x768 pixels (32bpp I guess).
>> Looks like SeaBIOS hard-codes the RGB encoding deep in the jpeg decoder.
>> The macro PIC_32() in `src/jpeg.c`. Would be better to take the frame-
>> buffer format into account there.
> If the framebuffer holds information about the decoding, I think this
> will be better way of handling the issue. At this point it will be quite
> trivial. IIRC coreboot has the same problem with its jpeg decoder,
> noticed same color pattern BGR. Thanks again.
>
> Michał
>> Nico
>> _______________________________________________
>> coreboot mailing list -- coreboot@coreboot.org
>> To unsubscribe send an email to coreboot-leave@coreboot.org