> -----Original Message----- > From: Gerd Hoffmann [mailto:kraxel@xxxxxxxxxx] > Sent: Monday, September 10, 2018 6:35 PM > To: Zhang, Tina <tina.zhang@xxxxxxxxx> > Cc: intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; Kirti Wankhede > <kwankhede@xxxxxxxxxx>; Alex Williamson <alex.williamson@xxxxxxxxxx> > Subject: Re: vfio: add vgpu edid support? > > Hi, > > > > 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. > > > > Sounds interesting. People are asking us to add more display modes. > > With this proposal, we could provide any required mode in a flexible way. > > Yes, exactly. > > > But the hard-coded resolution might still be needed. As it is used for > > vgpu resources allocation during vgpu creation before running a qemu. > > And a vgpu cannot support a resolution bigger than the one used for > > its resources allocation. > > The CAPS ioctl below should handle that: > > > > +/** > > > + * VFIO_DEVICE_GFX_EDID_CAPS - _IOW(VFIO_TYPE, VFIO_BASE + 17, > > > + * struct vfio_device_gfx_edid_caps) > > > + * > > > + * Get edid capabilities. > > > + * > > > + * Drivers must support either none or both GFX_EDID ioctls, > > > + * so the CAPS ioctl can also be used to probe for edid support. > > > + * > > > + * max_xres, max_yres - maximum display resolution supported. > > > + * value "0" means no restriction. > > > + * > > > + */ > > > +struct vfio_device_gfx_edid_caps { > > > + __u32 argsz; > > > + __u32 flags; > > > + /* out */ > > > + __u32 max_xres; > > > + __u32 max_yres; > > > +}; Yeah, that's workable. And I also find in qemu_edid_generate(), the generated edid has display port as the video input type. That's compatible with gvt-g hard-coded edid. So, do you plan to use VFIO_DEVICE_GFX_EDID_SET dynamically? To change the display resolution during guest running? Could you elaborate more on what the use case would be? Besides, I think the proposed "VFIO_DEVICE_GFX_EDID_SET" can also provide host a capability to trigger display monitor hot-plug event to guest, when host wants to temporarily turn off vfio/display. Qemu can pass a special edid to vendor driver to tell vendor driver to plug the guest display monitor out. Thanks. BR, Tina > > cheers, > Gerd