Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: [WIP]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
[WIP]drivers: Replace multiple fill_fb_framebuffer with single instance
Replace all duplications of fill_fb_framebuffer and provide a single one. Should not change the current behaviour.
TODO: Libgfxinit seems to expose one,too
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 8 files changed, 111 insertions(+), 185 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/1
diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c index 8ba0241..4c11e6f 100644 --- a/src/device/oprom/realmode/x86.c +++ b/src/device/oprom/realmode/x86.c @@ -23,6 +23,7 @@ #include <pc80/i8254.h> #include <string.h> #include <vbe.h> +#include <framebuffer_info.h>
/* we use x86emu's register file representation */ #include <x86emu/regs.h> @@ -218,6 +219,7 @@ #if CONFIG(FRAMEBUFFER_SET_VESA_MODE) static vbe_mode_info_t mode_info; static int mode_info_valid; +static struct edid_fb_info *fb_info;
static int vbe_mode_info_valid(void) { @@ -362,6 +364,28 @@ }
vbe_set_mode(&mode_info); + + if (!vbe_mode_info_valid()) + return; + + if (!fb_info) { + fb_info = fb_new_framebuffer_info(); + } + if (fb_info) { + fb_fill_framebuffer_info_ex(fb_info, mode_info.vesa.phys_base_ptr, + le16_to_cpu(mode_info.vesa.x_resolution), + le16_to_cpu(mode_info.vesa.y_resolution), + le16_to_cpu(mode_info.vesa.bytes_per_scanline), + mode_info.vesa.bits_per_pixel, + mode_info.vesa.reserved_mask_pos, + mode_info.vesa.reserved_mask_size, + mode_info.vesa.red_mask_pos, + mode_info.vesa.red_mask_size, + mode_info.vesa.green_mask_pos, + mode_info.vesa.green_mask_size, + mode_info.vesa.blue_mask_pos, + mode_info.vesa.blue_mask_size); + } }
void vbe_textmode_console(void) @@ -373,34 +397,6 @@ die("\nError: In %s function\n", __func__); }
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - if (!vbe_mode_info_valid()) - return -1; - - framebuffer->physical_address = mode_info.vesa.phys_base_ptr; - - framebuffer->x_resolution = le16_to_cpu(mode_info.vesa.x_resolution); - framebuffer->y_resolution = le16_to_cpu(mode_info.vesa.y_resolution); - framebuffer->bytes_per_line = - le16_to_cpu(mode_info.vesa.bytes_per_scanline); - framebuffer->bits_per_pixel = mode_info.vesa.bits_per_pixel; - - framebuffer->red_mask_pos = mode_info.vesa.red_mask_pos; - framebuffer->red_mask_size = mode_info.vesa.red_mask_size; - - framebuffer->green_mask_pos = mode_info.vesa.green_mask_pos; - framebuffer->green_mask_size = mode_info.vesa.green_mask_size; - - framebuffer->blue_mask_pos = mode_info.vesa.blue_mask_pos; - framebuffer->blue_mask_size = mode_info.vesa.blue_mask_size; - - framebuffer->reserved_mask_pos = mode_info.vesa.reserved_mask_pos; - framebuffer->reserved_mask_size = mode_info.vesa.reserved_mask_size; - - return 0; -} - #endif
void run_bios(struct device *dev, unsigned long addr) diff --git a/src/device/oprom/yabel/vbe.c b/src/device/oprom/yabel/vbe.c index a3d736f..2c05338 100644 --- a/src/device/oprom/yabel/vbe.c +++ b/src/device/oprom/yabel/vbe.c @@ -162,6 +162,7 @@ }
static int mode_info_valid; +static struct edid_fb_info *fb_info;
static int vbe_mode_info_valid(void) { @@ -747,33 +748,28 @@ mode_info.video_mode = (1 << 14) | CONFIG_FRAMEBUFFER_VESA_MODE; vbe_get_mode_info(&mode_info); vbe_set_mode(&mode_info); -}
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ if (!vbe_mode_info_valid()) - return -1; + return;
- framebuffer->physical_address = le32_to_cpu(mode_info.vesa.phys_base_ptr); - - framebuffer->x_resolution = le16_to_cpu(mode_info.vesa.x_resolution); - framebuffer->y_resolution = le16_to_cpu(mode_info.vesa.y_resolution); - framebuffer->bytes_per_line = le16_to_cpu(mode_info.vesa.bytes_per_scanline); - framebuffer->bits_per_pixel = mode_info.vesa.bits_per_pixel; - - framebuffer->red_mask_pos = mode_info.vesa.red_mask_pos; - framebuffer->red_mask_size = mode_info.vesa.red_mask_size; - - framebuffer->green_mask_pos = mode_info.vesa.green_mask_pos; - framebuffer->green_mask_size = mode_info.vesa.green_mask_size; - - framebuffer->blue_mask_pos = mode_info.vesa.blue_mask_pos; - framebuffer->blue_mask_size = mode_info.vesa.blue_mask_size; - - framebuffer->reserved_mask_pos = mode_info.vesa.reserved_mask_pos; - framebuffer->reserved_mask_size = mode_info.vesa.reserved_mask_size; - - return 0; + if (!fb_info) { + fb_info = fb_new_framebuffer_info(); + } + if (fb_info) { + fb_fill_framebuffer_info_ex(fb_info, mode_info.vesa.phys_base_ptr, + le16_to_cpu(mode_info.vesa.x_resolution), + le16_to_cpu(mode_info.vesa.y_resolution), + le16_to_cpu(mode_info.vesa.bytes_per_scanline), + mode_info.vesa.bits_per_pixel, + mode_info.vesa.reserved_mask_pos, + mode_info.vesa.reserved_mask_size, + mode_info.vesa.red_mask_pos, + mode_info.vesa.red_mask_size, + mode_info.vesa.green_mask_pos, + mode_info.vesa.green_mask_size, + mode_info.vesa.blue_mask_pos, + mode_info.vesa.blue_mask_size); + } }
void vbe_textmode_console(void) diff --git a/src/drivers/intel/fsp1_1/fsp_gop.c b/src/drivers/intel/fsp1_1/fsp_gop.c index eb64151..9b555e6 100644 --- a/src/drivers/intel/fsp1_1/fsp_gop.c +++ b/src/drivers/intel/fsp1_1/fsp_gop.c @@ -12,10 +12,12 @@ */
#include <boot/coreboot_tables.h> +#include <bootstate.h> #include <console/console.h> +#include <framebuffer_info.h> #include <fsp/util.h>
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) +static void fill_framebuffer_info(void *unused) { VOID *hob_list_ptr; hob_list_ptr = get_hob_list(); @@ -30,20 +32,15 @@ printk(BIOS_DEBUG, "FSP_DEBUG: Graphics Data HOB present\n"); vbt_gop = GET_GUID_HOB_DATA(vbt_hob);
- framebuffer->physical_address = vbt_gop->FrameBufferBase; - framebuffer->x_resolution = vbt_gop->GraphicsMode.HorizontalResolution; - framebuffer->y_resolution = vbt_gop->GraphicsMode.VerticalResolution; - framebuffer->bytes_per_line = vbt_gop->GraphicsMode.PixelsPerScanLine - * 4; - 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 = 24; - framebuffer->reserved_mask_size = 8; + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (!info) + return;
- return 0; + fb_fill_framebuffer_info(info, vbt_gop->FrameBufferBase, + vbt_gop->GraphicsMode.HorizontalResolution, + vbt_gop->GraphicsMode.VerticalResolution, + vbt_gop->GraphicsMode.PixelsPerScanLine * 4, + 32); } + +BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, fill_framebuffer_info, NULL); diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index be7afdb..f35556f 100644 --- a/src/drivers/intel/fsp2_0/graphics.c +++ b/src/drivers/intel/fsp2_0/graphics.c @@ -17,6 +17,7 @@ #include <fsp/util.h> #include <soc/intel/common/vbt.h> #include <types.h> +#include <framebuffer_info.h>
enum pixel_format { pixel_rgbx_8bpc = 0, @@ -58,48 +59,18 @@ [pixel_bgrx_8bpc] = { {16, 8}, {8, 8}, {0, 8}, {24, 8} }, };
-enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer) +__weak uintptr_t fsp_soc_get_igd_bar(void) { - size_t size; - const struct hob_graphics_info *ginfo; - const struct fsp_framebuffer *fbinfo; - - ginfo = fsp_find_extension_hob_by_guid(fsp_graphics_info_guid, &size); - - if (!ginfo) { - printk(BIOS_ALERT, "Graphics hand-off block not found\n"); - return CB_ERR; - } - - if (ginfo->pixel_format >= ARRAY_SIZE(fsp_framebuffer_format_map)) { - printk(BIOS_ALERT, "FSP set unknown framebuffer format: %d\n", - ginfo->pixel_format); - return CB_ERR; - } - - fbinfo = fsp_framebuffer_format_map + ginfo->pixel_format; - - framebuffer->physical_address = ginfo->framebuffer_base; - framebuffer->x_resolution = ginfo->horizontal_resolution; - framebuffer->y_resolution = ginfo->vertical_resolution; - framebuffer->bytes_per_line = ginfo->pixels_per_scanline * 4; - framebuffer->bits_per_pixel = 32; - framebuffer->red_mask_pos = fbinfo->red.pos; - framebuffer->red_mask_size = fbinfo->red.size; - framebuffer->green_mask_pos = fbinfo->green.pos; - framebuffer->green_mask_size = fbinfo->green.size; - framebuffer->blue_mask_pos = fbinfo->blue.pos; - framebuffer->blue_mask_size = fbinfo->blue.size; - framebuffer->reserved_mask_pos = fbinfo->rsvd.pos; - framebuffer->reserved_mask_size = fbinfo->rsvd.pos; - - return CB_SUCCESS; + return 0; }
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) +static void fill_framebuffer_info(void *unused) { + size_t size; enum cb_err ret; uintptr_t framebuffer_bar; + const struct hob_graphics_info *ginfo; + const struct fsp_framebuffer *fbinfo;
/* Pci enumeration happens after silicon init. * After enumeration graphic framebuffer base may be relocated. @@ -109,24 +80,44 @@
if (!framebuffer_bar) { printk(BIOS_ALERT, "Framebuffer BAR invalid\n"); - return -1; - } - - ret = fsp_fill_lb_framebuffer(framebuffer); - if (ret != CB_SUCCESS) { - printk(BIOS_ALERT, "FSP did not return a valid framebuffer\n"); - return -1; + return; }
/* Resource allocator can move the BAR around after FSP configures it */ - framebuffer->physical_address = framebuffer_bar; - printk(BIOS_DEBUG, "Graphics framebuffer located at 0x%llx\n", - framebuffer->physical_address); + printk(BIOS_DEBUG, "Graphics framebuffer located at 0x%llx\n", framebuffer_bar);
- return 0; + ginfo = fsp_find_extension_hob_by_guid(fsp_graphics_info_guid, &size); + + if (!ginfo) { + printk(BIOS_ALERT, "Graphics hand-off block not found\n"); + return; + } + + if (ginfo->pixel_format >= ARRAY_SIZE(fsp_framebuffer_format_map)) { + printk(BIOS_ALERT, "FSP set unknown framebuffer format: %d\n", + ginfo->pixel_format); + return; + } + + fbinfo = fsp_framebuffer_format_map + ginfo->pixel_format; + + struct edid_fb_info *info = fb_new_framebuffer_info(); + if (!info) + return; + + fb_fill_framebuffer_info_ex(fb_info, ginfo->framebuffer_base, + ginfo->horizontal_resolution, + ginfo->vertical_resolution, + ginfo->pixels_per_scanline * 4, + 32, + fbinfo->rsvd.pos, + fbinfo->rsvd.size, + fbinfo->red.pos, + fbinfo->red.size, + fbinfo->green.pos, + fbinfo->green.size, + fbinfo->blue.pos, + fbinfo->blue.size); }
-__weak uintptr_t fsp_soc_get_igd_bar(void) -{ - return 0; -} +BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, fill_framebuffer_info, NULL); diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index 303bafe..15e7390 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -76,7 +76,6 @@ void *fsp_get_hob_list_ptr(void); const void *fsp_find_extension_hob_by_guid(const uint8_t *guid, size_t *size); const void *fsp_find_nv_storage_data(size_t *size); -enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer); int fsp_find_range_hob(struct range_entry *re, const uint8_t guid[16]); void fsp_display_fvi_version_hob(void); void fsp_find_reserved_memory(struct range_entry *re); diff --git a/src/drivers/xgi/common/xgi_coreboot.c b/src/drivers/xgi/common/xgi_coreboot.c index d65e007..235cbe2 100644 --- a/src/drivers/xgi/common/xgi_coreboot.c +++ b/src/drivers/xgi/common/xgi_coreboot.c @@ -21,6 +21,7 @@ #include <device/pci_ids.h> #include <device/pci_ops.h> #include <pc80/vga.h> +#include <framebuffer_info.h>
#include "xgi_coreboot.h" #include "vstruct.h" @@ -31,8 +32,7 @@ #include "vb_setmode.h" #include "XGI_main.c"
-static int xgi_vbe_valid; -static struct lb_framebuffer xgi_fb; +static struct edid_fb_info *fb_info;
int xgifb_probe(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info) { @@ -359,43 +359,16 @@ XGIbios_mode[xgifb_info->mode_idx].bpp, xgifb_info->refresh_rate);
- /* Set LinuxBIOS framebuffer information */ - xgi_vbe_valid = 1; - xgi_fb.physical_address = xgifb_info->video_base; - xgi_fb.x_resolution = xgifb_info->video_width; - xgi_fb.y_resolution = xgifb_info->video_height; - xgi_fb.bytes_per_line = - xgifb_info->video_width * xgifb_info->video_bpp; - xgi_fb.bits_per_pixel = xgifb_info->video_bpp; - - xgi_fb.reserved_mask_pos = 0; - xgi_fb.reserved_mask_size = 0; - switch (xgifb_info->video_bpp) { - case 32: - case 24: - /* packed into 4-byte words */ - xgi_fb.reserved_mask_pos = 24; - xgi_fb.reserved_mask_size = 8; - xgi_fb.red_mask_pos = 16; - xgi_fb.red_mask_size = 8; - xgi_fb.green_mask_pos = 8; - xgi_fb.green_mask_size = 8; - xgi_fb.blue_mask_pos = 0; - xgi_fb.blue_mask_size = 8; - break; - case 16: - /* packed into 2-byte words */ - xgi_fb.red_mask_pos = 11; - xgi_fb.red_mask_size = 5; - xgi_fb.green_mask_pos = 5; - xgi_fb.green_mask_size = 6; - xgi_fb.blue_mask_pos = 0; - xgi_fb.blue_mask_size = 5; - break; - default: - printk(BIOS_SPEW, "%s: unsupported BPP %d\n", __func__, - xgifb_info->video_bpp); - xgi_vbe_valid = 0; + /* Set framebuffer information */ + if (!fb_info) { + fb_info = fb_new_framebuffer_info(); + } + if (fb_info) { + fb_fill_framebuffer_info(fb_info, xgifb_info->video_base, + xgifb_info->video_width, + xgifb_info->video_height, + xgifb_info->video_width * xgifb_info->video_bpp, + xgifb_info->video_bpp); } } else { /* @@ -415,22 +388,6 @@
return 0; } - -static int vbe_mode_info_valid(void) -{ - return xgi_vbe_valid; -} - -int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - if (!vbe_mode_info_valid()) - return -1; - - *framebuffer = xgi_fb; - - return 0; -} - struct xgifb_video_info *xgifb_video_info_ptr;
struct xgifb_video_info *pci_get_drvdata(struct pci_dev *pdev) { diff --git a/src/lib/Kconfig b/src/lib/Kconfig index dd9974a..d831975 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -5,14 +5,6 @@ implementation. This activates a stub that logs the missing board reset and halts execution.
-config NO_EDID_FILL_FB - bool - default y if !MAINBOARD_DO_NATIVE_VGA_INIT - help - Don't include default fill_lb_framebuffer() implementation. Select - this if your drivers uses MAINBOARD_DO_NATIVE_VGA_INIT but provides - its own fill_lb_framebuffer() implementation. - config RAMSTAGE_ADA bool help diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 2333f64..a1fb8c2 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -134,9 +134,7 @@ ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c ramstage-$(CONFIG_COVERAGE) += libgcov.c ramstage-y += edid.c -ifneq ($(CONFIG_NO_EDID_FILL_FB),y) ramstage-y += edid_fill_fb.c -endif ramstage-y += memrange.c ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: [WIP]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39003/1/src/device/oprom/realmode/x... File src/device/oprom/realmode/x86.c:
https://review.coreboot.org/c/coreboot/+/39003/1/src/device/oprom/realmode/x... PS1, Line 371: if (!fb_info) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/39003/1/src/device/oprom/yabel/vbe.... File src/device/oprom/yabel/vbe.c:
https://review.coreboot.org/c/coreboot/+/39003/1/src/device/oprom/yabel/vbe.... PS1, Line 755: if (!fb_info) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/39003/1/src/drivers/xgi/common/xgi_... File src/drivers/xgi/common/xgi_coreboot.c:
https://review.coreboot.org/c/coreboot/+/39003/1/src/drivers/xgi/common/xgi_... PS1, Line 363: if (!fb_info) { braces {} are not necessary for single statement blocks
Hello Patrick Rudolph, Huang Jin, Lee Leahy, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#2).
Change subject: [WIP]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
[WIP]drivers: Replace multiple fill_fb_framebuffer with single instance
Replace all duplications of fill_fb_framebuffer and provide a single one. Should not change the current behaviour.
TODO: Libgfxinit seems to expose one,too
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 9 files changed, 109 insertions(+), 184 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/2
Hello Patrick Rudolph, Huang Jin, Lee Leahy, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#3).
Change subject: [WIP]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
[WIP]drivers: Replace multiple fill_fb_framebuffer with single instance
Replace all duplications of fill_fb_framebuffer and provide a single one. Should not change the current behaviour.
TODO: Libgfxinit seems to expose one,too
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 138 insertions(+), 250 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/3
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: [WIP]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/3/src/drivers/intel/gma/hires... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/3/src/drivers/intel/gma/hires... PS3, Line 101: tab
Hello Patrick Rudolph, Huang Jin, Lee Leahy, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#4).
Change subject: [TESTME]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
[TESTME]drivers: Replace multiple fill_fb_framebuffer with single instance
Replace all duplications of fill_fb_framebuffer and provide a single one. Should not change the current behaviour.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 144 insertions(+), 253 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/4
Hello Patrick Rudolph, Huang Jin, Lee Leahy, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#5).
Change subject: [TESTME]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
[TESTME]drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 144 insertions(+), 253 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/5
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: [TESTME]drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/3/src/drivers/intel/gma/hires... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/3/src/drivers/intel/gma/hires... PS3, Line 101:
tab
Done
Hello Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Subrata Banik, Huang Jin, Lee Leahy, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#6).
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Tested on: * QEMU VGA cirrus * QEMU VGA bochs * Aspeed AST2500 NGI * Lenovo X220 using libgfxinit * Intel FSP2.0 GOP
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 144 insertions(+), 253 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/6
Hello Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Subrata Banik, Huang Jin, Lee Leahy, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#7).
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Tested on: * QEMU VGA cirrus * QEMU VGA bochs * Aspeed AST2500 NGI * Lenovo X220 using libgfxinit * Intel FSP2.0 GOP
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 144 insertions(+), 253 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/7
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 7: Code-Review+1
Tested on Facebook FBG1701
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/7/src/drivers/xgi/common/xgi_... File src/drivers/xgi/common/xgi_coreboot.c:
https://review.coreboot.org/c/coreboot/+/39003/7/src/drivers/xgi/common/xgi_... PS7, Line 363: if (!fb_info) Is there any reason to do all this rather than just using fb_set_framebuffer_info() here? It doesn't look to me like this function will get called more than once.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/7/src/drivers/xgi/common/xgi_... File src/drivers/xgi/common/xgi_coreboot.c:
https://review.coreboot.org/c/coreboot/+/39003/7/src/drivers/xgi/common/xgi_... PS7, Line 363: if (!fb_info)
Is there any reason to do all this rather than just using fb_set_framebuffer_info() here? It doesn't […]
You are right it's only called once and fb_set_framebuffer_info can be used here.
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#8).
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 140 insertions(+), 255 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/8
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/7/src/drivers/xgi/common/xgi_... File src/drivers/xgi/common/xgi_coreboot.c:
https://review.coreboot.org/c/coreboot/+/39003/7/src/drivers/xgi/common/xgi_... PS7, Line 363: if (!fb_info)
You are right it's only called once and fb_set_framebuffer_info can be used here.
Done
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#10).
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/drivers/xgi/common/Kconfig M src/drivers/xgi/common/xgi_coreboot.c M src/lib/Kconfig M src/lib/Makefile.inc 12 files changed, 124 insertions(+), 257 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/10
Wim Vervoorn has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 13: Code-Review+1
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 15:
(6 comments)
https://review.coreboot.org/c/coreboot/+/39003/15/src/device/oprom/realmode/... File src/device/oprom/realmode/x86.c:
https://review.coreboot.org/c/coreboot/+/39003/15/src/device/oprom/realmode/... PS15, Line 357: if (!vbe_mode_info_valid()) : return; This is redundant now. We know it is valid, because we just set it. In fill_lb_framebuffer(), it was only necessary because we didn't know if this code ran.
https://review.coreboot.org/c/coreboot/+/39003/15/src/device/oprom/realmode/... PS15, Line 372: mode_info.vesa.blue_mask_size); Passing a struct would really make this less error-prone. I guess we could even write it like this:
fb_add_framebuffer_info_ex((struct lb_framebuffer){ .bits_per_pixel = modeinfo.vesa.bits_per_pixel, ... });
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp1_1/f... File src/drivers/intel/fsp1_1/fsp_gop.c:
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp1_1/f... PS15, Line 32: BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, fill_framebuffer_info, NULL); How about calling it from fsp_run_silicon_init() along with the gfx_set_init_done() call there?
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp2_0/g... PS15, Line 119: BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, fill_framebuffer_info, NULL); At end of fsp_silicon_init()?
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/gma/hire... PS15, Line 35: end fb_add_framebuffer_info; What's the purpose of this function? Can't we just call the C function directly, below?
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/gma/hire... PS15, Line 106: end if; Would be nicer to have only one `if` and call the C function directly, e.g.
if (linear_fb_addr /= 0) then c_fb_add_framebuffer_info (fb_addr => Interfaces.C.size_t (linear_fb_addr), x_resolution => word32 (fb.Width), y_resolution => word32 (fb.Height), bytes_per_line => word32 (fb.Stride) * 4, bits_per_pixel => 32); lightup_ok := 1; else lightup_ok := 0; end if;
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#16).
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 122 insertions(+), 225 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/16
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 16:
(5 comments)
https://review.coreboot.org/c/coreboot/+/39003/15/src/device/oprom/realmode/... File src/device/oprom/realmode/x86.c:
https://review.coreboot.org/c/coreboot/+/39003/15/src/device/oprom/realmode/... PS15, Line 357: if (!vbe_mode_info_valid()) : return;
This is redundant now. We know it is valid, because we just set it. In […]
Done
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp1_1/f... File src/drivers/intel/fsp1_1/fsp_gop.c:
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp1_1/f... PS15, Line 32: BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, fill_framebuffer_info, NULL);
How about calling it from fsp_run_silicon_init() along with the […]
Done
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/fsp2_0/g... PS15, Line 119: BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, fill_framebuffer_info, NULL);
At end of fsp_silicon_init()?
Done
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/gma/hire... PS15, Line 35: end fb_add_framebuffer_info;
What's the purpose of this function? Can't we just call the C function […]
Done
https://review.coreboot.org/c/coreboot/+/39003/15/src/drivers/intel/gma/hire... PS15, Line 106: end if;
Would be nicer to have only one `if` and call the C function directly, e.g. […]
Done
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
Patch Set 16:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39003/16//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39003/16//COMMIT_MSG@7 PS16, Line 7: fb *lb* :)
below too
https://review.coreboot.org/c/coreboot/+/39003/16/src/device/oprom/realmode/... File src/device/oprom/realmode/x86.c:
https://review.coreboot.org/c/coreboot/+/39003/16/src/device/oprom/realmode/... PS16, Line 212: static int vbe_mode_info_valid(void) : { : return mode_info_valid; : } Not used anymore?
https://review.coreboot.org/c/coreboot/+/39003/16/src/drivers/intel/fsp1_1/r... File src/drivers/intel/fsp1_1/ramstage.c:
https://review.coreboot.org/c/coreboot/+/39003/16/src/drivers/intel/fsp1_1/r... PS16, Line 116: Quark X1000's Didn't we ditch Quark's FSP 1.1?
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#17).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 121 insertions(+), 237 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/17
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#18).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 123 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/18
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 18:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39003/16//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39003/16//COMMIT_MSG@7 PS16, Line 7: fb
*lb* :) […]
Done
https://review.coreboot.org/c/coreboot/+/39003/16/src/device/oprom/realmode/... File src/device/oprom/realmode/x86.c:
https://review.coreboot.org/c/coreboot/+/39003/16/src/device/oprom/realmode/... PS16, Line 212: static int vbe_mode_info_valid(void) : { : return mode_info_valid; : }
Not used anymore?
Done
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 18:
(4 comments)
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/gma-... File src/drivers/intel/gma/gma-gfx_init.ads:
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/gma-... PS18, Line 22: return Interfaces.C.size_t; `Interfaces.C.long` preferred, as we already assume that `long int` and pointers have the same size.
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... PS18, Line 27: use type word32; `use type Interfaces.C.long;` to allow the comparison without a cast.
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... PS18, Line 83: if (linear_fb_addr /= 0) then No parentheses needed around the condition.
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... PS18, Line 89: bits_per_pixel => 32); Preferably indented by 3, ignoring the opening parthesis:
fbinfo := c_fb_add_framebuffer_info (fb_addr => ... x_resolution => ...
This way all identifiers align.
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#19).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 123 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/19
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#20).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 124 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/20
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 20:
(4 comments)
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/gma-... File src/drivers/intel/gma/gma-gfx_init.ads:
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/gma-... PS18, Line 22: return Interfaces.C.size_t;
`Interfaces.C.long` preferred, as we already assume that `long int` and pointers have the […]
Done
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... PS18, Line 27: use type word32;
`use type Interfaces.C.long;` to allow the comparison without a cast.
Done
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... PS18, Line 83: if (linear_fb_addr /= 0) then
No parentheses needed around the condition.
Done
https://review.coreboot.org/c/coreboot/+/39003/18/src/drivers/intel/gma/hire... PS18, Line 89: bits_per_pixel => 32);
Preferably indented by 3, ignoring the opening parthesis: […]
Done
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Subrata Banik, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Martin Roth, Lee Leahy, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#21).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 123 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/21
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 21: Code-Review+1
(3 comments)
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG@9 PS21, Line 9: driver drivers
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG@11 PS21, Line 11: driver drivers
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG@18 PS21, Line 18: indepent independent
Christian Walter has uploaded a new patch set (#22) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_fb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_fb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 10 files changed, 118 insertions(+), 199 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/22
Christian Walter has uploaded a new patch set (#23) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 123 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/23
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 23: Code-Review+2
Angel Pons has uploaded a new patch set (#24) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
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 all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 123 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/24
Angel Pons has uploaded a new patch set (#25) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 123 insertions(+), 238 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/25
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 25:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG@9 PS21, Line 9: driver
drivers
Done
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG@11 PS21, Line 11: driver
drivers
Done
https://review.coreboot.org/c/coreboot/+/39003/21//COMMIT_MSG@18 PS21, Line 18: indepent
independent
Done
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#27).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 137 insertions(+), 237 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/27
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 27:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39003/27/src/device/oprom/realmode/... File src/device/oprom/realmode/x86.c:
https://review.coreboot.org/c/coreboot/+/39003/27/src/device/oprom/realmode/... PS27, Line 351: physical_address : mode_info.vesa.phys_base_ptr, space prohibited before that ':' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/39003/27/src/device/oprom/yabel/vbe... File src/device/oprom/yabel/vbe.c:
https://review.coreboot.org/c/coreboot/+/39003/27/src/device/oprom/yabel/vbe... PS27, Line 747: physical_address : mode_info.vesa.phys_base_ptr, space prohibited before that ':' (ctx:WxW)
https://review.coreboot.org/c/coreboot/+/39003/27/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/27/src/drivers/intel/fsp2_0/g... PS27, Line 92: physical_address : ginfo->framebuffer_base, space prohibited before that ':' (ctx:WxW)
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#28).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 137 insertions(+), 237 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/28
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#30).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 137 insertions(+), 237 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/30
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 30: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/30/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/30/src/drivers/intel/fsp2_0/g... PS30, Line 97: fbinfo->green.size + fbinfo->blue.size, one space missing
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#31).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 137 insertions(+), 237 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/31
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/30/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/30/src/drivers/intel/fsp2_0/g... PS30, Line 97: fbinfo->green.size + fbinfo->blue.size,
one space missing
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 31: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... PS31, Line 86: Interfaces.C.long Uh, this looks wrong. There should be a type for memory addresses somewhere.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... PS31, Line 86: Interfaces.C.long
Uh, this looks wrong. There should be a type for memory addresses somewhere.
Interfaces.C.size_t?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... PS31, Line 86: Interfaces.C.long
Interfaces.C. […]
Should work (not ideal, but better than `long`)
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#32).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc 13 files changed, 137 insertions(+), 237 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/32
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 32:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... PS31, Line 86: Interfaces.C.long
Should work (not ideal, but better than `long`)
CB:47393 provides uintptr_t
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 32:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... File src/drivers/intel/gma/hires_fb/gma-gfx_init.adb:
https://review.coreboot.org/c/coreboot/+/39003/31/src/drivers/intel/gma/hire... PS31, Line 86: Interfaces.C.long
CB:47393 provides uintptr_t
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 32: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 32:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... PS32, Line 64: * Get framebuffer base from soc. This might be a real issue. Was it tested? If there is no problem, the comment should be removed. If there is, it should be handled.
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... PS32, Line 74: framebuffer_bar Looks like beside being printed, it's ignored?
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 32:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... PS32, Line 64: * Get framebuffer base from soc.
This might be a real issue. Was it tested? If there is no problem, […]
Good catch. That latest patch-set wasn't tested, but an older one. I'll investigate.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 32:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... PS32, Line 64: * Get framebuffer base from soc.
Good catch. […]
I tested it on up/squared and this is still required. the bar changes during pci enumeration.
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#33).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc M src/soc/intel/common/block/graphics/graphics.c 13 files changed, 129 insertions(+), 252 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/33
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 33:
(2 comments)
Tested revision 32 on up/squared using FSP GOP and libgfxinit using tianocore as payload. Both are working now.
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... File src/drivers/intel/fsp2_0/graphics.c:
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... PS32, Line 64: * Get framebuffer base from soc.
I tested it on up/squared and this is still required. the bar changes during pci enumeration.
Done
https://review.coreboot.org/c/coreboot/+/39003/32/src/drivers/intel/fsp2_0/g... PS32, Line 74: framebuffer_bar
Looks like beside being printed, it's ignored?
Done
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 33:
Patch Set 33:
(2 comments)
Tested revision 32 on up/squared using FSP GOP and libgfxinit using tianocore as payload. Both are working now.
It's actually revision 33 that was tested.
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#37).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c A src/drivers/intel/fsp2_0/include/fsp/graphics.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc M src/soc/intel/common/block/graphics/graphics.c 14 files changed, 140 insertions(+), 252 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/37
Hello build bot (Jenkins), Patrick Georgi, Frans Hendriks, Matt DeVillier, Paul Menzel, Angel Pons, Subrata Banik, Arthur Heymans, Andrey Petrov, Naresh Solanki, Alexandru Gagniuc, Patrick Rudolph, Nico Huber, Martin Roth, Lee Leahy, Christian Walter, Huang Jin, Wim Vervoorn,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39003
to look at the new patch set (#38).
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c A src/drivers/intel/fsp2_0/include/fsp/graphics.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc M src/soc/intel/common/block/graphics/graphics.c 14 files changed, 141 insertions(+), 252 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/38
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 38: Code-Review+1
Wim Vervoorn has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 38: Code-Review+1
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 38:
Tested Patchset 38 on * Prodrive/hermes using aspeed NGI * QEMU using NGI std/cirrus/vmware/qxl * Up/squared using FSP2.0 GOP and libgfxinit
No issues found.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 38: Code-Review-1
Breaks building with YABEL
Angel Pons has uploaded a new patch set (#39) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c A src/drivers/intel/fsp2_0/include/fsp/graphics.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc M src/soc/intel/common/block/graphics/graphics.c 14 files changed, 142 insertions(+), 252 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/39003/39
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 39: Code-Review+2
Fixed the issue and also added a test config to cover the case. Works on Asus P8Z77-V LX2 with a dGPU.
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 39: Code-Review+2
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 39: Code-Review+2
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
Patch Set 39:
Let's see if this works for everyone.
Patrick Rudolph has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39003 )
Change subject: drivers: Replace multiple fill_lb_framebuffer with single instance ......................................................................
drivers: Replace multiple fill_lb_framebuffer with single instance
Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers 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 independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time.
Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/39003 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Frans Hendriks fhendriks@eltan.com Reviewed-by: Christian Walter christian.walter@9elements.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/device/oprom/realmode/x86.c M src/device/oprom/yabel/vbe.c M src/drivers/intel/fsp1_1/Makefile.inc D src/drivers/intel/fsp1_1/fsp_gop.c M src/drivers/intel/fsp1_1/ramstage.c M src/drivers/intel/fsp2_0/graphics.c A src/drivers/intel/fsp2_0/include/fsp/graphics.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/gma/gma-gfx_init.ads M src/drivers/intel/gma/hires_fb/gma-gfx_init.adb M src/drivers/intel/gma/text_fb/gma-gfx_init.adb M src/lib/Kconfig M src/lib/Makefile.inc M src/soc/intel/common/block/graphics/graphics.c 14 files changed, 142 insertions(+), 252 deletions(-)
Approvals: build bot (Jenkins): Verified Frans Hendriks: Looks good to me, approved Angel Pons: Looks good to me, approved Christian Walter: Looks good to me, approved
diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c index d230d5c..6b80ac5 100644 --- a/src/device/oprom/realmode/x86.c +++ b/src/device/oprom/realmode/x86.c @@ -12,6 +12,7 @@ #include <pc80/i8254.h> #include <string.h> #include <vbe.h> +#include <framebuffer_info.h>
/* we use x86emu's register file representation */ #include <x86emu/regs.h> @@ -208,11 +209,6 @@ static vbe_mode_info_t mode_info; static int mode_info_valid;
-static int vbe_mode_info_valid(void) -{ - return mode_info_valid; -} - const vbe_mode_info_t *vbe_mode_info(void) { if (!mode_info_valid || !mode_info.vesa.phys_base_ptr) @@ -351,6 +347,24 @@ }
vbe_set_mode(&mode_info); + const struct lb_framebuffer fb = { + .physical_address = mode_info.vesa.phys_base_ptr, + .x_resolution = le16_to_cpu(mode_info.vesa.x_resolution), + .y_resolution = le16_to_cpu(mode_info.vesa.y_resolution), + .bytes_per_line = le16_to_cpu(mode_info.vesa.bytes_per_scanline), + .bits_per_pixel = mode_info.vesa.bits_per_pixel, + .red_mask_pos = mode_info.vesa.red_mask_pos, + .red_mask_size = mode_info.vesa.red_mask_size, + .green_mask_pos = mode_info.vesa.green_mask_pos, + .green_mask_size = mode_info.vesa.green_mask_size, + .blue_mask_pos = mode_info.vesa.blue_mask_pos, + .blue_mask_size = mode_info.vesa.blue_mask_size, + .reserved_mask_pos = mode_info.vesa.reserved_mask_pos, + .reserved_mask_size = mode_info.vesa.reserved_mask_size, + .orientation = LB_FB_ORIENTATION_NORMAL, + }; + + fb_add_framebuffer_info_ex(&fb); }
void vbe_textmode_console(void) @@ -362,34 +376,6 @@ die("\nError: In %s function\n", __func__); }
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - if (!vbe_mode_info_valid()) - return -1; - - framebuffer->physical_address = mode_info.vesa.phys_base_ptr; - - framebuffer->x_resolution = le16_to_cpu(mode_info.vesa.x_resolution); - framebuffer->y_resolution = le16_to_cpu(mode_info.vesa.y_resolution); - framebuffer->bytes_per_line = - le16_to_cpu(mode_info.vesa.bytes_per_scanline); - framebuffer->bits_per_pixel = mode_info.vesa.bits_per_pixel; - - framebuffer->red_mask_pos = mode_info.vesa.red_mask_pos; - framebuffer->red_mask_size = mode_info.vesa.red_mask_size; - - framebuffer->green_mask_pos = mode_info.vesa.green_mask_pos; - framebuffer->green_mask_size = mode_info.vesa.green_mask_size; - - framebuffer->blue_mask_pos = mode_info.vesa.blue_mask_pos; - framebuffer->blue_mask_size = mode_info.vesa.blue_mask_size; - - framebuffer->reserved_mask_pos = mode_info.vesa.reserved_mask_pos; - framebuffer->reserved_mask_size = mode_info.vesa.reserved_mask_size; - - return 0; -} - #endif
void run_bios(struct device *dev, unsigned long addr) diff --git a/src/device/oprom/yabel/vbe.c b/src/device/oprom/yabel/vbe.c index a3d736f..5f03e19 100644 --- a/src/device/oprom/yabel/vbe.c +++ b/src/device/oprom/yabel/vbe.c @@ -33,6 +33,7 @@ *****************************************************************************/
#include <boot/coreboot_tables.h> +#include <framebuffer_info.h> #include <string.h> #include <types.h>
@@ -163,11 +164,6 @@
static int mode_info_valid;
-static int vbe_mode_info_valid(void) -{ - return mode_info_valid; -} - // VBE Function 01h static u8 vbe_get_mode_info(vbe_mode_info_t * mode_info) @@ -747,33 +743,25 @@ mode_info.video_mode = (1 << 14) | CONFIG_FRAMEBUFFER_VESA_MODE; vbe_get_mode_info(&mode_info); vbe_set_mode(&mode_info); -}
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - if (!vbe_mode_info_valid()) - return -1; + const struct lb_framebuffer fb = { + .physical_address = mode_info.vesa.phys_base_ptr, + .x_resolution = le16_to_cpu(mode_info.vesa.x_resolution), + .y_resolution = le16_to_cpu(mode_info.vesa.y_resolution), + .bytes_per_line = le16_to_cpu(mode_info.vesa.bytes_per_scanline), + .bits_per_pixel = mode_info.vesa.bits_per_pixel, + .red_mask_pos = mode_info.vesa.red_mask_pos, + .red_mask_size = mode_info.vesa.red_mask_size, + .green_mask_pos = mode_info.vesa.green_mask_pos, + .green_mask_size = mode_info.vesa.green_mask_size, + .blue_mask_pos = mode_info.vesa.blue_mask_pos, + .blue_mask_size = mode_info.vesa.blue_mask_size, + .reserved_mask_pos = mode_info.vesa.reserved_mask_pos, + .reserved_mask_size = mode_info.vesa.reserved_mask_size, + .orientation = LB_FB_ORIENTATION_NORMAL, + };
- framebuffer->physical_address = le32_to_cpu(mode_info.vesa.phys_base_ptr); - - framebuffer->x_resolution = le16_to_cpu(mode_info.vesa.x_resolution); - framebuffer->y_resolution = le16_to_cpu(mode_info.vesa.y_resolution); - framebuffer->bytes_per_line = le16_to_cpu(mode_info.vesa.bytes_per_scanline); - framebuffer->bits_per_pixel = mode_info.vesa.bits_per_pixel; - - framebuffer->red_mask_pos = mode_info.vesa.red_mask_pos; - framebuffer->red_mask_size = mode_info.vesa.red_mask_size; - - framebuffer->green_mask_pos = mode_info.vesa.green_mask_pos; - framebuffer->green_mask_size = mode_info.vesa.green_mask_size; - - framebuffer->blue_mask_pos = mode_info.vesa.blue_mask_pos; - framebuffer->blue_mask_size = mode_info.vesa.blue_mask_size; - - framebuffer->reserved_mask_pos = mode_info.vesa.reserved_mask_pos; - framebuffer->reserved_mask_size = mode_info.vesa.reserved_mask_size; - - return 0; + fb_add_framebuffer_info_ex(&fb); }
void vbe_textmode_console(void) diff --git a/src/drivers/intel/fsp1_1/Makefile.inc b/src/drivers/intel/fsp1_1/Makefile.inc index abac7fb..b5dd3c3 100644 --- a/src/drivers/intel/fsp1_1/Makefile.inc +++ b/src/drivers/intel/fsp1_1/Makefile.inc @@ -18,7 +18,6 @@ romstage-y += romstage.c romstage-$(CONFIG_MMA) += mma_core.c
-ramstage-$(CONFIG_RUN_FSP_GOP) += fsp_gop.c ramstage-y += fsp_relocate.c ramstage-y += fsp_util.c ramstage-y += hob.c diff --git a/src/drivers/intel/fsp1_1/fsp_gop.c b/src/drivers/intel/fsp1_1/fsp_gop.c deleted file mode 100644 index 4fcf1e3..0000000 --- a/src/drivers/intel/fsp1_1/fsp_gop.c +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <boot/coreboot_tables.h> -#include <console/console.h> -#include <fsp/util.h> - -int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - VOID *hob_list_ptr; - hob_list_ptr = get_hob_list(); - const EFI_GUID vbt_guid = EFI_PEI_GRAPHICS_INFO_HOB_GUID; - u32 *vbt_hob; - EFI_PEI_GRAPHICS_INFO_HOB *vbt_gop; - vbt_hob = get_next_guid_hob(&vbt_guid, hob_list_ptr); - if (vbt_hob == NULL) { - printk(BIOS_ERR, "FSP_ERR: Graphics Data HOB is not present\n"); - return -1; - } - printk(BIOS_DEBUG, "FSP_DEBUG: Graphics Data HOB present\n"); - vbt_gop = GET_GUID_HOB_DATA(vbt_hob); - - framebuffer->physical_address = vbt_gop->FrameBufferBase; - framebuffer->x_resolution = vbt_gop->GraphicsMode.HorizontalResolution; - framebuffer->y_resolution = vbt_gop->GraphicsMode.VerticalResolution; - framebuffer->bytes_per_line = vbt_gop->GraphicsMode.PixelsPerScanLine - * 4; - 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 = 24; - framebuffer->reserved_mask_size = 8; - - return 0; -} diff --git a/src/drivers/intel/fsp1_1/ramstage.c b/src/drivers/intel/fsp1_1/ramstage.c index cd4a1e6..eb226db 100644 --- a/src/drivers/intel/fsp1_1/ramstage.c +++ b/src/drivers/intel/fsp1_1/ramstage.c @@ -5,6 +5,7 @@ #include <console/console.h> #include <fsp/ramstage.h> #include <fsp/util.h> +#include <framebuffer_info.h> #include <lib.h> #include <stage_cache.h> #include <string.h> @@ -116,6 +117,28 @@ gfx_set_init_done(1); #endif
+ if (CONFIG(RUN_FSP_GOP)) { + const EFI_GUID vbt_guid = EFI_PEI_GRAPHICS_INFO_HOB_GUID; + u32 *vbt_hob; + + void *hob_list_ptr = get_hob_list(); + vbt_hob = get_next_guid_hob(&vbt_guid, hob_list_ptr); + if (vbt_hob == NULL) { + printk(BIOS_ERR, "FSP_ERR: Graphics Data HOB is not present\n"); + } else { + EFI_PEI_GRAPHICS_INFO_HOB *gop; + + printk(BIOS_DEBUG, "FSP_DEBUG: Graphics Data HOB present\n"); + gop = GET_GUID_HOB_DATA(vbt_hob); + + fb_add_framebuffer_info(gop->FrameBufferBase, + gop->GraphicsMode.HorizontalResolution, + gop->GraphicsMode.VerticalResolution, + gop->GraphicsMode.PixelsPerScanLine * 4, + 32); + } + } + display_hob_info(fsp_info_header); soc_after_silicon_init(); } diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index f6686c4..ddf8f0b 100644 --- a/src/drivers/intel/fsp2_0/graphics.c +++ b/src/drivers/intel/fsp2_0/graphics.c @@ -2,9 +2,11 @@
#include <boot/coreboot_tables.h> #include <console/console.h> +#include <fsp/graphics.h> #include <fsp/util.h> #include <soc/intel/common/vbt.h> #include <types.h> +#include <framebuffer_info.h>
enum pixel_format { pixel_rgbx_8bpc = 0, @@ -46,75 +48,54 @@ [pixel_bgrx_8bpc] = { {16, 8}, {8, 8}, {0, 8}, {24, 8} }, };
-enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer) + +void fsp_report_framebuffer_info(const uintptr_t framebuffer_bar) { size_t size; const struct hob_graphics_info *ginfo; const struct fsp_framebuffer *fbinfo;
+ /* + * Pci enumeration happens after silicon init. + * After enumeration graphic framebuffer base may be relocated. + */ + if (!framebuffer_bar) { + printk(BIOS_ALERT, "Framebuffer BAR invalid\n"); + return; + } + ginfo = fsp_find_extension_hob_by_guid(fsp_graphics_info_guid, &size);
if (!ginfo) { printk(BIOS_ALERT, "Graphics hand-off block not found\n"); - return CB_ERR; + return; }
if (ginfo->pixel_format >= ARRAY_SIZE(fsp_framebuffer_format_map)) { printk(BIOS_ALERT, "FSP set unknown framebuffer format: %d\n", ginfo->pixel_format); - return CB_ERR; + return; }
fbinfo = fsp_framebuffer_format_map + ginfo->pixel_format;
- framebuffer->physical_address = ginfo->framebuffer_base; - framebuffer->x_resolution = ginfo->horizontal_resolution; - framebuffer->y_resolution = ginfo->vertical_resolution; - framebuffer->bytes_per_line = ginfo->pixels_per_scanline * 4; - framebuffer->bits_per_pixel = 32; - framebuffer->red_mask_pos = fbinfo->red.pos; - framebuffer->red_mask_size = fbinfo->red.size; - framebuffer->green_mask_pos = fbinfo->green.pos; - framebuffer->green_mask_size = fbinfo->green.size; - framebuffer->blue_mask_pos = fbinfo->blue.pos; - framebuffer->blue_mask_size = fbinfo->blue.size; - framebuffer->reserved_mask_pos = fbinfo->rsvd.pos; - framebuffer->reserved_mask_size = fbinfo->rsvd.pos; + const struct lb_framebuffer fb = { + .physical_address = framebuffer_bar, + .x_resolution = ginfo->horizontal_resolution, + .y_resolution = ginfo->vertical_resolution, + .bytes_per_line = ginfo->pixels_per_scanline * 4, + .bits_per_pixel = fbinfo->rsvd.size + fbinfo->red.size + + fbinfo->green.size + fbinfo->blue.size, + .red_mask_pos = fbinfo->red.pos, + .red_mask_size = fbinfo->red.size, + .green_mask_pos = fbinfo->green.pos, + .green_mask_size = fbinfo->green.size, + .blue_mask_pos = fbinfo->blue.pos, + .blue_mask_size = fbinfo->blue.size, + .reserved_mask_pos = fbinfo->rsvd.pos, + .reserved_mask_size = fbinfo->rsvd.size, + .orientation = LB_FB_ORIENTATION_NORMAL, + };
- return CB_SUCCESS; -} - -int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) -{ - enum cb_err ret; - uintptr_t framebuffer_bar; - - /* Pci enumeration happens after silicon init. - * After enumeration graphic framebuffer base may be relocated. - * Get framebuffer base from soc. - */ - framebuffer_bar = fsp_soc_get_igd_bar(); - - if (!framebuffer_bar) { - printk(BIOS_ALERT, "Framebuffer BAR invalid\n"); - return -1; - } - - ret = fsp_fill_lb_framebuffer(framebuffer); - if (ret != CB_SUCCESS) { - printk(BIOS_ALERT, "FSP did not return a valid framebuffer\n"); - return -1; - } - - /* Resource allocator can move the BAR around after FSP configures it */ - framebuffer->physical_address = framebuffer_bar; - printk(BIOS_DEBUG, "Graphics framebuffer located at 0x%llx\n", - framebuffer->physical_address); - - return 0; -} - -__weak uintptr_t fsp_soc_get_igd_bar(void) -{ - return 0; + fb_add_framebuffer_info_ex(&fb); } diff --git a/src/drivers/intel/fsp2_0/include/fsp/graphics.h b/src/drivers/intel/fsp2_0/include/fsp/graphics.h new file mode 100644 index 0000000..2d81383 --- /dev/null +++ b/src/drivers/intel/fsp2_0/include/fsp/graphics.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef _FSP2_0_GRAPHICS_H_ +#define _FSP2_0_GRAPHICS_H_ + +#include <types.h> + +/* + * Report the fsp_graphics_info_guid HOB to framebuffer info. + * + * Must be called after PCI enumeration to make sure that the BAR + * doesn't change any more. + */ +void fsp_report_framebuffer_info(const uintptr_t framebuffer_bar); + +#endif /* _FSP2_0_GRAPHICS_H_ */ diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index 315db05..7393305 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -88,7 +88,6 @@ void *fsp_get_hob_list_ptr(void); const void *fsp_find_extension_hob_by_guid(const uint8_t *guid, size_t *size); const void *fsp_find_nv_storage_data(size_t *size); -enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer); int fsp_find_range_hob(struct range_entry *re, const uint8_t guid[16]); void fsp_display_fvi_version_hob(void); void fsp_find_reserved_memory(struct range_entry *re); @@ -123,9 +122,6 @@ * header object will be validated and filled in on successful load. */ enum cb_err fsp_load_component(struct fsp_load_descriptor *fspld, struct fsp_header *hdr);
-/* Get igd framebuffer bar from SoC */ -uintptr_t fsp_soc_get_igd_bar(void); - /* * Handle FSP reboot request status. Chipset/soc is expected to provide * chipset_handle_reset() that deals with reset type codes specific to given diff --git a/src/drivers/intel/gma/gma-gfx_init.ads b/src/drivers/intel/gma/gma-gfx_init.ads index 84c4a5b..4998d33 100644 --- a/src/drivers/intel/gma/gma-gfx_init.ads +++ b/src/drivers/intel/gma/gma-gfx_init.ads @@ -13,28 +13,14 @@
----------------------------------------------------------------------------
- type lb_framebuffer is record - tag : word32; - size : word32; + function c_fb_add_framebuffer_info + (fb_addr: Interfaces.C.size_t; + x_resolution : word32; + y_resolution : word32; + bytes_per_line : word32; + bits_per_pixel : word8) + return Interfaces.C.size_t;
- physical_address : word64; - x_resolution : word32; - y_resolution : word32; - bytes_per_line : word32; - bits_per_pixel : word8; - red_mask_pos : word8; - red_mask_size : word8; - green_mask_pos : word8; - green_mask_size : word8; - blue_mask_pos : word8; - blue_mask_size : word8; - reserved_mask_pos : word8; - reserved_mask_size : word8; - end record; - - function fill_lb_framebuffer - (framebuffer : in out lb_framebuffer) - return Interfaces.C.int; - pragma Export (C, fill_lb_framebuffer, "fill_lb_framebuffer"); + pragma import (C, c_fb_add_framebuffer_info, "fb_add_framebuffer_info");
end GMA.GFX_Init; diff --git a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb index 92d3a16..b213030 100644 --- a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb +++ b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb @@ -18,56 +18,29 @@ package body GMA.GFX_Init is
- fb_valid : boolean := false; - - linear_fb_addr : word64; - - fb : Framebuffer_Type; - - function fill_lb_framebuffer - (framebuffer : in out lb_framebuffer) - return Interfaces.C.int - is - use type word32; - use type Interfaces.C.int; - begin - if fb_valid then - framebuffer := - (tag => 0, - size => 0, - physical_address => linear_fb_addr, - x_resolution => word32 (fb.Width), - y_resolution => word32 (fb.Height), - bytes_per_line => 4 * word32 (fb.Stride), - bits_per_pixel => 32, - reserved_mask_pos => 24, - reserved_mask_size => 8, - red_mask_pos => 16, - red_mask_size => 8, - green_mask_pos => 8, - green_mask_size => 8, - blue_mask_pos => 0, - blue_mask_size => 8); - return 0; - else - return -1; - end if; - end fill_lb_framebuffer; - ----------------------------------------------------------------------------
procedure gfxinit (lightup_ok : out Interfaces.C.int) is use type pos32; use type word64; + use type word32; + use type Interfaces.C.size_t;
ports : Port_List; configs : Pipe_Configs;
success : boolean;
+ linear_fb_addr : word64; + + fb : Framebuffer_Type; + min_h : pos32 := Config.LINEAR_FRAMEBUFFER_MAX_WIDTH; min_v : pos32 := Config.LINEAR_FRAMEBUFFER_MAX_HEIGHT; + + fbinfo : Interfaces.C.size_t; + begin lightup_ok := 0;
@@ -108,9 +81,17 @@ HW.GFX.GMA.Update_Outputs (configs);
HW.GFX.GMA.Map_Linear_FB (linear_fb_addr, fb); - fb_valid := linear_fb_addr /= 0; - - lightup_ok := (if fb_valid then 1 else 0); + if linear_fb_addr /= 0 then + fbinfo := c_fb_add_framebuffer_info + (fb_addr => Interfaces.C.size_t (linear_fb_addr), + x_resolution => word32 (fb.Width), + y_resolution => word32 (fb.Height), + bytes_per_line => word32 (fb.Stride) * 4, + bits_per_pixel => 32); + if fbinfo /= 0 then + lightup_ok := 1; + end if; + end if; end if; end if; end if; diff --git a/src/drivers/intel/gma/text_fb/gma-gfx_init.adb b/src/drivers/intel/gma/text_fb/gma-gfx_init.adb index 04ef30a..d273852 100644 --- a/src/drivers/intel/gma/text_fb/gma-gfx_init.adb +++ b/src/drivers/intel/gma/text_fb/gma-gfx_init.adb @@ -13,17 +13,6 @@ package body GMA.GFX_Init is
- function fill_lb_framebuffer - (framebuffer : in out lb_framebuffer) - return Interfaces.C.int - is - use type Interfaces.C.int; - begin - return -1; - end fill_lb_framebuffer; - - ---------------------------------------------------------------------------- - procedure gfxinit (lightup_ok : out Interfaces.C.int) is ports : Port_List; diff --git a/src/lib/Kconfig b/src/lib/Kconfig index ab0182c..168a068 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -5,14 +5,6 @@ implementation. This activates a stub that logs the missing board reset and halts execution.
-config NO_EDID_FILL_FB - bool - default y if !MAINBOARD_DO_NATIVE_VGA_INIT - help - Don't include default fill_lb_framebuffer() implementation. Select - this if your drivers uses MAINBOARD_DO_NATIVE_VGA_INIT but provides - its own fill_lb_framebuffer() implementation. - config RAMSTAGE_ADA bool help diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 9e601eb..07555a7 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -144,9 +144,7 @@ ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c ramstage-$(CONFIG_COVERAGE) += libgcov.c ramstage-y += edid.c -ifneq ($(CONFIG_NO_EDID_FILL_FB),y) ramstage-y += edid_fill_fb.c -endif ramstage-y += memrange.c ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index 23cf847..eac38f8 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -11,6 +11,7 @@ #include <drivers/intel/gma/libgfxinit.h> #include <drivers/intel/gma/opregion.h> #include <intelblocks/graphics.h> +#include <fsp/graphics.h> #include <soc/pci_devs.h> #include <types.h>
@@ -46,13 +47,15 @@ /* * GFX PEIM module inside FSP binary is taking care of graphics * initialization based on RUN_FSP_GOP Kconfig option and input - * VBT file. + * VBT file. Need to report the framebuffer info after PCI enumeration. * * In case of non-FSP solution, SoC need to select another * Kconfig to perform GFX initialization. */ - if (CONFIG(RUN_FSP_GOP)) + if (CONFIG(RUN_FSP_GOP)) { + fsp_report_framebuffer_info(graphics_get_memory_base()); return; + }
if (!CONFIG(NO_GFX_INIT)) pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); @@ -155,16 +158,6 @@ graphics_gtt_write(reg, val); }
-/* - * fsp_soc_get_igd_bar() is declared in <fsp/util.h>, - * but that draws incompatible UDK headers in. - */ -uintptr_t fsp_soc_get_igd_bar(void); -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} - static const struct device_operations graphics_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources,