[coreboot-gerrit] New patch to review for coreboot: 24a2d6e google/link: use the new edid functions when in FUI mode

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Dec 3 21:33:10 CET 2013


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4327

-gerrit

commit 24a2d6e4bc74e35766b66d6f18872e671afe7b67
Author: Ronald G. Minnich <rminnich at google.com>
Date:   Wed Jun 5 08:35:52 2013 -0700

    google/link: use the new edid functions when in FUI mode
    
    The new edid functions support converting the edid to an lb_framebuffer.
    Use them. Also, since panels seem to set bits per color instead of bits
    per pixel, just force the right value in the edid struct.
    
    Add helpful comment because people don't always believe we need to set
    the pallette.
    
    While we're at it, fix a problem that caused it to not compile.
    
    Change-Id: I645edc4e442d9b96303d9e17f175458dc7ef28b6
    Signed-off-by: Ronald G. Minnich <rminnich at google.com>
    Reviewed-on: https://gerrit.chromium.org/gerrit/57619
    Reviewed-by: Stefan Reinauer <reinauer at google.com>
    Commit-Queue: Ronald G. Minnich <rminnich at chromium.org>
    Tested-by: Ronald G. Minnich <rminnich at chromium.org>
---
 src/mainboard/google/link/i915.c | 34 +++++++---------------------------
 1 file changed, 7 insertions(+), 27 deletions(-)

diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c
index 42b9c0f..6481234 100644
--- a/src/mainboard/google/link/i915.c
+++ b/src/mainboard/google/link/i915.c
@@ -147,6 +147,7 @@ extern int niodefs;
 static int i915_init_done = 0;
 
 /* fill the palette. This runs when the P opcode is hit. */
+/* and, yes, it's needed for even 32 bits per pixel */
 static void palette(void)
 {
 	int i;
@@ -157,32 +158,6 @@ static void palette(void)
 	}
 }
 
-int vbe_mode_info_valid(void);
-int vbe_mode_info_valid(void)
-{
-	return i915_init_done;
-}
-
-void fill_lb_framebuffer(struct lb_framebuffer *framebuffer);
-void fill_lb_framebuffer(struct lb_framebuffer *framebuffer)
-{
-	printk(BIOS_SPEW, "fill_lb_framebuffer: graphics is %p\n", (void *)graphics);
-	framebuffer->physical_address = graphics;
-	framebuffer->x_resolution = 2560;
-	framebuffer->y_resolution = 1700;
-	framebuffer->bytes_per_line = 10240;
-	framebuffer->bits_per_pixel = 32;
-	framebuffer->red_mask_pos = 16;
-	framebuffer->red_mask_size = 8;
-	framebuffer->green_mask_pos = 8;
-	framebuffer->green_mask_size = 8;
-	framebuffer->blue_mask_pos = 0;
-	framebuffer->blue_mask_size = 8;
-	framebuffer->reserved_mask_pos = 0;
-	framebuffer->reserved_mask_size = 0;
-
-}
-
 static unsigned long times[4096];
 
 static int run(int index)
@@ -268,6 +243,7 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
 		unsigned int pmmio, unsigned int pgfx)
 {
 	static struct edid edid;
+	int edid_ok;
 
 	int index;
 	u32 auxin[16], auxout[16];
@@ -282,7 +258,10 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
 	globalstart = rdtscll();
 
 
-	decode_edid((unsigned char *)&link_edid_data, sizeof(link_edid_data), &edid);
+	edid_ok = decode_edid((unsigned char *)&link_edid_data,
+			      sizeof(link_edid_data), &edid);
+	printk(BIOS_SPEW, "decode edid returns %d\n", edid_ok);
+	edid.bpp = 32;
 
 	htotal = (edid.ha - 1) | ((edid.ha + edid.hbl- 1) << 16);
 	printk(BIOS_SPEW, "I915_WRITE(HTOTAL(pipe), %08x)\n", htotal);
@@ -398,6 +377,7 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
 		(void *)graphics, FRAME_BUFFER_BYTES);
 	memset((void *)graphics, 0, FRAME_BUFFER_BYTES);
 	printk(BIOS_SPEW, "%ld microseconds\n", globalmicroseconds());
+	set_vbe_mode_info_valid(&edid, graphics);
 	i915_init_done = 1;
 	oprom_is_loaded = 1;
 	return 0;



More information about the coreboot-gerrit mailing list