From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4p2Z-00040W-E3 for qemu-devel@nongnu.org; Mon, 23 May 2016 08:33:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4p2T-0008Ic-37 for qemu-devel@nongnu.org; Mon, 23 May 2016 08:32:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4p2S-0008Hl-To for qemu-devel@nongnu.org; Mon, 23 May 2016 08:32:53 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71E9712B37 for ; Mon, 23 May 2016 12:32:51 +0000 (UTC) From: Gerd Hoffmann Date: Mon, 23 May 2016 14:32:41 +0200 Message-Id: <1464006764-8115-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1464006764-8115-1-git-send-email-kraxel@redhat.com> References: <1464006764-8115-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 5/7] virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , "Michael S. Tsirkin" From: Marc-Andr=C3=A9 Lureau The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu.c | 4 ++-- include/hw/virtio/virtio-gpu.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 643dd92..bc10d5d 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -929,8 +929,8 @@ static void virtio_gpu_device_realize(DeviceState *qd= ev, Error **errp) bool have_virgl; int i; =20 - if (g->conf.max_outputs > VIRTIO_GPU_MAX_SCANOUT) { - error_setg(errp, "invalid max_outputs > %d", VIRTIO_GPU_MAX_SCAN= OUT); + if (g->conf.max_outputs > VIRTIO_GPU_MAX_SCANOUTS) { + error_setg(errp, "invalid max_outputs > %d", VIRTIO_GPU_MAX_SCAN= OUTS); return; } =20 diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gp= u.h index 13b0ab0..1602a13 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -27,8 +27,6 @@ =20 #define VIRTIO_ID_GPU 16 =20 -#define VIRTIO_GPU_MAX_SCANOUT 4 - struct virtio_gpu_simple_resource { uint32_t resource_id; uint32_t width; @@ -98,8 +96,8 @@ typedef struct VirtIOGPU { QTAILQ_HEAD(, virtio_gpu_ctrl_command) cmdq; QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq; =20 - struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUT]; - struct virtio_gpu_requested_state req_state[VIRTIO_GPU_MAX_SCANOUT]; + struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUTS]; + struct virtio_gpu_requested_state req_state[VIRTIO_GPU_MAX_SCANOUTS]= ; =20 struct virtio_gpu_conf conf; int enabled_output_bitmask; --=20 1.8.3.1