From patchwork Thu Jun 14 13:51:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 164933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BD3C3B703B for ; Thu, 14 Jun 2012 23:52:09 +1000 (EST) Received: from localhost ([::1]:41465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfAT1-0000sr-MU for incoming@patchwork.ozlabs.org; Thu, 14 Jun 2012 09:52:07 -0400 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 Received: from garlic.redhat.com (vpn-203-226.tlv.redhat.com [10.35.203.226]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q5EDphcX031893; Thu, 14 Jun 2012 09:51:44 -0400 From: Alon Levy To: qemu-devel@nongnu.org, kraxel@redhat.com Date: Thu, 14 Jun 2012 16:51:43 +0300 Message-Id: <1339681903-657-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] qxl: fix broken n_modes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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++;