mb/intel/x200: Add data.vbt

There are 2 vendor BIOS's for the Lenovo X200 with the difference being the
settings in the VBT blob to accommodate different backlight frequencies.
Linux however sticks with the setting set by the firmware.

Tested on Lenovo X200 with CCFL backlight.

Change-Id: I4c4a7011ce03cdd511fa2e2160c2f006ba2707ba
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/29904
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2018-11-28 16:57:15 +01:00 committed by Patrick Georgi
parent b81dcc6c4d
commit 4cdb2b9b75
4 changed files with 30 additions and 0 deletions

View File

@ -19,3 +19,12 @@ ramstage-y += blc.c
romstage-y += gpio.c romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
add_vbt_to_cbfs= \
$(eval cbfs-files-y += $1) \
$(eval $1-file := $2) \
$(eval $1-type := raw) \
$(eval $1-compression := lzma)
$(call add_vbt_to_cbfs, data_ccfl.vbt, data_ccfl.vbt)
$(call add_vbt_to_cbfs, data_led.vbt, data_led.vbt)

View File

@ -15,7 +15,9 @@
#include <stdint.h> #include <stdint.h>
#include <commonlib/helpers.h> #include <commonlib/helpers.h>
#include <console/console.h>
#include <northbridge/intel/gm45/gm45.h> #include <northbridge/intel/gm45/gm45.h>
#include <drivers/intel/gma/opregion.h>
static const struct blc_pwm_t blc_entries[] = { static const struct blc_pwm_t blc_entries[] = {
/* corrected to 320MHz CDClk, vendor set 753; works fine at both: */ /* corrected to 320MHz CDClk, vendor set 753; works fine at both: */
@ -43,3 +45,22 @@ int get_blc_values(const struct blc_pwm_t **entries)
*entries = blc_entries; *entries = blc_entries;
return ARRAY_SIZE(blc_entries); return ARRAY_SIZE(blc_entries);
} }
const char *mainboard_vbt_filename(void)
{
u16 pwm_freq;
pwm_freq = get_blc_pwm_freq_value(NULL);
if (pwm_freq == 0) {
printk(BIOS_DEBUG,
"GMA: Display backlight type not found, assuming LED\n");
return "data_led.vbt";
} else if (pwm_freq > 200) {
printk(BIOS_DEBUG, "GMA: Using LED backlight VBT\n");
return "data_led.vbt";
} else {
printk(BIOS_DEBUG, "GMA: Using CCFL backlight VBT\n");
return "data_ccfl.vbt";
}
}

Binary file not shown.

Binary file not shown.