qemu-arm.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Add ASPEED VGA PCI device support
@ 2026-09-10  1:44 Jamin Lin
  2026-09-10  1:44 ` [PATCH v2 1/6] hw/display/vga: Allow a device to report vendor specific blanking Jamin Lin
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jamin Lin @ 2026-09-10  1:44 UTC (permalink / raw)
  To: Cédric Le Goater, Peter Maydell, Steven Lee, Troy Lee,
	Kane Chen, Andrew Jeffery, Joel Stanley, Pierrick Bouvier,
	Paolo Bonzini, Gerd Hoffmann, open list:ASPEED BMCs,
	open list:All patches CC here
  Cc: Jamin Lin, Troy Lee

This series adds support for the ASPEED VGA PCI device found on AST2600
and AST2700 platforms.

The longer-term goal is to support the video path used by BMC KVM
applications. The planned implementation consists of three stages:

1. Add an ASPEED VGA PCI device so that a host system running in QEMU can
use the ASPEED VGA device as its display adapter. This series
implements this stage.

2. Back the VGA framebuffer with shared memory, for example using a QEMU
memory backend backed by /dev/shm/vram. This allows the framebuffer
contents produced by the host QEMU instance to be accessed by another
QEMU instance emulating the BMC.

3. Add an ASPEED Video Engine model to the AST2600/AST2700 BMC machine.
The model will read the shared VGA framebuffer and emulate the video
capture and JPEG compression path used by the BMC.

The intended setup runs two QEMU instances on the same host machine:
+-------------------------------------------------------------------+
|                         Host Machine                              |
|                                                                   |
|  +---------------------------+                                    |
|  | QEMU 1: VMM / Host Guest  |                                    |
|  |                           |                                    |
|  |  +---------------------+  |                                    |
|  |  | ASPEED VGA PCI      |  |                                    |
|  |  | device              |  |                                    |
|  |  +----------+----------+  |                                    |
|  |             |             |                                    |
|  |             v             |                                    |
|  |  +---------------------+  |                                    |
|  |  | VGA VRAM            |  |                                    |
|  |  +----------+----------+  |                                    |
|  +-------------|-------------+                                    |
|                |                                                  |
|                | memory-backend-file                              |
|                v                                                  |
|        +-----------------------+                                  |
|        | /dev/shm/vram         |                                  |
|        | Shared VRAM file      |                                  |
|        +-----------+-----------+                                  |
|                    |                                              |
|                    | read by                                      |
|                    v                                              |
|  +---------------------------+                                    |
|  | QEMU 2: BMC               |                                    |
|  | AST2600 / AST2700         |                                    |
|  |                           |                                    |
|  |  +---------------------+  |                                    |
|  |  | ASPEED Video Engine |  |                                    |
|  |  |                     |  |                                    |
|  |  | - Read VRAM         |  |                                    |
|  |  | - Capture frame     |  |                                    |
|  |  | - Compress video    |  |                                    |
|  |  +----------+----------+  |                                    |
|  +-------------|-------------+                                    |
|                |                                                  |
+----------------|--------------------------------------------------+
                 
   

With the complete implementation, users will be able to view the display
output of the emulated host through the OpenBMC KVM web interface.

This series adds the following devices:

- ``ast2600-vga``          Aspeed AST2600 VGA
- ``ast2700-vga``          Aspeed AST2700 VGA

The size of the framebuffer aperture is set with ``vgamem_mb``, 32 MiB by
default. The device comes up with the standard VGA BIOS; pass ``romfile``
to use Aspeed's own option ROM instead, which can be downloaded from

https://www.aspeedtech.com/support_driver/

For example, the AST2700 VGA device can be used with an `aarch64
virt` machine as follows:

  $ qemu-system-aarch64 \
        -M virt \
        -cpu neoverse-n1 -smp 8 -m 4G \
        -bios edk2-aarch64-code.fd \
        -device ast2700-vga,vgamem_mb=32,romfile=uefi_arm_2700_vga.rom \
        -drive file=noble-server-cloudimg-arm64.img,format=qcow2 \
        -device qemu-xhci,id=xhci \
        -device usb-kbd,bus=xhci.0 \
        -device usb-tablet,bus=xhci.0 \
        -display vnc=0.0.0.0:0

The disk image is an Ubuntu cloud image from
https://cloud-images.ubuntu.com/. 

The output goes to the VNC backend on display 0, which listens on TCP port 5900,
so point a VNC viewer at that port to see the screen.


v1:
 1. Add ASPEED VGA display controller
 2. Add the hardware overlay cursor
 3. Add the 2D graphics engine
 
v2:
  1. Drop "Add the ASPEED VGA device id" patch

Jamin Lin (6):
  hw/display/vga: Allow a device to report vendor specific blanking
  hw/display/vga: Move VGA_HPEL_NEUTRAL to vga_int.h
  hw/display/aspeed-vga: Add ASPEED VGA display controller
  hw/display/aspeed-vga: Add the hardware overlay cursor
  hw/display/aspeed-vga: Add the 2D graphics engine
  docs/system/arm/aspeed: Document the VGA display controller

 docs/system/arm/aspeed.rst |  37 +-
 hw/display/aspeed-vga.h    |  61 +++
 hw/display/vga_int.h       |   9 +
 hw/display/aspeed-vga.c    | 945 +++++++++++++++++++++++++++++++++++++
 hw/display/vga.c           |  11 +-
 hw/display/Kconfig         |   6 +
 hw/display/meson.build     |   1 +
 hw/display/trace-events    |   7 +
 8 files changed, 1066 insertions(+), 11 deletions(-)
 create mode 100644 hw/display/aspeed-vga.h
 create mode 100644 hw/display/aspeed-vga.c

-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-10  1:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10  1:44 [PATCH v2 0/6] Add ASPEED VGA PCI device support Jamin Lin
2026-09-10  1:44 ` [PATCH v2 1/6] hw/display/vga: Allow a device to report vendor specific blanking Jamin Lin
2026-09-10  1:44 ` [PATCH v2 2/6] hw/display/vga: Move VGA_HPEL_NEUTRAL to vga_int.h Jamin Lin
2026-09-10  1:44 ` [PATCH v2 3/6] hw/display/aspeed-vga: Add ASPEED VGA display controller Jamin Lin
2026-09-10  1:44 ` [PATCH v2 4/6] hw/display/aspeed-vga: Add the hardware overlay cursor Jamin Lin
2026-09-10  1:44 ` [PATCH v2 5/6] hw/display/aspeed-vga: Add the 2D graphics engine Jamin Lin
2026-09-10  1:44 ` [PATCH v2 6/6] docs/system/arm/aspeed: Document the VGA display controller Jamin Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).