From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfASp-0000sW-Bu for qemu-devel@nongnu.org; Thu, 14 Jun 2012 09:52:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfASh-0001PA-49 for qemu-devel@nongnu.org; Thu, 14 Jun 2012 09:51:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfASg-0001Oc-RG for qemu-devel@nongnu.org; Thu, 14 Jun 2012 09:51:47 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5EDpjmV000579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 14 Jun 2012 09:51:45 -0400 From: Alon Levy Date: Thu, 14 Jun 2012 16:51:43 +0300 Message-Id: <1339681903-657-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH] qxl: fix broken n_modes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kraxel@redhat.com Signed-off-by: Alon Levy --- Hi Gerd, Unfortunately I didn't test my previous patch "qxl: add vgamem_size_mb and vgamem_size" with the current drivers. This patch is not merged since I didn't know if it will reach before/after anothony pull. If before, then please merge it into the bad patch. Thanks in advance, Alon hw/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/qxl.c b/hw/qxl.c index 4c68769..458b9fc 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -322,7 +322,7 @@ static void init_qxl_rom(PCIQXLDevice *d) rom->slots_end = NUM_MEMSLOTS - 1; rom->n_surfaces = cpu_to_le32(NUM_SURFACES); - for (i = 0; i < modes->n_modes; i++) { + for (i = 0; i < ARRAY_SIZE(qxl_modes); i++) { fb = qxl_modes[i].y_res * qxl_modes[i].stride; if (fb <= d->vgamem_size) { n_modes++; -- 1.7.10.1