diff options
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r-- | src/soc/intel/common/block/graphics/early_graphics.c | 13 | ||||
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/early_graphics.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/graphics/early_graphics.c b/src/soc/intel/common/block/graphics/early_graphics.c index 81faede2fa..c8a1d84174 100644 --- a/src/soc/intel/common/block/graphics/early_graphics.c +++ b/src/soc/intel/common/block/graphics/early_graphics.c @@ -3,6 +3,7 @@ #include <device/pci.h> #include <drivers/intel/gma/libgfxinit.h> #include <intelblocks/early_graphics.h> +#include <soc/gpio.h> #include <soc/pci_devs.h> static void device_init(void) @@ -20,9 +21,17 @@ static void device_init(void) (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)); } +__weak const struct pad_config *variant_early_graphics_gpio_table(size_t *num) +{ + *num = 0; + return NULL; +} + bool early_graphics_init(void) { int ret; + const struct pad_config *pads; + size_t pads_num; if (!CONFIG(MAINBOARD_USE_EARLY_LIBGFXINIT)) return false; @@ -30,6 +39,10 @@ bool early_graphics_init(void) /* Perform minimal graphic MMIO configuration. */ device_init(); + /* Optionally configure any required display related GPIOs */ + pads = variant_early_graphics_gpio_table(&pads_num); + gpio_configure_pads(pads, pads_num); + /* Configure display panel. */ early_graphics_soc_panel_init(); diff --git a/src/soc/intel/common/block/include/intelblocks/early_graphics.h b/src/soc/intel/common/block/include/intelblocks/early_graphics.h index c0313cf960..55aa9640d2 100644 --- a/src/soc/intel/common/block/include/intelblocks/early_graphics.h +++ b/src/soc/intel/common/block/include/intelblocks/early_graphics.h @@ -25,4 +25,7 @@ bool early_graphics_init(void); /* Clear graphics configuration, turn off the displays. */ void early_graphics_stop(void); +/* Allow early configuration of any display related GPIOs as needed */ +const struct pad_config *variant_early_graphics_gpio_table(size_t *num); + #endif /* SOC_INTEL_COMMON_BLOCK_GRAPHICS_EARLY_H */ |