I am trying to enable FRAMEBUFFER_SET_VESA_MODE for G505S at its' Kconfig ( ./src/mainboard/lenovo/g505s/Kconfig ) and also set the VESA mode to 0x118 instead of default 0x117 setting, by inserting the following lines to G505S Kconfig:
config FRAMEBUFFER_SET_VESA_MODE bool default y
config FRAMEBUFFER_VESA_MODE_118 bool default y
config FRAMEBUFFER_VESA_MODE hex default 0x118
However, when I'm trying to run "make menuconfig" it complains with "Kconfig:[line_number]:warning: defaults for choice values not supported" message and I could see that the default setting is still 0x117.
Could you please advise the working way of changing this "choice" setting by default?
I thought of something like
choice prompt "framebuffer graphics resolution" default FRAMEBUFFER_VESA_MODE_117 if !BOARD_LENOVO_G505S default FRAMEBUFFER_VESA_MODE_118 if BOARD_LENOVO_G505S help This option sets the resolution used for the coreboot framebuffer (and bootsplash screen).
at ./coreboot/src/device/Kconfig, and it should work, however this isn't pretty (and also I prefer that board-specific options stay at board's Kconfig and don't spread across the tree) so it would be really helpful if you know a good alternative workaround
Best regards, Mike Banon
Hi,
On 09.02.19 23:27, Mike Banon wrote:
I am trying to enable FRAMEBUFFER_SET_VESA_MODE for G505S at its' Kconfig ( ./src/mainboard/lenovo/g505s/Kconfig ) and also set the VESA mode to 0x118 instead of default 0x117 setting, by inserting the following lines to G505S Kconfig:
config FRAMEBUFFER_SET_VESA_MODE bool default y
overriding the default for an option with complex dependencies is delicate. It might be a good idea to copy the dependencies over: `depends on PCI_OPTION_ROM_RUN_YABEL || PCI_OPTION_ROM_RUN_REALMODE`. I just tested this for the G505s and it's currently ok w/o dependencies. But if somebody would implement native graphics init for it, you'd spuriously show the VESA options even with native selected.
config FRAMEBUFFER_VESA_MODE_118 bool default y
see below
config FRAMEBUFFER_VESA_MODE hex default 0x118
You won't need this once the choice's default is set.
However, when I'm trying to run "make menuconfig" it complains with "Kconfig:[line_number]:warning: defaults for choice values not supported" message and I could see that the default setting is still 0x117.
Could you please advise the working way of changing this "choice" setting by default?
I thought of something like
choice prompt "framebuffer graphics resolution" default FRAMEBUFFER_VESA_MODE_117 if !BOARD_LENOVO_G505S default FRAMEBUFFER_VESA_MODE_118 if BOARD_LENOVO_G505S help This option sets the resolution used for the coreboot framebuffer (and bootsplash screen).
at ./coreboot/src/device/Kconfig, and it should work, however this isn't pretty (and also I prefer that board-specific options stay at board's Kconfig and don't spread across the tree) so it would be really helpful if you know a good alternative workaround
The usual workaround is to add a predicate that is selected by the board. e.g.
config FRAMEBUFFER_VESA_DEFAULT_118 bool
choice default FRAMEBUFFER_VESA_MODE_118 if FRAMEBUFFER_VESA_DEFAULT_118
Not pretty either, but generally accepted. src/mainboard/Kconfig starts with an example of this pattern.
Nico
PS. I don't understand the current 117 default. I remember it was a common mode in the legacy BIOS days. But for legacy boot, you wouldn't want to run the VGA BIOS in coreboot. It might be worth to test (with all currently integrated payloads) if 118 isn't a better default. Assuming 118 means 4-byte pixels? I would expect it to be more compatible.
Hi,
On Sun, Feb 10, 2019 at 2:18 PM Nico Huber nico.h@gmx.de wrote:
The usual workaround is to add a predicate that is selected by the board. e.g.
config FRAMEBUFFER_VESA_DEFAULT_118 bool choice default FRAMEBUFFER_VESA_MODE_118 if
FRAMEBUFFER_VESA_DEFAULT_118
Not pretty either, but generally accepted. src/mainboard/Kconfig starts with an example of this pattern.
Thank you very much for your advice and inspiration! I just made a new change https://review.coreboot.org/c/coreboot/+/31324 , and you are welcome for review.
I don't understand the current 117 default. I remember it was a common mode in the legacy BIOS days. But for legacy boot, you wouldn't want to run the VGA BIOS in coreboot. It might be worth to test (with all currently integrated payloads) if 118 isn't a better default. Assuming 118 means 4-byte pixels? I would expect it to be more compatible.
The main difference between 117h and 118h modes is the number of colors: 117h = 16-bit (2 byte) pixel - 64k colors, 118h = 24-bit (3-byte) pixel - 16M colors.
To be honest I don't know how the number of colors affect the compatibility, especially for the older coreboot boards, so I think the safer approach would be to leave the default as 117h while maybe choosing the other better defaults for the boards where they have been tested.
We already tested 118h mode at G505S and it's working well there, although with VGABIOS added (no native graphics init yet) :
On Sat, Nov 3, 2018 at 8:42 PM Hans Jürgen Kitter wrote: Coreboot config: std. g505s build, but both run oprom & load oprom was enabled (native mode), also display was set to FB, 1024x768 16.8M color 8:8:8, legacy VGA → this provides console output even if eg. GRUB is the payload).
( the message above is related to HJK patches for making a dGPU working at G505S, currently I'm looking through these patches and hope to upstream them in the near future)
So I'm suggesting these Kconfig options for G505S ( FRAMEBUFFER_SET_VESA_MODE and FRAMEBUFFER_VESA_DEFAULT_118 ) at another new https://review.coreboot.org/c/coreboot/+/31325 change
Best regards, Mike Banon