From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJigK-0003pb-L1 for qemu-devel@nongnu.org; Wed, 11 Sep 2013 07:34:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJigD-0005WO-CO for qemu-devel@nongnu.org; Wed, 11 Sep 2013 07:34:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJigD-0005W7-4L for qemu-devel@nongnu.org; Wed, 11 Sep 2013 07:33:53 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8BBXqav031157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Sep 2013 07:33:52 -0400 From: Gerd Hoffmann Date: Wed, 11 Sep 2013 13:33:37 +0200 Message-Id: <1378899220-7631-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/4] qxl: define qxl operating on 4k pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, famz@redhat.com, Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 5 +++-- hw/display/qxl.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index c50e285..f0bfd2c 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -364,7 +364,7 @@ static void init_qxl_rom(PCIQXLDevice *d) num_pages = d->vga.vram_size; num_pages -= ram_header_size; num_pages -= surface0_area_size; - num_pages = num_pages / TARGET_PAGE_SIZE; + num_pages = num_pages / QXL_PAGE_SIZE; rom->draw_area_offset = cpu_to_le32(0); rom->surface0_area_size = cpu_to_le32(surface0_area_size); @@ -528,7 +528,8 @@ static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info) info->num_memslots = NUM_MEMSLOTS; info->num_memslots_groups = NUM_MEMSLOTS_GROUPS; info->internal_groupslot_id = 0; - info->qxl_ram_size = le32_to_cpu(qxl->shadow_rom.num_pages) << TARGET_PAGE_BITS; + info->qxl_ram_size = + le32_to_cpu(qxl->shadow_rom.num_pages) << QXL_PAGE_BITS; info->n_surfaces = qxl->ssd.num_surfaces; } diff --git a/hw/display/qxl.h b/hw/display/qxl.h index 8e9b0c2..84f0182 100644 --- a/hw/display/qxl.h +++ b/hw/display/qxl.h @@ -27,6 +27,9 @@ enum qxl_mode { #define QXL_NUM_DIRTY_RECTS 64 +#define QXL_PAGE_BITS 12 +#define QXL_PAGE_SIZE (1 << QXL_PAGE_BITS); + typedef struct PCIQXLDevice { PCIDevice pci; SimpleSpiceDisplay ssd; -- 1.8.3.1