aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@google.com>2013-06-05 08:35:52 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-12-05 20:15:18 +0100
commit7982de165e87c59df98f8334afc1728e7cc90e7f (patch)
treedabb20f9c389333412835812d26699cbe33bac6d /src/mainboard
parent4bc107bc02529cb1c9288435de2f2e86497f76b3 (diff)
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@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/57619 Reviewed-by: Stefan Reinauer <reinauer@google.com> Commit-Queue: Ronald G. Minnich <rminnich@chromium.org> Tested-by: Ronald G. Minnich <rminnich@chromium.org> Reviewed-on: http://review.coreboot.org/4327 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/link/i915.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c
index 42b9c0f922..64812349ed 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;