From patchwork Tue Oct 11 14:58:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 118995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BB480B6F18 for ; Wed, 12 Oct 2011 02:01:31 +1100 (EST) Received: from localhost ([::1]:36180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdpb-000182-Ed for incoming@patchwork.ozlabs.org; Tue, 11 Oct 2011 11:01:23 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdpR-00017l-EZ for qemu-devel@nongnu.org; Tue, 11 Oct 2011 11:01:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDdpP-0005uY-SA for qemu-devel@nongnu.org; Tue, 11 Oct 2011 11:01:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdpP-0005uG-Kf for qemu-devel@nongnu.org; Tue, 11 Oct 2011 11:01:11 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9BF19ZA011735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Oct 2011 11:01:10 -0400 Received: from bow.tlv.redhat.com (dhcp-3-73.tlv.redhat.com [10.35.3.73]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9BF18PM009444; Tue, 11 Oct 2011 11:01:08 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Tue, 11 Oct 2011 16:58:40 +0200 Message-Id: <1318345120-22614-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: kraxel@redhat.com Subject: [Qemu-devel] [PATCH] console: console_select: check for nop 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 --- qxl screen_dump is broken since f81bdefb6. That commit didn't introduce the problem, the problem is in qxl. But I've not managed to figure out the real problem yet. This patch works around it, but in a nice way - if you only have a single console or never set the other consoles active then there will not be a displaysurface reallocation which is the cause of the wrong rendering. To see rendering errors, run with sdl and spice, then do a screen dump. The sdl screen will be updated with zeros (not quite - it's pointing at a wrong location that is almost but not totally zeroed). console.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/console.c b/console.c index e43de92..7f0900f 100644 --- a/console.c +++ b/console.c @@ -1067,6 +1067,9 @@ void console_select(unsigned int index) if (index >= MAX_CONSOLES) return; + if (active_console == consoles[index]) { + return; + } if (active_console) { active_console->g_width = ds_get_width(active_console->ds); active_console->g_height = ds_get_height(active_console->ds);