[PATCH 1/2] virtio: New virtio_gpu driver

Jiaxun Yang jiaxun.yang at flygoat.com
Fri May 17 04:26:04 CEST 2024



在2024年5月17日五月 上午2:56,Heinrich Schuchardt写道:
[...]
>>+config VIRTIO_GPU_SIZE_X
>>+	int "Width of display (X resolution)"
>>+	default 1280
>
> 1920x1080 would look like a reasonable default for me.

1280x1024 was chosen because it is the largest resolution being defined in
VESA VBE, hence guaranteed compatibility everywhere. I think it's Linux's
behaviour as well.

Carving out a huge framebuffer out of memory might be a challenge on
some platforms, so I'd like to keep it small.

>
>
>>+	help
>>+	  Sets the width of the display.
>>+
>>+	  These two options control the size of the display set up by QEMU.
>>+	  Typical sizes are 1024 x 768 or 1280 x 1024.
>>+
>>+config VIRTIO_GPU_SIZE_Y
>>+	int "High of display (Y resolution)"
>>+	default 1024
>>+	help
>>+	  Sets the height of the display.
>>+
>>+	  These two options control the size of the display set up by QEMU.
>>+	  Typical sizes are 1024 x 768 or 1280 x 1024.
>
> Haven't had such small monitors for a while. Why should this be typical?

Haha I copied this from bochs driver's help text, I can replace it with
more reasonable text.

>
> Doesn't QEMU allow to read the size of the output window at runtime?

Unfortunately, it's always guest to determine the size of display.
VIRTIO_GPU_CMD_GET_DISPLAY_INFO simply returned 0 as size of the scanout
before guest initialize it first.

It is possible to parse EDID provided by QEMU to get a resolution list,
but I found implementing the whole modesetting procdure here is a little
bit unnecessary.

I think resizing display in OS is generally done with VMM's guest agent.

>
> Best regards
>
> Heinrich
>

-- 
- Jiaxun


More information about the U-Boot mailing list