From 542e9488bd3f084c373e89e869aeca84aaa8c66c Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 5 Oct 2016 17:47:32 +0200 Subject: drivers/intel/gma: Hook up libgfxinit Add `libgfxinit` as another option for native graphics initialization. For that, the function gma_gfxinit() (see drivers/intel/gma/i915.h) has to be called by the respective northbridge/soc code. A mainboard port needs to select `CONFIG_MAINBOARD_HAS_LIBGFXINIT` and implement the Ada package `GMA.Mainboard` with a single function `ports` that returns a list of ports to be probed for displays. v2: Update 3rdparty/libgfxinit to its latest master commit to make things buildable within coreboot. v3: Another update to 3rdparty/libgfxinit. Including support to select the I2C port for VGA. Change-Id: I4c7be3745f32853797d3f3689396dde07d4ca950 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/16952 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Ronald G. Minnich --- src/drivers/intel/gma/gma.ads | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/drivers/intel/gma/gma.ads (limited to 'src/drivers/intel/gma/gma.ads') diff --git a/src/drivers/intel/gma/gma.ads b/src/drivers/intel/gma/gma.ads new file mode 100644 index 0000000000..d912df1635 --- /dev/null +++ b/src/drivers/intel/gma/gma.ads @@ -0,0 +1,43 @@ +with Interfaces.C; + +with HW; +use HW; + +package GMA +is + + procedure gfxinit + (mmio_base : in word64; + linear_fb : in word64; + phys_fb : in word32; + lightup_ok : out Interfaces.C.int); + pragma Export (C, gfxinit, "gma_gfxinit"); + + ---------------------------------------------------------------------------- + + function vbe_mode_info_valid return Interfaces.C.int; + pragma Export (C, vbe_mode_info_valid, "vbe_mode_info_valid"); + + type lb_framebuffer is record + tag : word32; + size : word32; + + physical_address : word64; + x_resolution : word32; + y_resolution : word32; + bytes_per_line : word32; + bits_per_pixel : word8; + red_mask_pos : word8; + red_mask_size : word8; + green_mask_pos : word8; + green_mask_size : word8; + blue_mask_pos : word8; + blue_mask_size : word8; + reserved_mask_pos : word8; + reserved_mask_size : word8; + end record; + + procedure fill_lb_framebuffer (framebuffer : out lb_framebuffer); + pragma Export (C, fill_lb_framebuffer, "fill_lb_framebuffer"); + +end GMA; -- cgit v1.2.3