Skip to content

Add support for QEMU's ramfb display

Alper Nebi Yasak u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest7 patches 17 repliesIn review

Changes in v2 from the cover letter · 19 lines

- Remove extra "depends on DM_VIDEO" already in "if VIDEO"
- Drop drivers/video/MAINTAINERS file
- Decouple framebuffer allocation from EFI_LOADER
- Add .bind() method for ramfb driver
- Make resolution configurable with kconfig
- Move struct to qfw.h and add comments for members
- Use RAMFB_* definitions instead of DEFAULT_*
- Use if (IS_ENABLED(CONFIG_VIDEO_RAMFB)) instead of #ifdef
- Add patch "qfw: Add flag to allow probing before relocation"
- Rebase on "qemu: arm: Enable Bochs, console buffering, USB keyboard"
- Drop env changes from ARM (necessary but in prerequisite series)
- Drop imply VIDEO, SYS_CONSOLE_IN_ENV changes from ARM (in prereq.)
- Probe QFW in ARM QEMU board_early_init_f to bind ramfb pre-reloc
- Add IS_ENABLED(CONFIG_QFW) check and error handling to ARM QEMU
- Drop imply VIDEO, env changes from RISC-V patch (in u-boot/next)
- Drop imply SYS_CONSOLE_IS_IN_ENV from RISC-V patch (def. y if VIDEO)
- Probe QFW in RISC-V QEMU board_early_init_f to bind ramfb pre-reloc
- Add IS_ENABLED(CONFIG_QFW) check and error handling to RISC-V QEMU
- Add patch "x86: qemu: Enable ramfb by default"

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7qfw: Add WRITE definitioninclude/qfw.h+1 -00 replies
2/7ramfb: Add driver for ramfb displaydrivers/video/Kconfig drivers/video/Makefile drivers/video/ramfb.c +1 more+138 -01 reply
3/7qfw: Spawn ramfb device if its file is presentdrivers/misc/qfw.c+24 -02 replies
4/7qfw: Add flag to allow probing before relocationdrivers/misc/qfw.c drivers/misc/qfw_mmio.c drivers/misc/qfw_pio.c +1 more+4 -03 replies
5/7arm: qemu: Enable ramfb by defaultarch/arm/Kconfig board/emulation/qemu-arm/qemu-arm.c+44 -07 replies
6/7riscv: qemu: Enable ramfb by defaultboard/emulation/qemu-riscv/Kconfig board/emulation/qemu-riscv/qemu-riscv.c+46 -01 reply
7/7x86: qemu: Enable ramfb by defaultarch/x86/cpu/qemu/Kconfig board/emulation/qemu-x86/qemu-x86.c configs/qemu-x86_64_defconfig +1 more+52 -43 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/7R-b
2/7R-b
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/7] Add support for QEMU's ramfb display

This is a rebase of Alexander Graf's QEMU ramfb support series with some changes of mine, in part to address reviews and to accommodate other changes enabling Bochs video driver. The original cover letter is as follows:

Quoted 8 lines

QEMU implements multiple ways to expose graphics output to the virt machine, but most of them are incompatible with hardware virtualization.

The one that does work reliably is ramfb. It's a very simple mechanism in which the guest reserves a memory region for the frame buffer and then notifies the host about its location and properties. The host then just displays the contents of the frame buffer on screen.

Quoted 7 lines

This patch set adds support to drive the ramfb device in our QEMU arm targets. Theoretically, it should work as is with any of the other architectures as well though.

With this driver, we have a very simple, KVM compatible way to expose GOP via UEFI to payloads and thus enable development and testing of graphical OS functionality with QEMU's -M virt.

Inspired by the "video: bochs: Remove the x86 limitation" series [1] that was recently merged, I have also sent a series adding Bochs video device support for ARM [2], and assuming that would get merged before this I've rebased this on that to avoid conflicts.

[1] https://lore.kernel.org/u-boot/[email protected]/
[2] https://lore.kernel.org/u-boot/[email protected]/

Changes in v2:
- Remove extra "depends on DM_VIDEO" already in "if VIDEO"
- Drop drivers/video/MAINTAINERS file
- Decouple framebuffer allocation from EFI_LOADER
- Add .bind() method for ramfb driver
- Make resolution configurable with kconfig
- Move struct to qfw.h and add comments for members
- Use RAMFB_* definitions instead of DEFAULT_*
- Use if (IS_ENABLED(CONFIG_VIDEO_RAMFB)) instead of #ifdef
- Add patch "qfw: Add flag to allow probing before relocation"
- Rebase on "qemu: arm: Enable Bochs, console buffering, USB keyboard"
- Drop env changes from ARM (necessary but in prerequisite series)
- Drop imply VIDEO, SYS_CONSOLE_IN_ENV changes from ARM (in prereq.)
- Probe QFW in ARM QEMU board_early_init_f to bind ramfb pre-reloc
- Add IS_ENABLED(CONFIG_QFW) check and error handling to ARM QEMU
- Drop imply VIDEO, env changes from RISC-V patch (in u-boot/next)
- Drop imply SYS_CONSOLE_IS_IN_ENV from RISC-V patch (def. y if VIDEO)
- Probe QFW in RISC-V QEMU board_early_init_f to bind ramfb pre-reloc
- Add IS_ENABLED(CONFIG_QFW) check and error handling to RISC-V QEMU
- Add patch "x86: qemu: Enable ramfb by default"

v1: https://lore.kernel.org/u-boot/[email protected]/

Alexander Graf (5):
qfw: Add WRITE definition
ramfb: Add driver for ramfb display
qfw: Spawn ramfb device if its file is present
arm: qemu: Enable ramfb by default
riscv: qemu: Enable ramfb by default

Alper Nebi Yasak (2):
qfw: Add flag to allow probing before relocation
x86: qemu: Enable ramfb by default

 arch/arm/Kconfig                        |  3 +
 arch/x86/cpu/qemu/Kconfig               |  4 +
 board/emulation/qemu-arm/qemu-arm.c     | 41 +++++++++++
 board/emulation/qemu-riscv/Kconfig      |  5 ++
 board/emulation/qemu-riscv/qemu-riscv.c | 41 +++++++++++
 board/emulation/qemu-x86/qemu-x86.c     | 47 ++++++++++++
 configs/qemu-x86_64_defconfig           |  4 +-
 configs/qemu-x86_defconfig              |  1 -
 drivers/misc/qfw.c                      | 25 +++++++
 drivers/misc/qfw_mmio.c                 |  1 +
 drivers/misc/qfw_pio.c                  |  1 +
 drivers/misc/qfw_sandbox.c              |  1 +
 drivers/video/Kconfig                   | 30 ++++++++
 drivers/video/Makefile                  |  1 +
 drivers/video/ramfb.c                   | 97 +++++++++++++++++++++++++
 include/qfw.h                           | 11 +++
 16 files changed, 309 insertions(+), 4 deletions(-)
 create mode 100644 drivers/video/ramfb.c

base-commit: 832148f675e427060be074c276956962fa9b5cb6
prerequisite-patch-id: 2c8662d18f6f1e2d4e014bcd5d468e0396064f4f
prerequisite-patch-id: 5f3e5e1d814187841ce299df0da16df16d0121c3
prerequisite-patch-id: adbd0fb953e726ea5ea0b248e00092dfc318fd46
prerequisite-patch-id: 7470d3af5e9ded16eb5a4de7c7264062dcb3ef7f

Signature · 1 line
2.40.1