From patchwork Mon Oct 8 10:49:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 189996 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 A37682C030E for ; Mon, 8 Oct 2012 22:31:58 +1100 (EST) Received: from localhost ([::1]:41518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLAv0-0001Su-KH for incoming@patchwork.ozlabs.org; Mon, 08 Oct 2012 06:50:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLAuR-0008JV-8h for qemu-devel@nongnu.org; Mon, 08 Oct 2012 06:50:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLAuI-0006dI-IN for qemu-devel@nongnu.org; Mon, 08 Oct 2012 06:50:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLAuI-0006cz-AA for qemu-devel@nongnu.org; Mon, 08 Oct 2012 06:49:54 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q98Anr0Z027451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Oct 2012 06:49:53 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q98AnqxL030898; Mon, 8 Oct 2012 06:49:53 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 144C040313; Mon, 8 Oct 2012 12:49:51 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 8 Oct 2012 12:49:44 +0200 Message-Id: <1349693391-32704-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1349693391-32704-1-git-send-email-kraxel@redhat.com> References: <1349693391-32704-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/8] qxl: always update displaysurface on resize 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 Don't try to be clever and skip displaysurface reinitialization in case the size hasn't changed. Other parameters might have changed nevertheless, for example depth or stride, resulting in rendering being broken then. Trigger: boot linux guest with vesafb, start X11, make sure both vesafb and X11 use the display same resolution. Then watch X11 screen being upside down. Signed-off-by: Gerd Hoffmann --- hw/qxl-render.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/hw/qxl-render.c b/hw/qxl-render.c index e2e3fe2..b66c168 100644 --- a/hw/qxl-render.c +++ b/hw/qxl-render.c @@ -99,7 +99,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) { VGACommonState *vga = &qxl->vga; int i; - DisplaySurface *surface = vga->ds->surface; if (qxl->guest_primary.resized) { qxl->guest_primary.resized = 0; @@ -112,9 +111,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) qxl->guest_primary.qxl_stride, qxl->guest_primary.bytes_pp, qxl->guest_primary.bits_pp); - } - if (surface->width != qxl->guest_primary.surface.width || - surface->height != qxl->guest_primary.surface.height) { if (qxl->guest_primary.qxl_stride > 0) { qemu_free_displaysurface(vga->ds); qemu_create_displaysurface_from(qxl->guest_primary.surface.width,