1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <commonlib/helpers.h>
5 #include <console/console.h>
6 #include <northbridge/intel/gm45/gm45.h>
7 #include <device/pci.h>
8 #include <drivers/intel/gma/opregion.h>
10 static const struct blc_pwm_t blc_entries
[] = {
11 /* corrected to 320MHz CDClk, vendor set 753; works fine at both: */
14 {"LTD133EQ1B", 264}, /* Found on an X301 */
15 {"B121EW03 V6 ", 165},
16 /* datasheets: between 100 and 20k, typical 200 */
17 /* TESTED: works best at 400 */
18 {"B121EW09 V3 ", 400},
19 {"HV121WX4-120", 110}, /* Aftermarket AFFS lcd, works well at low pwm */
20 {"LTN121AT03001", 110},
21 {"LTN121AT07L02", 750}, /* Its part name is LTN121AT07-L02 */
22 {"LTN121AP03001", 750},
23 /* TODO: untested panels found on thinkwiki */
24 /* Generally CCFL runs best at lower PWM */
25 /* {"B121EW09 V2 ", 450}, */
26 /* {"N121IB-L05", 450}, */
27 {"LP121WX3-TLC1", 400}, /* TESTED to work best at this value */
28 /* {"LP121WX3-TLA1" 450}, */
29 /* {"B121EW03 V3 " 110}, */
30 /* {"LTN121AP02001" 110}, */
33 int get_blc_values(const struct blc_pwm_t
**entries
)
35 *entries
= blc_entries
;
36 return ARRAY_SIZE(blc_entries
);
39 const char *mainboard_vbt_filename(void)
41 u16 pwm_freq
= get_blc_pwm_freq_value();
45 "GMA: Display backlight type not found, assuming LED\n");
46 return "data_led.vbt";
47 } else if (pwm_freq
> 200) {
48 printk(BIOS_DEBUG
, "GMA: Using LED backlight VBT\n");
49 return "data_led.vbt";
51 printk(BIOS_DEBUG
, "GMA: Using CCFL backlight VBT\n");
52 return "data_ccfl.vbt";