> On Mon, 2018-11-05 at 07:52 +0100, Gerd Hoffmann 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(). > > That requires nontrivial and unexpected logic for the one-channel-per- > device multihead devices case. The API should be doing what it says and > the dumber the better, this seems too smart to me... > > That said, I don't find it significantly worse than the other options > (none of which seems great), so I'd just like we reached some consesus > and be done with it... > > Cheers, > Lukas > > > cheers, > > Gerd > > Personally I prefer the single function API, either with or without count. About the not trivial for compatibility you'll have to support Qemu versions that either: - does not call new APIs or spice_qxl_set_max_monitors. A QXL card will have the maximum possible number of monitors in the guest; - does not call new APIs but call spice_qxl_set_max_monitors. A QXL card will have a maximum of monitor specified by spice_qxl_set_max_monitors in the guest; - call new APIs (the choice in this case to call spice_qxl_set_max_monitors or not is yours). Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel