qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Frediano Ziglio <fziglio@redhat.com>
To: "Lukáš Hrázký" <lhrazky@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest
Date: Mon, 5 Nov 2018 07:42:09 -0500 (EST)	[thread overview]
Message-ID: <1678079774.40522989.1541421729839.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1541420337.16655.496.camel@redhat.com>

> 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

  reply	other threads:[~2018-11-05 12:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 14:36 [Qemu-devel] [RFC PATCH spice/qemu v2 0/2] QXL interface to set monitor ID Lukáš Hrázký
2018-10-17 14:36 ` [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest Lukáš Hrázký
2018-10-18  7:16   ` Frediano Ziglio
2018-10-18  8:44     ` Gerd Hoffmann
2018-10-22 11:46     ` Lukáš Hrázký
2018-11-01 15:47       ` Lukáš Hrázký
2018-11-05  6:52         ` Gerd Hoffmann
2018-11-05  8:46           ` Frediano Ziglio
2018-11-05  9:46             ` Lukáš Hrázký
2018-11-05 11:17             ` Gerd Hoffmann
2018-11-05 12:18           ` Lukáš Hrázký
2018-11-05 12:42             ` Frediano Ziglio [this message]
2018-11-05 13:08             ` Gerd Hoffmann
2018-11-05 16:03               ` Lukáš Hrázký
2018-11-05 17:37                 ` Frediano Ziglio
2018-11-06  6:37                 ` Gerd Hoffmann
2018-10-17 14:36 ` [Qemu-devel] [RFC PATCH qemu v2 2/2] spice: set device address and device display ID in QXL interface Lukáš Hrázký
2018-10-18  7:38   ` Frediano Ziglio
2018-10-22 11:52     ` Lukáš Hrázký

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1678079774.40522989.1541421729839.JavaMail.zimbra@redhat.com \
    --to=fziglio@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lhrazky@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=spice-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).