From b2893a0169ce603926bf13465432a15c4526de97 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Tue, 23 Apr 2013 10:59:11 -0700 Subject: Provide support for setting up the framebuffer from EDID Add three functions to edid.c: void set_vbe_mode_info_valid(struct edid *edid, uintptr_t fb_addr) takes an edid and uintptr_t, and fills in a static lb_framebuffer struct as well as setting the static vbe_valid to 1 unless some problem is found in the edid. The intent here is that this could be called from the native graphics setup code on both ARM and x86. int vbe_mode_info_valid(void) returns value of the static vbe_valid. void fill_lb_framebuffer(struct lb_framebuffer *framebuffer) copies the static edid_fb to lb_framebuffer. There is now a common vbe.h in src/include, removed the two special ones. In general, graphics in coreboot is a mess, but graphics is always a mess. We don't have a clean way to try two different ways to turn on a device and use the one that works. One battle at a time. Overall, things are much better. The best part: this code would also work for ARM, which also uses EDID. Change-Id: Id23eb61498b331d44ab064b8fb4cb10f07cff7f3 Signed-off-by: Ronald G. Minnich Signed-off-by: Gabe Black Reviewed-on: http://review.coreboot.org/3636 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/snow/ramstage.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'src/mainboard/google/snow') diff --git a/src/mainboard/google/snow/ramstage.c b/src/mainboard/google/snow/ramstage.c index 72f830dec6..93979b2a60 100644 --- a/src/mainboard/google/snow/ramstage.c +++ b/src/mainboard/google/snow/ramstage.c @@ -42,40 +42,6 @@ #define DRAM_SIZE CONFIG_DRAM_SIZE_MB #define DRAM_END (DRAM_START + DRAM_SIZE) /* plus one... */ -int vbe_mode_info_valid(void); -int vbe_mode_info_valid(void) -{ - return 1; -} - -void fill_lb_framebuffer(struct lb_framebuffer *framebuffer); -void fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - /* - * The address returned points at the LCD colormap base. The - * 64KiB offset points at the LCD base. - */ - framebuffer->physical_address = - (u32)cbmem_find(CBMEM_ID_CONSOLE) + 64*KiB; - printk(BIOS_SPEW, "%s: framebuffer->physical address is 0x%llx\n", - __func__, framebuffer->physical_address); - - framebuffer->x_resolution = 1366; - framebuffer->y_resolution = 768; - framebuffer->bits_per_pixel = 16; - framebuffer->bytes_per_line = - (framebuffer->x_resolution * framebuffer->bits_per_pixel) / 8; - - framebuffer->red_mask_pos = 11; - framebuffer->red_mask_size = 5; - framebuffer->green_mask_pos = 6; - framebuffer->green_mask_size = 5; - framebuffer->blue_mask_pos = 0; - framebuffer->blue_mask_size = 5; - framebuffer->reserved_mask_pos = 0; - framebuffer->reserved_mask_size = 0; -} - void hardwaremain(void); void main(void) -- cgit v1.2.3