In 454f4b0f, we started down the path of supporting separate
configurations per display head (e.g., you have 2 heads - one with
EDID name "AAA" and the other with EDID name "BBB").
In this change, we add resolution to this configuration surface (e.g.,
you have 2 heads - one with resolution 111x222 and the other with
resolution 333x444).
-display vnc=localhost:0,id=aaa,display=vga,head=0 \
-display vnc=localhost:1,id=bbb,display=vga,head=1 \
-device '{"driver":"virtio-vga",
"max_outputs":2,
"id":"vga",
"outputs":[
{
"name":"AAA",
"xres":111,
"yres":222
},
{
"name":"BBB",
"xres":333,
"yres":444
}
]}'
Here is the behavior matrix of the current resolution configuration
surface (xres/yres) with the new resolution configuration surface
(outputs[i].xres/yres).
Case: !(xres || yres) && !(outputs[i].xres || outputs[i].yres)
Behavior: current behavior - outputs[0] enabled with default xres/yres
Case: (xres || yres) && !(outputs[i].xres || outputs[i].yres)
Behavior: current behavior - outputs[0] enabled with xres/yres
Case: !(xres || yres) && (outputs[i].xres || outputs[i].yres)
Behavior: new behavior - outputs[i] enabled with outputs[i].xres/yres
Case: (xres || yres) && (outputs[i].xres || outputs[i].yres)
Behavior: new behavior - outputs[i] enabled with outputs[i].xres/yres
Changelist:
* v2: changes after v1 review + 10.2 rebase
* updated code, commit message, and cover letter to match new res config logic
* marked new VirtIOGPUOutput fields as optional and since 10.2
* v1: initial patch
Andrew Keesler (1):
Support per-head resolutions with virtio-gpu
hw/display/virtio-gpu-base.c | 10 ++++++++++
include/hw/virtio/virtio-gpu.h | 2 ++
qapi/virtio.json | 6 +++++-
3 files changed, 17 insertions(+), 1 deletion(-)
--
2.51.0.338.gd7d06c2dae-goog