[Spice-devel] [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

Lukáš Hrázký lhrazky at redhat.com
Mon Nov 5 09:46:31 UTC 2018


On Mon, 2018-11-05 at 03:46 -0500, Frediano Ziglio wrote:
> > 
> > > 2. Have a single function as follows:
> > > 
> > > void spice_qxl_set_device_info(QXLInstance *instance,
> > >                                const char *device_address,
> > >                                uint32_t device_display_id_start,
> > >                                uint32_t device_display_id_count);
> > 
> > How about:
> > 
> > void spice_qxl_set_device_info(QXLInstance *instance,
> >                                const char *device_address,
> >                                uint32_t device_display_id);
> > 
> > I don't think we need start+count:
> > 
> >  * For single-head devices device_display_id will be zero.
> >  * For one-channel-per-head multihead devices (i.e. virtio-gpu)
> >    device_display_id will enumerate the heads (so everybody can figure
> >    which channel is which head).
> >  * For one-channel-per-device multihead devices (i.e. qxl/linux)
> >    device_display_id will be zero too.  Number of heads is set via
> >    spice_qxl_set_max_monitors().
> > 
> > cheers,
> >   Gerd
> > 
> 
> What about "Console VNC" case? Passing a dummy (like -1) value for device_display_id ?
> Kind of "I don't know which output is."

I'm not sure -1 will be practically helpful for anything? What will
happen if we use 0 for it? We still aren't sure how we want to handle
the VNC console anyway, should we wait untill we know?

Maybe I should use int32_t instead of uint32_t to have the option to
use -1 if we need it later?

Cheers,
Lukas

> Frediano


More information about the Spice-devel mailing list