All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Fergeau <cfergeau@redhat.com>
To: Frediano Ziglio <fziglio@redhat.com>
Cc: spice-devel@lists.freedesktop.org,
	Gerd Hoffmann <kraxel@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Spice-devel] [RFC PATCH v2] qxl: allows to specify head limit to qxl driver
Date: Thu, 18 Jun 2015 15:51:11 +0200	[thread overview]
Message-ID: <20150618135111.GM17124@edamame.cdg.redhat.com> (raw)
In-Reply-To: <1434117910-21709-1-git-send-email-fziglio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]

On Fri, Jun 12, 2015 at 03:05:10PM +0100, Frediano Ziglio wrote:
> This patch allow to limit number of heads using qxl driver. By default
> qxl driver is not limited on any kind on head use so can decide to use
> as much heads.
> 
> libvirt has this as a video card parameter (actually set to 1 but not
> used). This parameter will allow to limit setting a use can do (which
> could be confusing).
> 
> This patch rely on some change in spice-protocol which are not still
> accepted. See
> http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html.
> 
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
>  hw/display/qxl.c | 26 +++++++++++++++++++++-----
>  hw/display/qxl.h |  3 +++
>  2 files changed, 24 insertions(+), 5 deletions(-)
> 
> Change from v1:
> - check spice-server version.
> 
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index b220e2d..d6e9369 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -272,6 +272,12 @@ static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int replay)
>                      QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG,
>                      0));
>      } else {
> +#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
> +        if (qxl->max_outputs) {
> +            spice_qxl_set_monitors_config_limit(&qxl->ssd.qxl,
> +                                                qxl->max_outputs);
> +        }
> +#endif
>          qxl->guest_monitors_config = qxl->ram->monitors_config;
>          spice_qxl_monitors_config_async(&qxl->ssd.qxl,
>                  qxl->ram->monitors_config,
> @@ -992,6 +998,7 @@ static int interface_client_monitors_config(QXLInstance *sin,
>      PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
>      QXLRom *rom = memory_region_get_ram_ptr(&qxl->rom_bar);
>      int i;
> +    unsigned max_outputs = ARRAY_SIZE(rom->client_monitors_config.heads);
>  
>      if (qxl->revision < 4) {
>          trace_qxl_client_monitors_config_unsupported_by_device(qxl->id,
> @@ -1014,17 +1021,23 @@ static int interface_client_monitors_config(QXLInstance *sin,
>      if (!monitors_config) {
>          return 1;
>      }
> +
> +#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
> +    /* limit number of outputs based on setting limit */

« based on 'max_outputs' command line parameter » maybe ?

Patch looks good to me.

Christophe

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-06-18 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 14:05 [Qemu-devel] [RFC PATCH v2] qxl: allows to specify head limit to qxl driver Frediano Ziglio
2015-06-18 13:51 ` Christophe Fergeau [this message]

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=20150618135111.GM17124@edamame.cdg.redhat.com \
    --to=cfergeau@redhat.com \
    --cc=fziglio@redhat.com \
    --cc=kraxel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.