Attention is currently required from: Stefan Ott, Alexander Couzens.
Bill XIE has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74181 )
Change subject: mb/lenovo/x200: Read EDID in mainboard_vbt_filename() ......................................................................
mb/lenovo/x200: Read EDID in mainboard_vbt_filename()
mainboard_vbt_filename() used to assume that it is called after a call to get_blc_pwm_freq_value() with a valid parameter, but currently it is the first call of get_blc_pwm_freq_value(NULL), and will return 0, making "data_led.vbt" is always returned, regardless of the actual type of the panel.
Combined with the previous commit, in this commit mainboard_vbt_filename() will explicitly read EDID string via get_edid_str() and use this string to call get_blc_pwm_freq_value().
This will resolve https://ticket.coreboot.org/issues/475 .
Signed-off-by: Bill XIE persmule@hardenedlinux.org Change-Id: I2e080b29321b6989d1f26b6c67876b3d703042f4 --- M src/mainboard/lenovo/x200/blc.c 1 file changed, 25 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/74181/1
diff --git a/src/mainboard/lenovo/x200/blc.c b/src/mainboard/lenovo/x200/blc.c index ef2dbb1..02b16d1 100644 --- a/src/mainboard/lenovo/x200/blc.c +++ b/src/mainboard/lenovo/x200/blc.c @@ -4,6 +4,7 @@ #include <commonlib/helpers.h> #include <console/console.h> #include <northbridge/intel/gm45/gm45.h> +#include <device/pci.h> #include <drivers/intel/gma/opregion.h>
static const struct blc_pwm_t blc_entries[] = { @@ -36,9 +37,8 @@
const char *mainboard_vbt_filename(void) { - u16 pwm_freq; - - pwm_freq = get_blc_pwm_freq_value(NULL); + struct device *gma = pcidev_path_on_root(PCI_DEVFN(0x2, 0)); + u16 pwm_freq = gma ? get_blc_pwm_freq_value(get_edid_str(gma)) : 0;
if (pwm_freq == 0) { printk(BIOS_DEBUG,