Hello All! This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW. The coreboot source was created using autoport. This same project boots to the OS using regular external DVI display. The panel doesn't have i2c ROM (DDC). Using the LCD LVDS panel shows the following in the screen and halts with post code 75 "Intel(R)Sandybridge Mobile PCI Accelerated SVGA BIOS"
"DECOMPILATION OR DISASSEMBLY PROHIBITED"
On the serial console shows the following: ---------------------------------------------------------------------------------------- CBFS: 'Master Header Locator' located CBFS at [610200:800000)
CBFS: Locating 'pci8086,0116.rom'
CBFS: Found @ offset 2d440 size 10000
In CBFS, ROM address for PCI: 00:02.0 = ffe3d688
Copying VGA ROM Image from ffe3d688 to 0xc0000, 0xf200 bytes
Calling Option ROM...
intel_vga_int15_handler: AX=5f34 BX=c000 CX=0002 DX=03da
intel_vga_int15_handler: AX=5f52 BX=0000 CX=0002 DX=0008
Unknown INT15 function 5f52!
int15 call returned error.
intel_vga_int15_handler: AX=5f14 BX=078f CX=000a DX=fde8
Unknown INT15 function 5f14!
int15 call returned error.
intel_vga_int15_handler: AX=5f35 BX=c000 CX=0002 DX=03da
intel_vga_int15_handler: AX=5f70 BX=c003 CX=0002 DX=0303
... Option ROM returned.
VBE: Getting information about VESA mode 4116
VBE: Function call failed!
Error: In vbe_get_mode_info function -------------------------------------------------------------------------- Attached is the full serial debug dump.
Any advise on what to do next? Any additional information do I need to provide?
Thank you, any help will be very much appreciated. JT
Hello Jorge,
On 02.12.19 18:02, Jose Trujillo via coreboot wrote:
Hello All! This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW.
if you ever want to get open-source gfx init running instead, let me know. It would only need a few more lines to force a specific mode with libgfxinit, maybe that is enough. And as you run the VBIOS ROM within coreboot, you are probably not interested in a resident VBIOS, are you?
VBE: Getting information about VESA mode 4116
What mode is this 4116? Are you sure, you need this specific mode? Are you sure, your panel supports it? Sometimes, you need to specify a VBIOS (maybe even VBT) specific code to use the panel's native resolution.
VBE: Function call failed!
Error: In vbe_get_mode_info function
I don't think coreboot should halt here. Problems with the graphics are non-fatal.
Nico
HI Jorge, Some inputs inline.
Thanks, Subrata
-----Original Message----- From: Nico Huber [mailto:nico.h@gmx.de] Sent: Tuesday, December 3, 2019 3:34 AM To: Jose Trujillo ce.autom@protonmail.com; coreboot coreboot@coreboot.org Cc: Banik, Subrata subrata.banik@intel.com; Patrick Georgi pgeorgi@google.com Subject: Re: [coreboot] Sandybridge-M help request in setting up LVDS panel.
Hello Jorge,
On 02.12.19 18:02, Jose Trujillo via coreboot wrote:
Hello All! This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW.
if you ever want to get open-source gfx init running instead, let me know. It would only need a few more lines to force a specific mode with libgfxinit, maybe that is enough. And as you run the VBIOS ROM within coreboot, you are probably not interested in a resident VBIOS, are you?
VBE: Getting information about VESA mode 4116
What mode is this 4116? Are you sure, you need this specific mode? Are you sure, your panel supports it? Sometimes, you need to specify a VBIOS (maybe even VBT) specific code to use the panel's native resolution.
[Subrata] VBE: resolution for 4116: 1024x768@16. Its depends on your panel support and VBIOS support.
VBE: Function call failed!
Error: In vbe_get_mode_info function
I don't think coreboot should halt here. Problems with the graphics are non-fatal.
[Subrata] Please have a look at https://review.coreboot.org/c/coreboot/+/34284. What I found was sometime Coreboot tries to fixed a mode which might not be supported by that VBIOS hence we might see issue during payload and further because it would try to map display to 0 resolution if mode set is not correct. Hence I had listed the supported VESA mode in debug print. If you could try to use supported one, it might work.
Nico
Hello Friends
Hello All! This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW.
if you ever want to get open-source gfx init running instead, let me know. It would only need a few more lines to force a specific mode with libgfxinit, maybe that is enough. And as you run the VBIOS ROM within coreboot, you are probably not interested in a resident VBIOS, are you?
[JT]->[Nico] I would prefer to do it with just libgfxinit but I don't have a remote idea in how to initialize the LVDS panel. [JT]->[Nico] With a desktop monitor libgfxinit just work in this system but not a sign of activity on the panel. [JT]->[Nico] I would like to know how to initialize the panel with just coreboot, so, please show me how. [JT]->[Subrata] But also would like to know how to do it the right way with the blob.
VBE: Getting information about VESA mode 4116
What mode is this 4116? Are you sure, you need this specific mode? Are you sure, your panel supports it? Sometimes, you need to specify a VBIOS (maybe even VBT) specific code to use the panel's native resolution.
[Subrata] VBE: resolution for 4116: 1024x768@16. Its depends on your panel support and VBIOS support.
[JT] I just set at menuconfig 1024x768 1-5-5-5 and I have not idea why is reporting 4116-16 bit the intended is 18 bit. [JT]->[Subrata] Do I need to configure something else or create some code for this?
VBE: Function call failed! Error: In vbe_get_mode_info function
I don't think coreboot should halt here. Problems with the graphics are non-fatal.
[Subrata] Please have a look at https://review.coreboot.org/c/coreboot/+/34284. What I found was sometime Coreboot tries to fixed a mode which might not be supported by that VBIOS hence we might see issue during payload and further because it would try to map display to 0 resolution if mode set is not correct. Hence I had listed the supported VESA mode in debug print. If you could try to use supported one, it might work.
[JT] Halts with a "die" function because anyway if is not halted it will be halted by Tianocore with division by zero. [JT]->[Subrata] The LVDS panel supports 1024x768 18 and 24 bit but the LVDS cable only can transfer 18 bits. [JT]->[Subrata] The original FW support those LVDS resolutions too and I suppose VBIOS too. [JT]->[Subrata] At 1024x768 1-5-5-5 is the only setting that shows signs of panel initialization and shows output on the panel but halts. [JT] The other 2 1024x768 variants shows vertical stripes on the panel and gets halted anyway. [JT] This system doesn't dump the list of supported VESA modes even if I comment the "die" function.
Thank you, Jose Trujillo.
HI Jose,
Some input inline.
Thanks, Subrata
-----Original Message----- From: Jose Trujillo [mailto:ce.autom@protonmail.com] Sent: Tuesday, December 3, 2019 7:44 PM To: Banik, Subrata subrata.banik@intel.com Cc: Nico Huber nico.h@gmx.de; coreboot coreboot@coreboot.org; Patrick Georgi pgeorgi@google.com Subject: RE: [coreboot] Sandybridge-M help request in setting up LVDS panel.
Hello Friends
Hello All! This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW.
if you ever want to get open-source gfx init running instead, let me know. It would only need a few more lines to force a specific mode with libgfxinit, maybe that is enough. And as you run the VBIOS ROM within coreboot, you are probably not interested in a resident VBIOS, are you?
[JT]->[Nico] I would prefer to do it with just libgfxinit but I don't have a remote idea in how to initialize the LVDS panel. [JT]->[Nico] With a desktop monitor libgfxinit just work in this system but not a sign of activity on the panel. [JT]->[Nico] I would like to know how to initialize the panel with just coreboot, so, please show me how. [JT]->[Subrata] But also would like to know how to do it the right way with the blob.
VBE: Getting information about VESA mode 4116
What mode is this 4116? Are you sure, you need this specific mode? Are you sure, your panel supports it? Sometimes, you need to specify a VBIOS (maybe even VBT) specific code to use the panel's native resolution.
[Subrata] VBE: resolution for 4116: 1024x768@16. Its depends on your panel support and VBIOS support.
[JT] I just set at menuconfig 1024x768 1-5-5-5 and I have not idea why is reporting 4116-16 bit the intended is 18 bit. [JT]->[Subrata] Do I need to configure something else or create some code for this?
[Subrata] By default I could see CB was picking 0x118 which was causing issue for me. Later based on die msg, I have set below config to make it work on my platform + DGPU
# # Display # CONFIG_FRAMEBUFFER_SET_VESA_MODE=y CONFIG_FRAMEBUFFER_VESA_MODE_116=y CONFIG_FRAMEBUFFER_VESA_MODE=0x116
VBE: Function call failed! Error: In vbe_get_mode_info function
I don't think coreboot should halt here. Problems with the graphics are non-fatal.
[Subrata] Please have a look at https://review.coreboot.org/c/coreboot/+/34284. What I found was sometime Coreboot tries to fixed a mode which might not be supported by that VBIOS hence we might see issue during payload and further because it would try to map display to 0 resolution if mode set is not correct. Hence I had listed the supported VESA mode in debug print. If you could try to use supported one, it might work.
[JT] Halts with a "die" function because anyway if is not halted it will be halted by Tianocore with division by zero. [JT]->[Subrata] The LVDS panel supports 1024x768 18 and 24 bit but the LVDS cable only can transfer 18 bits. [JT]->[Subrata] The original FW support those LVDS resolutions too and I suppose VBIOS too. [JT]->[Subrata] At 1024x768 1-5-5-5 is the only setting that shows signs of panel initialization and shows output on the panel but halts. [JT] The other 2 1024x768 variants shows vertical stripes on the panel and gets halted anyway. [JT] This system doesn't dump the list of supported VESA modes even if I comment the "die" function.
Thank you, Jose Trujillo.
Hi Jorge,
On 03.12.19 15:13, Jose Trujillo wrote:
This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW.
if you ever want to get open-source gfx init running instead, let me know. It would only need a few more lines to force a specific mode with libgfxinit, maybe that is enough. And as you run the VBIOS ROM within coreboot, you are probably not interested in a resident VBIOS, are you?
[JT]->[Nico] I would prefer to do it with just libgfxinit but I don't have a remote idea in how to initialize the LVDS panel. [JT]->[Nico] With a desktop monitor libgfxinit just work in this system but not a sign of activity on the panel. [JT]->[Nico] I would like to know how to initialize the panel with just coreboot, so, please show me how.
first, you have to
select GFX_GMA_INTERNAL_IS_LVDS
in your mainboard's Kconfig.
As you mentioned, your panel doesn't have an EDID EEPROM. Hence, you'll have to hard-code your panel's native mode. Below is a POC patch how that could look like (allows combinations with LVDS and additional auto- detected displays). You'll have to find your own panel's timings. Either from the datasheet, or you can try to fetch them from the VBT, e.g.
$ intel_vbt_decode lenovo/t430s/variants/t431s/data.vbt | grep timings Underscan support for VGA timings: no timings: 1600 1648 1680 1940 900 903 908 926 107800.00 (good)
Note: The clock is given in kHz in the VBT, but libgfxinit expects Hz. BPC (bits per color) is almost always 6 for LVDS panels, and I guess sync high/low doesn't matter for LVDS.
If you get that working, we can try to design a reasonable API for pre- defined modes. For instance, the `gma-mainboard.ads` could provide a set of Pipe_Configs and we'd only scan for additional displays. That would also be useful to skip EDID reading to speed things up ;)
Nico
diff --git a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb index 1393784d7b..b828e4ba28 100644 --- a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb +++ b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb @@ -73,7 +73,32 @@ is
if success then ports := Mainboard.ports; - HW.GFX.GMA.Display_Probing.Scan_Ports (configs, ports); + HW.GFX.GMA.Display_Probing.Scan_Ports + (Configs => configs, + Ports => ports, + Max_Pipe => Secondary); -- limit to 2 auto-detected displays + + -- move auto-detected displays + configs (Tertiary) := configs (Secondary); + configs (Secondary) := configs (Primary); + -- and use primary pipe for LVDS + configs (Primary) := + (Port => Internal, + Framebuffer => Default_FB, -- will be overridden below + Cursor => Default_Cursor, + Mode => -- this matters + (H_Visible => 1920, + H_Sync_Begin => 2008, + H_Sync_End => 2052, + H_Total => 2185, + V_Visible => 1080, + V_Sync_Begin => 1084, + V_Sync_End => 1089, + V_Total => 1135, + Dotclock => 60 * 2185 * 1135, -- 60Hz * H_Total * V_Total + BPC => 6, + H_Sync_Active_High => False, + V_Sync_Active_High => False));
if configs (Primary).Port /= Disabled then for i in Pipe_Index loop
Dear Nico:
The libgfxinit solution works! Thank you very much....
What to do next?
If you get that working, we can try to design a reasonable API for pre- defined modes. For instance, the `gma-mainboard.ads` could provide a set of Pipe_Configs and we'd only scan for additional displays. That would also be useful to skip EDID reading to speed things up ;)
Jose Trujillo.
Hi Jorge,
On 03.12.19 15:13, Jose Trujillo wrote:
This is my first try in booting coreboot on a LVDS panel. This is a Sandybridge-M system using video option ROM and VBT extracted from the original FW.
if you ever want to get open-source gfx init running instead, let me know. It would only need a few more lines to force a specific mode with libgfxinit, maybe that is enough. And as you run the VBIOS ROM within coreboot, you are probably not interested in a resident VBIOS, are you? [JT]->[Nico] I would prefer to do it with just libgfxinit but I don't have a remote idea in how to initialize the LVDS panel. [JT]->[Nico] With a desktop monitor libgfxinit just work in this system but not a sign of activity on the panel. [JT]->[Nico] I would like to know how to initialize the panel with just coreboot, so, please show me how.
first, you have to
select GFX_GMA_INTERNAL_IS_LVDS
in your mainboard's Kconfig.
As you mentioned, your panel doesn't have an EDID EEPROM. Hence, you'll have to hard-code your panel's native mode. Below is a POC patch how that could look like (allows combinations with LVDS and additional auto- detected displays). You'll have to find your own panel's timings. Either from the datasheet, or you can try to fetch them from the VBT, e.g.
$ intel_vbt_decode lenovo/t430s/variants/t431s/data.vbt | grep timings Underscan support for VGA timings: no timings: 1600 1648 1680 1940 900 903 908 926 107800.00 (good)
Note: The clock is given in kHz in the VBT, but libgfxinit expects Hz. BPC (bits per color) is almost always 6 for LVDS panels, and I guess sync high/low doesn't matter for LVDS.
If you get that working, we can try to design a reasonable API for pre- defined modes. For instance, the `gma-mainboard.ads` could provide a set of Pipe_Configs and we'd only scan for additional displays. That would also be useful to skip EDID reading to speed things up ;)
Nico
diff --git a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb index 1393784d7b..b828e4ba28 100644 --- a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb +++ b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb @@ -73,7 +73,32 @@ is
if success then ports := Mainboard.ports;
HW.GFX.GMA.Display_Probing.Scan_Ports (configs, ports);
HW.GFX.GMA.Display_Probing.Scan_Ports
(Configs => configs,
Ports => ports,
Max_Pipe => Secondary); -- limit to 2 auto-detected displays
-- move auto-detected displays
configs (Tertiary) := configs (Secondary);
configs (Secondary) := configs (Primary);
-- and use primary pipe for LVDS
configs (Primary) :=
(Port => Internal,
Framebuffer => Default_FB, -- will be overridden below
Cursor => Default_Cursor,
Mode => -- this matters
(H_Visible => 1920,
H_Sync_Begin => 2008,
H_Sync_End => 2052,
H_Total => 2185,
V_Visible => 1080,
V_Sync_Begin => 1084,
V_Sync_End => 1089,
V_Total => 1135,
Dotclock => 60 * 2185 * 1135, -- 60Hz * H_Total *
V_Total
BPC => 6,
H_Sync_Active_High => False,
V_Sync_Active_High => False));
if configs (Primary).Port /= Disabled then for i in Pipe_Index loop
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Hi Jose (sorry for the name mixup earlier),
On 04.12.19 15:01, Jose Trujillo wrote:
The libgfxinit solution works!
Nice!
What to do next?
I have a rough idea for an upstream solution:
1. Extend libgfxinit's API: Scan_Ports() could get an optional parameter with predefined configs, e.g.
Static_Configs : in Pipe_Configs := All_Off_Configs;
It should then mix these with auto-detected displays.
2. Extend GMA.Mainboard to provide the predefined configs. Not sure here, it would need an update of all `gma-mainboard.ads` files in coreboot. Probably could be done with some sed-foo.
You can give that a shot, if you want. I won't have the time to look into it by myself soon.
Nico
Dear Nico: I am not a programmer to understand what you are saying. I will analize the involved code to try to understand. But I understand the general idea. I will do the changes and perform the tests and send you my proposal as soon as I can. Thank you, Jose.
Hi Jose (sorry for the name mixup earlier),
On 04.12.19 15:01, Jose Trujillo wrote:
The libgfxinit solution works!
Nice!
What to do next?
I have a rough idea for an upstream solution:
Extend libgfxinit's API: Scan_Ports() could get an optional parameter with predefined configs, e.g.
Static_Configs : in Pipe_Configs := All_Off_Configs;
It should then mix these with auto-detected displays.
Extend GMA.Mainboard to provide the predefined configs. Not sure here, it would need an update of all `gma-mainboard.ads` files in coreboot. Probably could be done with some sed-foo.
You can give that a shot, if you want. I won't have the time to look into it by myself soon.
Nico