summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/aspeed/common/ast_mode_corebootfb.c5
-rw-r--r--src/drivers/emulation/qemu/bochs.c12
-rw-r--r--src/drivers/emulation/qemu/cirrus.c10
3 files changed, 8 insertions, 19 deletions
diff --git a/src/drivers/aspeed/common/ast_mode_corebootfb.c b/src/drivers/aspeed/common/ast_mode_corebootfb.c
index bb30d20acd..b25d742f01 100644
--- a/src/drivers/aspeed/common/ast_mode_corebootfb.c
+++ b/src/drivers/aspeed/common/ast_mode_corebootfb.c
@@ -6,6 +6,7 @@
#include <console/console.h>
#include <edid.h>
#include <device/pci_def.h>
+#include <framebuffer_info.h>
#include "ast_drv.h"
@@ -200,7 +201,7 @@ int ast_driver_framebuffer_init(struct drm_device *dev, int flags)
return ret;
}
- /* Updated edid for set_vbe_mode_info_valid */
+ /* Updated edid for fb_fill_framebuffer_info */
edid.x_resolution = edid.mode.ha;
edid.y_resolution = edid.mode.va;
edid.framebuffer_bits_per_pixel = format.cpp[0] * 8;
@@ -227,7 +228,7 @@ int ast_driver_framebuffer_init(struct drm_device *dev, int flags)
ast_hide_cursor(&crtc);
/* Advertise new mode */
- set_vbe_mode_info_valid(&edid, fb.mmio_addr);
+ fb_new_framebuffer_info_from_edid(&edid, fb.mmio_addr);
/* Clear display */
memset((void *)(uintptr_t)fb.mmio_addr, 0, edid.bytes_per_line * edid.y_resolution);
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index 5a6603ee1e..73fa19e2ca 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <stdint.h>
-#include <edid.h>
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
@@ -10,6 +9,7 @@
#include <device/pci_ids.h>
#include <pc80/vga.h>
#include <pc80/vga_io.h>
+#include <framebuffer_info.h>
/* VGA init. We use the Bochs VESA VBE extensions */
#define VBE_DISPI_IOPORT_INDEX 0x01CE
@@ -82,7 +82,6 @@ static struct resource res_legacy = {
static void bochs_init_linear_fb(struct device *dev)
{
- struct edid edid;
struct resource *res_fb, *res_io;
int id, mem, bar;
@@ -139,13 +138,8 @@ static void bochs_init_linear_fb(struct device *dev)
bochs_vga_write(res_io, 0, 0x20); /* disable blanking */
- /* setup coreboot framebuffer */
- edid.mode.ha = width;
- edid.mode.va = height;
- edid.panel_bits_per_color = 8;
- edid.panel_bits_per_pixel = 24;
- edid_set_framebuffer_bits_per_pixel(&edid, 32, 0);
- set_vbe_mode_info_valid(&edid, res_fb->base);
+ /* Advertise new mode */
+ fb_add_framebuffer_info(res_fb->base, width, height, 4 * width, 32);
}
static void bochs_init_text_mode(struct device *dev)
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index d63f490603..d9e0e1bd14 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -1,13 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <stdint.h>
-#include <edid.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <pc80/vga.h>
#include <pc80/vga_io.h>
+#include <framebuffer_info.h>
static int width = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES;
static int height = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES;
@@ -299,13 +299,7 @@ static void cirrus_init_linear_fb(struct device *dev)
vga_sr_write (CIRRUS_SR_EXTENDED_MODE, sr_ext);
write_hidden_dac (hidden_dac);
- struct edid edid;
- edid.mode.ha = width;
- edid.mode.va = height;
- edid.panel_bits_per_color = 8;
- edid.panel_bits_per_pixel = 24;
- edid_set_framebuffer_bits_per_pixel(&edid, 32, 0);
- set_vbe_mode_info_valid(&edid, addr);
+ fb_add_framebuffer_info(addr, width, height, 4 * width, 32);
}
static void cirrus_init_text_mode(struct device *dev)