Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: [WIP]drivers: Replace set_vbe_mode_info_valid ......................................................................
[WIP]drivers: Replace set_vbe_mode_info_valid
Replace set_vbe_mode_info_valid with fb_fill_framebuffer_info, as it doesn't need a complete edid struct s paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/soc/nvidia/tegra210/dc.c 5 files changed, 33 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/1
diff --git a/src/drivers/aspeed/common/ast_mode_corebootfb.c b/src/drivers/aspeed/common/ast_mode_corebootfb.c index 2ec85ac..fed7754 100644 --- a/src/drivers/aspeed/common/ast_mode_corebootfb.c +++ b/src/drivers/aspeed/common/ast_mode_corebootfb.c @@ -30,6 +30,7 @@ */
#include <edid.h> +#include <framebuffer_info.h>
#include "ast_drv.h"
@@ -247,7 +248,12 @@ ast_hide_cursor(&crtc);
/* Advertise new mode */ - set_vbe_mode_info_valid(&edid, fb.mmio_addr); + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (info) { + fb_fill_framebuffer_info(info, fb.mmio_addr, edid.x_resolution, + edid.y_resolution, edid.bytes_per_line, + edid.framebuffer_bits_per_pixel); + }
/* Clear display */ memset((void *)fb.mmio_addr, 0, edid.bytes_per_line * edid.y_resolution); diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c index d9e4ce1..959d431 100644 --- a/src/drivers/emulation/qemu/bochs.c +++ b/src/drivers/emulation/qemu/bochs.c @@ -12,7 +12,6 @@ */
#include <stdint.h> -#include <edid.h> #include <arch/io.h> #include <console/console.h> #include <device/device.h> @@ -20,6 +19,7 @@ #include <device/pci_ops.h> #include <pc80/vga.h> #include <pc80/vga_io.h> +#include <framebuffer_info.h>
/* VGA init. We use the Bochs VESA VBE extensions */ #define VBE_DISPI_IOPORT_INDEX 0x01CE @@ -65,7 +65,6 @@
static void bochs_init_linear_fb(struct device *dev) { - struct edid edid; int id, mem, bar; u32 addr;
@@ -112,13 +111,11 @@
outb(0x20, 0x3c0); /* disable blanking */
- /* setup coreboot framebuffer */ - edid.mode.ha = width; - edid.mode.va = height; - edid.panel_bits_per_color = 8; - edid.panel_bits_per_pixel = 24; - edid_set_framebuffer_bits_per_pixel(&edid, 32, 0); - set_vbe_mode_info_valid(&edid, addr); + /* Advertise new mode */ + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (info) { + fb_fill_framebuffer_info(info, addr, width, height, 4 * width, 24); + } }
static void bochs_init_text_mode(struct device *dev) diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c index 6b1968c..8f048f9 100644 --- a/src/drivers/emulation/qemu/cirrus.c +++ b/src/drivers/emulation/qemu/cirrus.c @@ -13,13 +13,13 @@ */
#include <stdint.h> -#include <edid.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> #include <device/pci_ops.h> #include <pc80/vga.h> #include <pc80/vga_io.h> +#include <framebuffer_info.h>
static int width = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES; static int height = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES; @@ -311,14 +311,10 @@ vga_sr_write (CIRRUS_SR_EXTENDED_MODE, sr_ext); write_hidden_dac (hidden_dac);
- - struct edid edid; - edid.mode.ha = width; - edid.mode.va = height; - edid.panel_bits_per_color = 8; - edid.panel_bits_per_pixel = 24; - edid_set_framebuffer_bits_per_pixel(&edid, 32, 0); - set_vbe_mode_info_valid(&edid, addr); + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (info) { + fb_fill_framebuffer_info(info, addr, width, height, 4 * width, 24); + } }
static void cirrus_init_text_mode(struct device *dev) diff --git a/src/mainboard/emulation/qemu-armv7/mainboard.c b/src/mainboard/emulation/qemu-armv7/mainboard.c index 338cff9..22340b2 100644 --- a/src/mainboard/emulation/qemu-armv7/mainboard.c +++ b/src/mainboard/emulation/qemu-armv7/mainboard.c @@ -18,15 +18,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; @@ -42,12 +41,10 @@ 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); + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (info) { + fb_fill_framebuffer_info(info, framebuffer, width, height, 4 * width, 32); + } }
static void mainboard_enable(struct device *dev) diff --git a/src/soc/nvidia/tegra210/dc.c b/src/soc/nvidia/tegra210/dc.c index 46443cf..b4e3378 100644 --- a/src/soc/nvidia/tegra210/dc.c +++ b/src/soc/nvidia/tegra210/dc.c @@ -16,10 +16,10 @@ #include <console/console.h> #include <device/mmio.h> #include <stdint.h> -#include <edid.h> #include <device/device.h> #include <soc/nvidia/tegra/dc.h> #include <soc/display.h> +#include <framebuffer_info.h>
#include "chip.h"
@@ -226,19 +226,13 @@ void pass_mode_info_to_payload( struct soc_nvidia_tegra210_config *config) { - struct edid edid; - - edid.mode.va = config->display_yres; - edid.mode.ha = config->display_xres; - edid_set_framebuffer_bits_per_pixel(&edid, - config->framebuffer_bits_per_pixel, 64); - - printk(BIOS_INFO, "%s: bytes_per_line: %d, bits_per_pixel: %d\n " - " x_res x y_res: %d x %d, size: %d\n", - __func__, edid.bytes_per_line, - edid.framebuffer_bits_per_pixel, - edid.x_resolution, edid.y_resolution, - (edid.bytes_per_line * edid.y_resolution)); - - set_vbe_mode_info_valid(&edid, 0); + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (info) { + uint32_t bytes_per_line = ALIGN_UP(config->display_xres * + DIV_ROUND_UP(config->framebuffer_bits_per_pixel, 8), 64); + //FIXME: Why not config->framebuffer_base? + fb_fill_framebuffer_info(info, 0, + config->display_xres, config->display_yres, + bytes_per_line, config->framebuffer_bits_per_pixel); + } }
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: [WIP]drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/emulation/qemu/... File src/drivers/emulation/qemu/bochs.c:
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/emulation/qemu/... PS1, Line 116: if (info) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/emulation/qemu/... File src/drivers/emulation/qemu/cirrus.c:
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/emulation/qemu/... PS1, Line 315: if (info) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/39004/1/src/mainboard/emulation/qem... File src/mainboard/emulation/qemu-armv7/mainboard.c:
https://review.coreboot.org/c/coreboot/+/39004/1/src/mainboard/emulation/qem... PS1, Line 45: if (info) { braces {} are not necessary for single statement blocks
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: [WIP]drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/aspeed/common/a... File src/drivers/aspeed/common/ast_mode_corebootfb.c:
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/aspeed/common/a... PS1, Line 256: } Log the failure case?
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#2).
Change subject: [WIP]drivers: Replace a few set_vbe_mode_info_valid ......................................................................
[WIP]drivers: Replace a few set_vbe_mode_info_valid
Replace set_vbe_mode_info_valid with fb_fill_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/soc/nvidia/tegra210/dc.c 5 files changed, 33 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: [WIP]drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39004/2/src/drivers/emulation/qemu/... File src/drivers/emulation/qemu/bochs.c:
https://review.coreboot.org/c/coreboot/+/39004/2/src/drivers/emulation/qemu/... PS2, Line 116: if (info) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/39004/2/src/drivers/emulation/qemu/... File src/drivers/emulation/qemu/cirrus.c:
https://review.coreboot.org/c/coreboot/+/39004/2/src/drivers/emulation/qemu/... PS2, Line 315: if (info) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/39004/2/src/mainboard/emulation/qem... File src/mainboard/emulation/qemu-armv7/mainboard.c:
https://review.coreboot.org/c/coreboot/+/39004/2/src/mainboard/emulation/qem... PS2, Line 45: if (info) { braces {} are not necessary for single statement blocks
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#3).
Change subject: [WIP]drivers: Replace a few set_vbe_mode_info_valid ......................................................................
[WIP]drivers: Replace a few set_vbe_mode_info_valid
Replace set_vbe_mode_info_valid with fb_fill_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/soc/nvidia/tegra210/dc.c 6 files changed, 18 insertions(+), 44 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/3
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#4).
Change subject: [TESTME]drivers: Replace a few set_vbe_mode_info_valid ......................................................................
[TESTME]drivers: Replace a few set_vbe_mode_info_valid
Replace set_vbe_mode_info_valid with fb_fill_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/soc/nvidia/tegra210/dc.c 5 files changed, 17 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/4
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: [TESTME]drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39004/4/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/4/src/soc/nvidia/tegra210/dc.... PS4, Line 231: config->framebuffer_base? It looks like copy-paste residue. The config value is nowhere used, not programmed to the hardware.
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#5).
Change subject: [TESTME]drivers: Replace a few set_vbe_mode_info_valid ......................................................................
[TESTME]drivers: Replace a few 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_fill_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/soc/nvidia/tegra210/dc.c 5 files changed, 17 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/5
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#6).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_fill_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Tested on: * QEMU VGA cirrus * QEMU VGA bochs * Aspeed AST2500 NGI * Lenovo X220 using libgfxinit * Intel FSP2.0 GOP
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/soc/nvidia/tegra210/dc.c 5 files changed, 17 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/6
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 7: Code-Review+1
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... PS7, Line 230: DIV_ROUND_UP(config->framebuffer_bits_per_pixel, 8), 64); I would rather keep this calculation centralized. bytes_per_line is really not a property of the EDID (i.e the display itself) anyway, but rather one of the framebuffer, so it's probably time to clean that up. How about getting rid of that field from struct edid and of edid_set_framebuffer_bits_per_pixel(), and instead add a row_alignment parameter to fb_set_framebuffer_info() and set_vbe_mode_info_valid(), so that the framebuffer code can correctly calculate it internally?
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... PS7, Line 231: //FIXME: Why not config->framebuffer_base? For Arm64 we switched to the payload allocating the framebuffer itself (which became necessary due to MMU changes). config->framebuffer_base is probably a leftover from when this SoC was first forked off the older Arm32 chip, and was never used.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... PS7, Line 231: //FIXME: Why not config->framebuffer_base?
For Arm64 we switched to the payload allocating the framebuffer itself (which became necessary due t […]
Does it make sense to allocate a framebuffer information at all if the payload has it's own code for that?
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... PS7, Line 231: //FIXME: Why not config->framebuffer_base?
Does it make sense to allocate a framebuffer information at all if the payload has it's own code for […]
Well, we definitely need all the other information stuff (height, width, bpp, etc.), because coreboot still configures the display controller and is in charge of figuring all that out. All the payload does is allocate the actual memory for the framebuffer and then do the one hardware access needed to tell that base address to the display controller. (I think there's also the option of coreboot setting config->framebuffer_base and then libpayload will try to reserve memory exactly there if possible. I don't think any of the Chrome OS platforms use it that way, but libpayload supports both.)
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#8).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 19 insertions(+), 65 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/8
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39004/8/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/8/src/soc/nvidia/tegra210/dc.... PS8, Line 233: bytes_per_line, config->framebuffer_bits_per_pixel); Isn't this missing the row alignment field?
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#9).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra210/dc.c 6 files changed, 14 insertions(+), 66 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/9
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#10).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra210/dc.c 6 files changed, 16 insertions(+), 68 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/10
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 10: Code-Review+2
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#11).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 23 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/11
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#12).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 23 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/12
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 13: Code-Review+2
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#16).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 23 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/16
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 16:
(5 comments)
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/aspeed/common/a... File src/drivers/aspeed/common/ast_mode_corebootfb.c:
https://review.coreboot.org/c/coreboot/+/39004/1/src/drivers/aspeed/common/a... PS1, Line 256: }
Log the failure case?
reworked the code, this no longer applies
https://review.coreboot.org/c/coreboot/+/39004/4/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/4/src/soc/nvidia/tegra210/dc.... PS4, Line 231: config->framebuffer_base?
It looks like copy-paste residue. The config value is nowhere used, not […]
Done
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... PS7, Line 230: DIV_ROUND_UP(config->framebuffer_bits_per_pixel, 8), 64);
I would rather keep this calculation centralized. […]
Done
https://review.coreboot.org/c/coreboot/+/39004/7/src/soc/nvidia/tegra210/dc.... PS7, Line 231: //FIXME: Why not config->framebuffer_base?
Well, we definitely need all the other information stuff (height, width, bpp, etc. […]
Done
https://review.coreboot.org/c/coreboot/+/39004/8/src/soc/nvidia/tegra210/dc.... File src/soc/nvidia/tegra210/dc.c:
https://review.coreboot.org/c/coreboot/+/39004/8/src/soc/nvidia/tegra210/dc.... PS8, Line 233: bytes_per_line, config->framebuffer_bits_per_pixel);
Isn't this missing the row alignment field?
Done
Hello build bot (Jenkins), Frans Hendriks, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#18).
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 23 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/18
Christian Walter has uploaded a new patch set (#19) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 26 insertions(+), 66 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/19
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
Patch Set 19:
(7 comments)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... File src/drivers/emulation/qemu/bochs.c:
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 142: <<<<<<< HEAD spaces required around that '<' (ctx:OxW)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 154: ======= spaces required around that '==' (ctx:ExO)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 154: ======= spaces required around that '==' (ctx:OxO)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 154: ======= spaces required around that '==' (ctx:OxO)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 154: ======= spaces required around that '=' (ctx:OxE)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 157: >>>>>>> c7196daa68... drivers: Replace a few set_vbe_mode_info_valid spaces required around that '>' (ctx:OxW)
https://review.coreboot.org/c/coreboot/+/39004/19/src/drivers/emulation/qemu... PS19, Line 157: >>>>>>> c7196daa68... drivers: Replace a few set_vbe_mode_info_valid spaces required around that ':' (ctx:VxW)
Christian Walter has uploaded a new patch set (#20) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 23 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/20
Angel Pons has uploaded a new patch set (#21) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace a few set_vbe_mode_info_valid ......................................................................
drivers: Replace a few 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_set_framebuffer_info, as it doesn't need a complete edid struct as parameter.
The platforms don't read an EDID, anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c 7 files changed, 23 insertions(+), 74 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/21
Hello build bot (Jenkins), Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#23).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 16 files changed, 39 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/23
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 23:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39004/23/src/include/framebuffer_in... File src/include/framebuffer_info.h:
https://review.coreboot.org/c/coreboot/+/39004/23/src/include/framebuffer_in... PS23, Line 25: uintptr_t fb_addr); code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/39004/23/src/include/framebuffer_in... PS23, Line 25: uintptr_t fb_addr); please, no spaces at the start of a line
Hello build bot (Jenkins), Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#25).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 17 files changed, 41 insertions(+), 76 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/25
Hello build bot (Jenkins), Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#26).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 17 files changed, 41 insertions(+), 76 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/26
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 26:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39004/26/src/include/framebuffer_in... File src/include/framebuffer_info.h:
https://review.coreboot.org/c/coreboot/+/39004/26/src/include/framebuffer_in... PS26, Line 25: uintptr_t fb_addr); code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/39004/26/src/include/framebuffer_in... PS26, Line 25: uintptr_t fb_addr); please, no spaces at the start of a line
Hello build bot (Jenkins), Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#28).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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_set_framebuffer_info, as it doesn't need a complete edid struct as paramter.
The platforms doesn't read an EDID anyway.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 17 files changed, 41 insertions(+), 76 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/28
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 28:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39004/28/src/include/framebuffer_in... File src/include/framebuffer_info.h:
https://review.coreboot.org/c/coreboot/+/39004/28/src/include/framebuffer_in... PS28, Line 24: uintptr_t fb_addr); code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/39004/28/src/include/framebuffer_in... PS28, Line 24: uintptr_t fb_addr); please, no spaces at the start of a line
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 28:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39004/28//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39004/28//COMMIT_MSG@24 PS28, Line 24: doesn't don't
https://review.coreboot.org/c/coreboot/+/39004/28//COMMIT_MSG@24 PS28, Line 24: The platforms doesn't read an EDID anyway. Some do, though.
https://review.coreboot.org/c/coreboot/+/39004/28/src/drivers/aspeed/common/... File src/drivers/aspeed/common/ast_mode_corebootfb.c:
https://review.coreboot.org/c/coreboot/+/39004/28/src/drivers/aspeed/common/... PS28, Line 227: edid.framebuffer_bits_per_pixel); Why not use _from_edid() here?
Hello build bot (Jenkins), Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#29).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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_set_framebuffer_info or fb_new_framebuffer_info_from_edid.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 17 files changed, 39 insertions(+), 75 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/29
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 29:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39004/28//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39004/28//COMMIT_MSG@24 PS28, Line 24: The platforms doesn't read an EDID anyway.
Some do, though.
Right, I squashed two commits, so this is no longer true.
https://review.coreboot.org/c/coreboot/+/39004/28//COMMIT_MSG@24 PS28, Line 24: doesn't
don't
Done
https://review.coreboot.org/c/coreboot/+/39004/28/src/drivers/aspeed/common/... File src/drivers/aspeed/common/ast_mode_corebootfb.c:
https://review.coreboot.org/c/coreboot/+/39004/28/src/drivers/aspeed/common/... PS28, Line 227: edid.framebuffer_bits_per_pixel);
Why not use _from_edid() here?
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 29: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 30: Code-Review+1
(1 comment)
Marked one more low hanging fruit. Ideally, we'd get rid of all framebuffer infos inside `struct edid`. If somebody wants to tackle that? Most of the left _edid cases only write the info into `struct edid` to pass it to fb_new_framebuffer_ info_from_edid(). But that's for another patch.
https://review.coreboot.org/c/coreboot/+/39004/30/src/soc/nvidia/tegra124/di... File src/soc/nvidia/tegra124/display.c:
https://review.coreboot.org/c/coreboot/+/39004/30/src/soc/nvidia/tegra124/di... PS30, Line 316: struct edid edid; : edid.mode.va = config->yres; : edid.mode.ha = config->xres; : edid_set_framebuffer_bits_per_pixel(&edid, : config->framebuffer_bits_per_pixel, 32); : fb_new_framebuffer_info_from_edid(&edid, (uintptr_t)(framebuffer_base_mb*MiB)); This looks like another case for fb_add_framebuffer_info().
Hello build bot (Jenkins), Nico Huber, Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#31).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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_set_framebuffer_info or fb_new_framebuffer_info_from_edid.
Change-Id: I95d1d62385a201c68c6c2527c023ad2292a235c5 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 17 files changed, 43 insertions(+), 80 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/31
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39004/30/src/soc/nvidia/tegra124/di... File src/soc/nvidia/tegra124/display.c:
https://review.coreboot.org/c/coreboot/+/39004/30/src/soc/nvidia/tegra124/di... PS30, Line 316: struct edid edid; : edid.mode.va = config->yres; : edid.mode.ha = config->xres; : edid_set_framebuffer_bits_per_pixel(&edid, : config->framebuffer_bits_per_pixel, 32); : fb_new_framebuffer_info_from_edid(&edid, (uintptr_t)(framebuffer_base_mb*MiB));
This looks like another case for fb_add_framebuffer_info().
Done
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 31:
please also change src/mainboard/google/asurada/mainboard.c
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 31:
Patch Set 31:
please also change src/mainboard/google/asurada/mainboard.c
Why does it even build? The function prototype is gone, so this should *not* compile.
Hello build bot (Jenkins), Nico Huber, Frans Hendriks, Christian Walter, Angel Pons, Julius Werner, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39004
to look at the new patch set (#32).
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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 patrick.rudolph@9elements.com --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/asurada/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 18 files changed, 45 insertions(+), 81 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/39004/32
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
Patch Set 32: Code-Review+2
please also change src/mainboard/google/asurada/mainboard.c
Why does it even build? The function prototype is gone, so this should *not* compile.
Because we just merged it very recently, so the last time buildbot verifies your change it didn't see that.
Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39004 )
Change subject: drivers: Replace set_vbe_mode_info_valid ......................................................................
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 patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/39004 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Hung-Te Lin hungte@chromium.org --- M src/drivers/aspeed/common/ast_mode_corebootfb.c M src/drivers/emulation/qemu/bochs.c M src/drivers/emulation/qemu/cirrus.c M src/include/edid.h M src/include/framebuffer_info.h M src/lib/edid_fill_fb.c M src/mainboard/emulation/qemu-armv7/mainboard.c M src/mainboard/google/asurada/mainboard.c M src/mainboard/google/daisy/mainboard.c M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/oak/mainboard.c M src/mainboard/google/peach_pit/mainboard.c M src/mainboard/google/trogdor/mainboard.c M src/northbridge/intel/i945/gma.c M src/soc/nvidia/tegra124/display.c M src/soc/nvidia/tegra210/dc.c M src/soc/rockchip/rk3288/display.c M src/soc/rockchip/rk3399/display.c 18 files changed, 45 insertions(+), 81 deletions(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved
diff --git a/src/drivers/aspeed/common/ast_mode_corebootfb.c b/src/drivers/aspeed/common/ast_mode_corebootfb.c index bb30d20..b25d742 100644 --- a/src/drivers/aspeed/common/ast_mode_corebootfb.c +++ b/src/drivers/aspeed/common/ast_mode_corebootfb.c @@ -6,6 +6,7 @@ #include <console/console.h> #include <edid.h> #include <device/pci_def.h> +#include <framebuffer_info.h>
#include "ast_drv.h"
@@ -200,7 +201,7 @@ return ret; }
- /* Updated edid for set_vbe_mode_info_valid */ + /* Updated edid for fb_fill_framebuffer_info */ edid.x_resolution = edid.mode.ha; edid.y_resolution = edid.mode.va; edid.framebuffer_bits_per_pixel = format.cpp[0] * 8; @@ -227,7 +228,7 @@ ast_hide_cursor(&crtc);
/* Advertise new mode */ - set_vbe_mode_info_valid(&edid, fb.mmio_addr); + fb_new_framebuffer_info_from_edid(&edid, fb.mmio_addr);
/* Clear display */ memset((void *)(uintptr_t)fb.mmio_addr, 0, edid.bytes_per_line * edid.y_resolution); diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c index 5a6603e..73fa19e 100644 --- a/src/drivers/emulation/qemu/bochs.c +++ b/src/drivers/emulation/qemu/bochs.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <stdint.h> -#include <edid.h> #include <arch/io.h> #include <console/console.h> #include <device/device.h> @@ -10,6 +9,7 @@ #include <device/pci_ids.h> #include <pc80/vga.h> #include <pc80/vga_io.h> +#include <framebuffer_info.h>
/* VGA init. We use the Bochs VESA VBE extensions */ #define VBE_DISPI_IOPORT_INDEX 0x01CE @@ -82,7 +82,6 @@
static void bochs_init_linear_fb(struct device *dev) { - struct edid edid; struct resource *res_fb, *res_io; int id, mem, bar;
@@ -139,13 +138,8 @@
bochs_vga_write(res_io, 0, 0x20); /* disable blanking */
- /* setup coreboot framebuffer */ - edid.mode.ha = width; - edid.mode.va = height; - edid.panel_bits_per_color = 8; - edid.panel_bits_per_pixel = 24; - edid_set_framebuffer_bits_per_pixel(&edid, 32, 0); - set_vbe_mode_info_valid(&edid, res_fb->base); + /* Advertise new mode */ + fb_add_framebuffer_info(res_fb->base, width, height, 4 * width, 32); }
static void bochs_init_text_mode(struct device *dev) diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c index d63f490..d9e0e1b 100644 --- a/src/drivers/emulation/qemu/cirrus.c +++ b/src/drivers/emulation/qemu/cirrus.c @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <stdint.h> -#include <edid.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> #include <device/pci_ops.h> #include <pc80/vga.h> #include <pc80/vga_io.h> +#include <framebuffer_info.h>
static int width = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES; static int height = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES; @@ -299,13 +299,7 @@ vga_sr_write (CIRRUS_SR_EXTENDED_MODE, sr_ext); write_hidden_dac (hidden_dac);
- struct edid edid; - edid.mode.ha = width; - edid.mode.va = height; - edid.panel_bits_per_color = 8; - edid.panel_bits_per_pixel = 24; - edid_set_framebuffer_bits_per_pixel(&edid, 32, 0); - set_vbe_mode_info_valid(&edid, addr); + fb_add_framebuffer_info(addr, width, height, 4 * width, 32); }
static void cirrus_init_text_mode(struct device *dev) diff --git a/src/include/edid.h b/src/include/edid.h index 3644e6a..691cf76 100644 --- a/src/include/edid.h +++ b/src/include/edid.h @@ -96,8 +96,6 @@ int decode_edid(unsigned char *edid, int size, struct edid *out); void edid_set_framebuffer_bits_per_pixel(struct edid *edid, int fb_bpp, int row_byte_alignment); -struct fb_info *set_vbe_mode_info_valid(const struct edid *edid, uintptr_t fb_addr); -void set_vbe_framebuffer_orientation(enum lb_fb_orientation orientation); int set_display_mode(struct edid *edid, enum edid_modes mode);
#endif /* EDID_H */ diff --git a/src/include/framebuffer_info.h b/src/include/framebuffer_info.h index 5251f29..07ddd31 100644 --- a/src/include/framebuffer_info.h +++ b/src/include/framebuffer_info.h @@ -19,4 +19,8 @@ void fb_set_orientation(struct fb_info *info, enum lb_fb_orientation orientation);
+struct edid; +struct fb_info *fb_new_framebuffer_info_from_edid(const struct edid *edid, + uintptr_t fb_addr); + #endif /* __FRAMEBUFFER_INFO_H_ */ diff --git a/src/lib/edid_fill_fb.c b/src/lib/edid_fill_fb.c index 1e8cc5a..712cd0f 100644 --- a/src/lib/edid_fill_fb.c +++ b/src/lib/edid_fill_fb.c @@ -153,7 +153,8 @@ /* * Take an edid, and create a framebuffer. */ -struct fb_info *set_vbe_mode_info_valid(const struct edid *edid, uintptr_t fb_addr) +struct fb_info *fb_new_framebuffer_info_from_edid(const struct edid *edid, + uintptr_t fb_addr) { return fb_add_framebuffer_info(fb_addr, edid->x_resolution, edid->y_resolution, edid->bytes_per_line, edid->framebuffer_bits_per_pixel); diff --git a/src/mainboard/emulation/qemu-armv7/mainboard.c b/src/mainboard/emulation/qemu-armv7/mainboard.c index 977725d..c3d974c 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 @@ 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 8e7f2e8..f836724 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 @@ 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 2f07937..1df786d 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 @@
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 216b6f4..a197a7f 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -169,7 +169,7 @@ 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 e89bc6b..cd17ede 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 @@ }
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 85c0407..ab3c0f5 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 @@
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 54d8b0d..0f469e0 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 @@ /* 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"); } diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index 118d02c..b396eff 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -19,6 +19,7 @@ #include <pc80/vga_io.h> #include <commonlib/helpers.h> #include <types.h> +#include <framebuffer_info.h>
#include "i945.h" #include "chip.h" @@ -358,7 +359,7 @@ (void *)pgfx, hactive * vactive * 4); memset((void *)pgfx, 0x00, hactive * vactive * 4);
- set_vbe_mode_info_valid(&edid, pgfx); + fb_new_framebuffer_info_from_edid(&edid, pgfx); } else { vga_misc_write(0x67);
diff --git a/src/soc/nvidia/tegra124/display.c b/src/soc/nvidia/tegra124/display.c index 485e032..5935d0d 100644 --- a/src/soc/nvidia/tegra124/display.c +++ b/src/soc/nvidia/tegra124/display.c @@ -14,6 +14,7 @@ #include <soc/nvidia/tegra/pwm.h> #include <stdint.h> #include <string.h> +#include <framebuffer_info.h>
#include "chip.h"
@@ -312,10 +313,9 @@
/* tell depthcharge ... */ - struct edid edid; - edid.mode.va = config->yres; - edid.mode.ha = config->xres; - edid_set_framebuffer_bits_per_pixel(&edid, - config->framebuffer_bits_per_pixel, 32); - set_vbe_mode_info_valid(&edid, (uintptr_t)(framebuffer_base_mb*MiB)); + const uint32_t bytes_per_line = ALIGN_UP(config->xres * + DIV_ROUND_UP(config->framebuffer_bits_per_pixel, 8), 32); + + fb_add_framebuffer_info(framebuffer_base_mb*MiB, config->xres, config->yres, + bytes_per_line, config->framebuffer_bits_per_pixel); } diff --git a/src/soc/nvidia/tegra210/dc.c b/src/soc/nvidia/tegra210/dc.c index 8625f76..0c54f7a 100644 --- a/src/soc/nvidia/tegra210/dc.c +++ b/src/soc/nvidia/tegra210/dc.c @@ -3,10 +3,10 @@ #include <console/console.h> #include <device/mmio.h> #include <stdint.h> -#include <edid.h> #include <device/device.h> #include <soc/nvidia/tegra/dc.h> #include <soc/display.h> +#include <framebuffer_info.h>
#include "chip.h"
@@ -212,19 +212,9 @@ void pass_mode_info_to_payload( struct soc_nvidia_tegra210_config *config) { - struct edid edid; - - edid.mode.va = config->display_yres; - edid.mode.ha = config->display_xres; - edid_set_framebuffer_bits_per_pixel(&edid, - config->framebuffer_bits_per_pixel, 64); - - printk(BIOS_INFO, "%s: bytes_per_line: %d, bits_per_pixel: %d\n " - " x_res x y_res: %d x %d, size: %d\n", - __func__, edid.bytes_per_line, - edid.framebuffer_bits_per_pixel, - edid.x_resolution, edid.y_resolution, - (edid.bytes_per_line * edid.y_resolution)); - - set_vbe_mode_info_valid(&edid, 0); + const uint32_t bytes_per_line = ALIGN_UP(config->display_xres * + DIV_ROUND_UP(config->framebuffer_bits_per_pixel, 8), 64); + /* The framebuffer address is zero to let the payload allocate it */ + fb_add_framebuffer_info(0, config->display_xres, config->display_yres, + bytes_per_line, config->framebuffer_bits_per_pixel); } diff --git a/src/soc/rockchip/rk3288/display.c b/src/soc/rockchip/rk3288/display.c index fd86b95..19a75de 100644 --- a/src/soc/rockchip/rk3288/display.c +++ b/src/soc/rockchip/rk3288/display.c @@ -17,6 +17,7 @@ #include <soc/grf.h> #include <soc/soc.h> #include <soc/vop.h> +#include <framebuffer_info.h>
#include "chip.h"
@@ -124,5 +125,5 @@ break; }
- set_vbe_mode_info_valid(&edid, (uintptr_t)lcdbase); + fb_new_framebuffer_info_from_edid(&edid, (uintptr_t)lcdbase); } diff --git a/src/soc/rockchip/rk3399/display.c b/src/soc/rockchip/rk3399/display.c index 70e8c7c..1d263ef 100644 --- a/src/soc/rockchip/rk3399/display.c +++ b/src/soc/rockchip/rk3399/display.c @@ -18,6 +18,7 @@ #include <soc/mipi.h> #include <soc/soc.h> #include <soc/vop.h> +#include <framebuffer_info.h>
#include "chip.h"
@@ -160,7 +161,7 @@ break; } mainboard_power_on_backlight(); - set_vbe_mode_info_valid(&edid, (uintptr_t)0); + fb_new_framebuffer_info_from_edid(&edid, (uintptr_t)0);
return; }