diff options
author | Nico Huber <nico.h@gmx.de> | 2023-05-18 13:51:18 +0200 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2023-05-21 19:50:24 +0000 |
commit | e5888da8de5b098271e95953846b313f25a42d63 (patch) | |
tree | 2994ba60f6c97590ad1e18c57f6cdf70ac4d3018 /src/mainboard | |
parent | 9405541b1aebb501969370afcf876bf5052c7152 (diff) |
nb/intel/gm45/gma: Probe PCI resource once and first
The PCI resource should only be probed as part of the device
.init process. We can simply do that first and know that we
can use the global `gtt_res` from then on.
This simplifies the signature of gm45_get_lvds_edid_str(), and
makes changes to the API user (lenovo/x200) necessary.
Change-Id: I6c96f715abfa56dcb1cd89fde0fbaef3f1cb63ae
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/lenovo/x200/blc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mainboard/lenovo/x200/blc.c b/src/mainboard/lenovo/x200/blc.c index 330f1bcdaf..655be567e6 100644 --- a/src/mainboard/lenovo/x200/blc.c +++ b/src/mainboard/lenovo/x200/blc.c @@ -38,8 +38,7 @@ int get_blc_values(const struct blc_pwm_t **entries) const char *mainboard_vbt_filename(void) { - struct device *gma = pcidev_path_on_root(PCI_DEVFN(0x2, 0)); - u16 pwm_freq = gma ? get_blc_pwm_freq_value(gm45_get_lvds_edid_str(gma)) : 0; + u16 pwm_freq = get_blc_pwm_freq_value(gm45_get_lvds_edid_str()); if (pwm_freq == 0) { printk(BIOS_DEBUG, |