Bug #119

Garbled video output in SeaBIOS with native gfx init on Lenovo T520 with Ivy Bridge chip

Added by Julz Buckton about 2 years ago. Updated almost 2 years ago.

Status:NewStart date:05/20/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

coreboot 4.6-166-g365d97e938

Attached are two photos showing the difference between video output with native and vgabios. Unseen in the first photo is also flickering with native init.

Previously when I had a Sandy Bridge chip (i5-2520M) I tried native init and video output was fine, although the text in SeaBIOS was much smaller/sharper than my current working config (vgabios with i5-3320M).

Not only is video output in SeaBIOS messy but Windows 10 fails to boot (I get a non-graphical "loading files" screen with garbled output instead of the standard blue logo with spinning dots).

The .config I attached is for my current vgabios config which I built today after again testing native init, but all options are the same other than having native init disabled and vgabios enabled.

.config (20.3 KB) Julz Buckton, 05/20/2017 12:40 AM

.config (20.9 KB) Julz Buckton, 06/09/2017 05:31 AM

gma-mainboard.ads (315 Bytes) Julz Buckton, 06/09/2017 05:31 AM

cbmem-c.txt Magnifier (128 KB) Julz Buckton, 06/09/2017 05:31 AM

History

#2 Updated by Arthur Heymans almost 2 years ago

I think the C native graphic init for ivy bridge on LVDS output is flawed. An easy fix would be to use libgfxinit, something like https://review.coreboot.org/#/c/19412/ should work on t520.

#3 Updated by Nico Huber almost 2 years ago

I guess the wrong code path is selected for your case (Ivy Bridge processor paired with Cougar Point PCH) in src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c where it says:

    if ((bridge_silicon_revision() & BASE_REV_MASK) == BASE_REV_IVB) {
            return i915lightup_ivy(info, physbase, piobase, mmio, lfb);
    }

This decision should be made by PCH and not by processor, I guess. You can try it with the above lines removed.

#4 Updated by Julz Buckton almost 2 years ago

Nico Huber wrote:

I guess the wrong code path is selected for your case (Ivy Bridge processor paired with Cougar Point PCH) in src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c where it says:

    if ((bridge_silicon_revision() & BASE_REV_MASK) == BASE_REV_IVB) {
            return i915lightup_ivy(info, physbase, piobase, mmio, lfb);
    }

This decision should be made by PCH and not by processor, I guess. You can try it with the above lines removed.

I did another build with the lines removed, and got this result:

http://imgur.com/a/C7Kme

After the wave of light finishes washing over the screen and fades out the machine just reboots.

#5 Updated by Nico Huber almost 2 years ago

Hmmm, looks like I guessed wrong. The code is possibly more broken than I thought. So your best option is to use libgfxinit, like Arthur said. Since it's written in Ada, you'd probably have to rebuild your coreboot toolchain with GNAT installed. Just install gnat (package sometimes called gcc-ada) in the same version as gcc, run make crossgcc-clean and make crossgcc-i386. Then apply the same changes as done in https://review.coreboot.org/#/c/19412/ for the X230 to the T520 and select "Use libgfxinit..." below the native gfx init (NGI) option. Just tell us if you need help with the patching.

Btw. Windows is currently not supported along with NGI. It needs additional help by a so called Video BIOS Table (VBT). Work to add that VBT to coreboot in a cross-platform way is in progress.

#6 Updated by Julz Buckton almost 2 years ago

Nico Huber wrote:

Hmmm, looks like I guessed wrong. The code is possibly more broken than I thought. So your best option is to use libgfxinit, like Arthur said. Since it's written in Ada, you'd probably have to rebuild your coreboot toolchain with GNAT installed. Just install gnat (package sometimes called gcc-ada) in the same version as gcc, run make crossgcc-clean and make crossgcc-i386. Then apply the same changes as done in https://review.coreboot.org/#/c/19412/ for the X230 to the T520 and select "Use libgfxinit..." below the native gfx init (NGI) option. Just tell us if you need help with the patching.

Btw. Windows is currently not supported along with NGI. It needs additional help by a so called Video BIOS Table (VBT). Work to add that VBT to coreboot in a cross-platform way is in progress.

I made those changes and built coreboot with libgfxinit. The result is no power on display (not just a blank screen, the backlight never turns on at all). I tried with both VGA text mode and linear framebuffer under the display settings.

Could it be that libgfxinit is not compatible with my display panel? It is B156HW01 V.7.

#7 Updated by Nico Huber almost 2 years ago

It's unlikely that the panel is incompatible. Though if both code paths fail, maybe there is a problem with its EDID.

Please attach your .config, src/mainboard/lenovo/t520/gma-mainboard.ad* and, if possible, a coreboot log taken with CONFIG_DEBUG_ADA_CODE=y and loglevel >= Debug.

#8 Updated by Julz Buckton almost 2 years ago

Nico Huber wrote:

It's unlikely that the panel is incompatible. Though if both code paths fail, maybe there is a problem with its EDID.

Please attach your .config, src/mainboard/lenovo/t520/gma-mainboard.ad* and, if possible, a coreboot log taken with CONFIG_DEBUG_ADA_CODE=y and loglevel >= Debug.

By 'coreboot log' I assume you meant the output of ./cbmem -c, which I fetched after returning to a working config (that still had CONFIG_DEBUG_ADA_CODE=y), not sure if it's still useful in that case. But it was not possible for me to fetch it while actually using libgfxinit of course, as the machine wasn't really booting.

Also available in: Atom PDF