From patchwork Wed Jun 8 14:11:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 632298 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rPr8d3DPWz9sf9 for ; Thu, 9 Jun 2016 00:16:33 +1000 (AEST) Received: from localhost ([::1]:57267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeHX-0004ts-DW for incoming@patchwork.ozlabs.org; Wed, 08 Jun 2016 10:16:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeD9-0000hw-Sq for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:12:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAeD1-0007ss-Ph for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:11:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAeD1-0007sj-Jw for qemu-devel@nongnu.org; Wed, 08 Jun 2016 10:11:51 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1440A12B29 for ; Wed, 8 Jun 2016 14:11:49 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-123.ams2.redhat.com [10.36.116.123]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u58EBmGo010947; Wed, 8 Jun 2016 10:11:48 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id B77F78194C; Wed, 8 Jun 2016 16:11:47 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 8 Jun 2016 16:11:41 +0200 Message-Id: <1465395101-13580-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 08 Jun 2016 14:11:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] qxl: handle no updates in interface_update_area_complete X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Simply return early in case there are no updated rects. Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 919dc5c..f867cdf 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -893,7 +893,8 @@ static void interface_update_area_complete(QXLInstance *sin, int qxl_i; qemu_mutex_lock(&qxl->ssd.lock); - if (surface_id != 0 || !qxl->render_update_cookie_num) { + if (surface_id != 0 || !num_updated_rects || + !qxl->render_update_cookie_num) { qemu_mutex_unlock(&qxl->ssd.lock); return; }