From 8b56c8c6b2694500318eba14e291a0586837ebe8 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 19 Feb 2020 12:57:00 +0100 Subject: drivers: Replace set_vbe_mode_info_valid Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use. This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks. The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options. Replace set_vbe_mode_info_valid with fb_add_framebuffer_info or fb_new_framebuffer_info_from_edid. Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/39004 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin --- src/mainboard/emulation/qemu-armv7/mainboard.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/mainboard/emulation/qemu-armv7/mainboard.c') 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 #include #include -#include #include #include #include +#include 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) -- cgit v1.2.3