Skip to content

Add ASPEED VGA PCI device support

Jamin Lin qemu-arm qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesNew
  2. v17 patches 2 repliesSuperseded

Changes in v2 from the cover letter

1. Drop "Add the ASPEED VGA device id" patch

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6hw/display/vga: Allow a device to report vendor specific blankinghw/display/vga.c hw/display/vga_int.h+3 -20 replies
2/6hw/display/vga: Move VGA_HPEL_NEUTRAL to vga_int.hhw/display/vga.c hw/display/vga_int.h+8 -70 replies
3/6hw/display/aspeed-vga: Add ASPEED VGA display controllerhw/display/Kconfig hw/display/aspeed-vga.c hw/display/aspeed-vga.h +2 more+550 -00 replies
4/6hw/display/aspeed-vga: Add the hardware overlay cursorhw/display/aspeed-vga.c hw/display/aspeed-vga.h+196 -00 replies
5/6hw/display/aspeed-vga: Add the 2D graphics enginehw/display/aspeed-vga.c hw/display/aspeed-vga.h hw/display/trace-events+274 -00 replies
6/6docs/system/arm/aspeed: Document the VGA display controllerdocs/system/arm/aspeed.rst+35 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] Add ASPEED VGA PCI device support

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
Signature · 1 line
2.53.0