From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5aDw-0003DN-10 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 09:51:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5aDr-0008Aj-Vj for qemu-devel@nongnu.org; Thu, 18 Jun 2015 09:51:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5aDr-0008AV-Na for qemu-devel@nongnu.org; Thu, 18 Jun 2015 09:51:15 -0400 Date: Thu, 18 Jun 2015 15:51:11 +0200 From: Christophe Fergeau Message-ID: <20150618135111.GM17124@edamame.cdg.redhat.com> References: <1434117910-21709-1-git-send-email-fziglio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2uzDqHpccQJpqF2n" Content-Disposition: inline In-Reply-To: <1434117910-21709-1-git-send-email-fziglio@redhat.com> Subject: Re: [Qemu-devel] [Spice-devel] [RFC PATCH v2] qxl: allows to specify head limit to qxl driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frediano Ziglio Cc: spice-devel@lists.freedesktop.org, Gerd Hoffmann , qemu-devel@nongnu.org --2uzDqHpccQJpqF2n Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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). >=20 > 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. >=20 > Signed-off-by: Frediano Ziglio > --- > hw/display/qxl.c | 26 +++++++++++++++++++++----- > hw/display/qxl.h | 3 +++ > 2 files changed, 24 insertions(+), 5 deletions(-) >=20 > Change from v1: > - check spice-server version. >=20 > 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(PCIQXLDe= vice *qxl, int replay) > QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG, > 0)); > } else { > +#if SPICE_SERVER_VERSION >=3D 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 =3D 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(QXLInstan= ce *sin, > PCIQXLDevice *qxl =3D container_of(sin, PCIQXLDevice, ssd.qxl); > QXLRom *rom =3D memory_region_get_ram_ptr(&qxl->rom_bar); > int i; > + unsigned max_outputs =3D ARRAY_SIZE(rom->client_monitors_config.head= s); > =20 > if (qxl->revision < 4) { > trace_qxl_client_monitors_config_unsupported_by_device(qxl->id, > @@ -1014,17 +1021,23 @@ static int interface_client_monitors_config(QXLIn= stance *sin, > if (!monitors_config) { > return 1; > } > + > +#if SPICE_SERVER_VERSION >=3D 0x000c06 /* release 0.12.6 */ > + /* limit number of outputs based on setting limit */ =AB based on 'max_outputs' command line parameter =BB maybe ? Patch looks good to me. Christophe --2uzDqHpccQJpqF2n Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJVgszPAAoJEKnYwhQprGyCdlIP/3hsw8HXZVxVasGqjbxifghl 2AXrJ2X3uPpFEb1aaU6jdykr9MynU6u7xPSSyLypOqC+P4qqiTC2Ow4jNGdNv7ep Uwvbu4GnnOEYBh/60Y3ljGQz3c8sxKpF//D4UFQ6chUHHs3I2ryE5A/PgHoPgv5q tD6AQPwkglWcDOe7EWkdlXRXctY7EqeAVwaOCciRixPY1kbVuV8I5xGywuck1f7M 3XosXYo0rJNZbr2cBn7SnJucbrRzBgX3E5ZNbDUizkHd8MXM0NTcC0Uf8lWock4p oDchds35dv6mQ/SxQPZS/m3Dv/yqdPXP/CplDo+Jmnouub/eF5WJsmHj5nW8ebV6 mCz9E0adiJvB7G0ktxRAnD5sF1HioaLgYpjL3KcRUgQeuLS6+miX0ZdX46wOX4+L ciCheJ/Y7WjNDS/SNi94ZIEyowFEDKyXuIO7pMfvDbOHWG89oAdB3cjkYHuVojlK wjdZ9tQt7fzXzp5YSIgiIG4qiMrvlzHZ0ILVVwmx9x7Au/2dzJr5jVPp0Q8P7S1G 82TCdST6ptAaiuqeQRNKIO/uq6qO983JzIU0yGz0HWMaiHC56iXqn0ZN02HBKgbM 5htDkm0f6Fs3GeFKJUB18CpB2yGXpyeOKYd0ZB+g4GQCdoCa+1V8CaVYgJmEnyjp mtJtNTYvuPi919uqQomh =/ACd -----END PGP SIGNATURE----- --2uzDqHpccQJpqF2n--