summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/emulation/qemu-armv7/mainboard.c10
-rw-r--r--src/mainboard/google/asurada/mainboard.c3
-rw-r--r--src/mainboard/google/daisy/mainboard.c13
-rw-r--r--src/mainboard/google/kukui/mainboard.c2
-rw-r--r--src/mainboard/google/oak/mainboard.c3
-rw-r--r--src/mainboard/google/peach_pit/mainboard.c13
-rw-r--r--src/mainboard/google/trogdor/mainboard.c3
7 files changed, 13 insertions, 34 deletions
diff --git a/src/mainboard/emulation/qemu-armv7/mainboard.c b/src/mainboard/emulation/qemu-armv7/mainboard.c
index 977725d246..c3d974c429 100644
--- a/src/mainboard/emulation/qemu-armv7/mainboard.c
+++ b/src/mainboard/emulation/qemu-armv7/mainboard.c
@@ -4,15 +4,14 @@
#include <device/device.h>
#include <cbmem.h>
#include <halt.h>
-#include <edid.h>
#include <device/mmio.h>
#include <ramdetect.h>
#include <symbols.h>
+#include <framebuffer_info.h>
static void init_gfx(void)
{
uint32_t *pl111;
- struct edid edid;
/* width is at most 4096 */
/* height is at most 1024 */
int width = 800, height = 600;
@@ -28,12 +27,7 @@ static void init_gfx(void)
write32(pl111 + 10, 0xff);
write32(pl111 + 6, (5 << 1) | 0x801);
- edid.framebuffer_bits_per_pixel = 32;
- edid.bytes_per_line = width * 4;
- edid.x_resolution = width;
- edid.y_resolution = height;
-
- set_vbe_mode_info_valid(&edid, framebuffer);
+ fb_add_framebuffer_info(framebuffer, width, height, 4 * width, 32);
}
static void mainboard_enable(struct device *dev)
diff --git a/src/mainboard/google/asurada/mainboard.c b/src/mainboard/google/asurada/mainboard.c
index 8e7f2e8480..f836724df6 100644
--- a/src/mainboard/google/asurada/mainboard.c
+++ b/src/mainboard/google/asurada/mainboard.c
@@ -8,6 +8,7 @@
#include <device/mmio.h>
#include <drivers/analogix/anx7625/anx7625.h>
#include <edid.h>
+#include <framebuffer_info.h>
#include <gpio.h>
#include <soc/ddp.h>
#include <soc/dpm.h>
@@ -124,7 +125,7 @@ static bool configure_display(void)
return false;
}
mtk_ddp_mode_set(&edid);
- set_vbe_mode_info_valid(&edid, 0);
+ fb_new_framebuffer_info_from_edid(&edid, (uintptr_t)0);
return true;
}
diff --git a/src/mainboard/google/daisy/mainboard.c b/src/mainboard/google/daisy/mainboard.c
index 2f07937475..1df786db83 100644
--- a/src/mainboard/google/daisy/mainboard.c
+++ b/src/mainboard/google/daisy/mainboard.c
@@ -7,7 +7,6 @@
#include <device/device.h>
#include <device/i2c_simple.h>
#include <drivers/ti/tps65090/tps65090.h>
-#include <edid.h>
#include <soc/clk.h>
#include <soc/dp.h>
#include <soc/dp-core.h>
@@ -18,6 +17,7 @@
#include <soc/tmu.h>
#include <soc/usb.h>
#include <symbols.h>
+#include <framebuffer_info.h>
#include "exynos5250.h"
@@ -28,15 +28,6 @@
#define DRAM_SIZE CONFIG_DRAM_SIZE_MB
#define DRAM_END (DRAM_START + DRAM_SIZE) /* plus one... */
-static struct edid edid = {
- .mode.ha = 1366,
- .mode.va = 768,
- .framebuffer_bits_per_pixel = 16,
- .x_resolution = 1366,
- .y_resolution = 768,
- .bytes_per_line = 2 * 1366
-};
-
/* TODO: transplanted DP stuff, clean up once we have something that works */
static enum exynos5_gpio_pin dp_pd_l = GPIO_Y25; /* active low */
static enum exynos5_gpio_pin dp_rst_l = GPIO_X15; /* active low */
@@ -263,7 +254,7 @@ static void mainboard_init(struct device *dev)
sdmmc_vdd();
- set_vbe_mode_info_valid(&edid, (uintptr_t)fb_addr);
+ fb_add_framebuffer_info((uintptr_t)fb_addr, 1366, 768, 2 * 1366, 16);
lcd_vdd();
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c
index 216b6f43e4..a197a7f009 100644
--- a/src/mainboard/google/kukui/mainboard.c
+++ b/src/mainboard/google/kukui/mainboard.c
@@ -169,7 +169,7 @@ static bool configure_display(void)
return false;
}
mtk_ddp_mode_set(edid);
- struct fb_info *info = set_vbe_mode_info_valid(edid, 0);
+ struct fb_info *info = fb_new_framebuffer_info_from_edid(edid, 0);
if (info)
fb_set_orientation(info, panel->s->orientation);
diff --git a/src/mainboard/google/oak/mainboard.c b/src/mainboard/google/oak/mainboard.c
index e89bc6bf21..cd17edebe1 100644
--- a/src/mainboard/google/oak/mainboard.c
+++ b/src/mainboard/google/oak/mainboard.c
@@ -18,6 +18,7 @@
#include <soc/pll.h>
#include <soc/usb.h>
#include <vendorcode/google/chromeos/chromeos.h>
+#include <framebuffer_info.h>
enum {
CODEC_I2C_BUS = 0,
@@ -224,7 +225,7 @@ static void display_startup(void)
}
mtk_ddp_mode_set(&edid);
- set_vbe_mode_info_valid(&edid, (uintptr_t)0);
+ fb_new_framebuffer_info_from_edid(&edid, (uintptr_t)0);
}
static void mainboard_init(struct device *dev)
diff --git a/src/mainboard/google/peach_pit/mainboard.c b/src/mainboard/google/peach_pit/mainboard.c
index 85c0407e81..ab3c0f5b35 100644
--- a/src/mainboard/google/peach_pit/mainboard.c
+++ b/src/mainboard/google/peach_pit/mainboard.c
@@ -9,7 +9,6 @@
#include <device/i2c_simple.h>
#include <drivers/parade/ps8625/ps8625.h>
#include <ec/google/chromeec/ec.h>
-#include <edid.h>
#include <soc/tmu.h>
#include <soc/clk.h>
#include <soc/cpu.h>
@@ -23,20 +22,12 @@
#include <string.h>
#include <symbols.h>
#include <vbe.h>
+#include <framebuffer_info.h>
/* convenient shorthand (in MB) */
#define DRAM_START ((uintptr_t)_dram/MiB)
#define DRAM_SIZE CONFIG_DRAM_SIZE_MB
-static struct edid edid = {
- .mode.ha = 1366,
- .mode.va = 768,
- .framebuffer_bits_per_pixel = 16,
- .x_resolution = 1366,
- .y_resolution = 768,
- .bytes_per_line = 2 * 1366
-};
-
/* from the fdt */
static struct vidinfo vidinfo = {
.vl_freq = 60,
@@ -402,7 +393,7 @@ static void mainboard_init(struct device *dev)
sdmmc_vdd();
- set_vbe_mode_info_valid(&edid, (uintptr_t)fb_addr);
+ fb_add_framebuffer_info((uintptr_t)fb_addr, 1366, 768, 2 * 1366, 16);
/*
* The reset value for FIMD SYSMMU register MMU_CTRL:0x14640000
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index 54d8b0dd5c..0f469e065b 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -6,6 +6,7 @@
#include <device/device.h>
#include <device/i2c_simple.h>
#include <drivers/ti/sn65dsi86bridge/sn65dsi86bridge.h>
+#include <framebuffer_info.h>
#include <soc/display/mipi_dsi.h>
#include <soc/display/mdssreg.h>
#include <soc/qupv3_config.h>
@@ -105,7 +106,7 @@ static void display_startup(void)
/* Configure backlight */
gpio_output(GPIO_BACKLIGHT_ENABLE, 1);
display_init(&ed);
- set_vbe_mode_info_valid(&ed, (uintptr_t)0);
+ fb_new_framebuffer_info_from_edid(&ed, (uintptr_t)0);
} else
printk(BIOS_INFO, "Skipping display init.\n");
}