Re: RfC: vfio: add vgpu edid support?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018.09.07 16:05:15 +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> I consider adding EDID support to qemu, for display configuration.
> 
> qemu patches are here:
>     https://git.kraxel.org/cgit/qemu/log/?h=sirius/edid
> 
> linux kernel patches are here:
>     https://git.kraxel.org/cgit/linux/log/?h=edid
> 
> Current (experimental) patches have support for the stdvga and
> virtio-vga.
> 
> I think it would be quite useful for vgpu too.  Unlike emulated devices
> vgpu's do not have a paravirtual display configuration path, because the
> standard way to configure the display is to simply read the edid from
> the monitor.
> 
> Intel has two hard-coded edid blobs for that (depending on vgpu type).
> Not sure how nvidia handles this, but probably simliar.  With qemu
> passing a edid blob for the virtual display instead of using the
> hardcoded blob we could make the display configuration much more
> flexible.
> 
> Ideally qemu would also be able to update the edid blob at any time, and
> the vgpu will notify the guest about it (probably by emulating a monitor
> hotplug event).  The guest can react on qemu window resizing then and
> adapt automatically, simliar to how it works with qxl and virtio-gpu.

What's the frequency for those edid update during resizing? Looks it's
possible to bring hotplug storm that I'm not sure if all guest drivers
for gvt has proper handling.

> 
> The guest and the vgpu should be able to handle "odd" non-standard
> display resolutions like this (coming from random window resizing):
> 
>    Detailed mode: Clock 106.620 MHz, 477 mm x 330 mm
>                   1212 1515 1551 1636 hborder 0
>                    840  844  848  869 vborder 0
>                   -hsync -vsync 
>                   VertFreq: 74 Hz, HorFreq: 65171 Hz
>

Some odd timing might not be supported, e.g can't get a sane PLL setting
calculation for clock required. As gvt exposes a virtual display pipeline
following hw definition, so guest driver still depend on sane output, I
think that may just go wrong with arbitrary mode..

> +/**
> + * VFIO_DEVICE_GFX_EDID_SET - _IOW(VFIO_TYPE, VFIO_BASE + 18,
> + *                                 struct vfio_device_gfx_edid_set)
> + *
> + * Set edid blob.
> + *
> + * Should trigger monitor hotplug emulation, to notifiy the guest os
> + * that the edid has changed.
> + *
> + */
> +struct vfio_device_gfx_edid_set {
> +	__u32 argsz;
> +	__u32 flags;
> +	/* in */
> +	__u8  edid[256];
> +};
> +

I assume you have defined return value for the set too right? In case
for driver can't handle or invalid edid blob, etc.

> +#define VFIO_DEVICE_GFX_EDID_SET _IO(VFIO_TYPE, VFIO_BASE + 18)
> +
>  /* -------- API for Type1 VFIO IOMMU -------- */
>  
>  /**
> -- 
> 2.9.3
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux