From patchwork Wed May 11 09:22:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Xin X-Patchwork-Id: 9066431 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 07870BF29F for ; Wed, 11 May 2016 09:23:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78E4920154 for ; Wed, 11 May 2016 09:23:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6D0DC200DE for ; Wed, 11 May 2016 09:23:24 +0000 (UTC) Received: from localhost ([::1]:51184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0QMV-0003hj-4r for patchwork-qemu-devel@patchwork.kernel.org; Wed, 11 May 2016 05:23:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0QMN-0003c6-EQ for qemu-devel@nongnu.org; Wed, 11 May 2016 05:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0QMJ-0000tY-0O for qemu-devel@nongnu.org; Wed, 11 May 2016 05:23:14 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:29264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0QMI-0000pZ-BL for qemu-devel@nongnu.org; Wed, 11 May 2016 05:23:10 -0400 Received: from 172.24.1.137 (EHLO szxeml433-hub.china.huawei.com) ([172.24.1.137]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CBO15025; Wed, 11 May 2016 17:22:54 +0800 (CST) Received: from localhost (10.177.218.69) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.235.1; Wed, 11 May 2016 17:22:44 +0800 From: Wang Xin To: , Date: Wed, 11 May 2016 17:22:26 +0800 Message-ID: <1462958546-22492-1-git-send-email-wangxinxin.wang@huawei.com> X-Mailer: git-send-email 2.8.1.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.218.69] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.5732F9F1.0062, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: dbf7a524b0ba29eff1059e6c1d5bbdc0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.66 Subject: [Qemu-devel] [PATCH] vga: use vbe_enabled() helper 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit bfa0f15 add vbe_enabled() helper, while it forget to replace the code in vbe_ioport_write_data(). Signed-off-by: Wang Xin --- hw/display/vga.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 4a55ec6..455ef51 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -778,8 +778,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val) vga_update_memory_access(s); break; case VBE_DISPI_INDEX_ENABLE: - if ((val & VBE_DISPI_ENABLED) && - !(s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED)) { + if ((val & VBE_DISPI_ENABLED) && !vbe_enabled(s)) { s->vbe_regs[VBE_DISPI_INDEX_VIRT_WIDTH] = 0; s->vbe_regs[VBE_DISPI_INDEX_X_OFFSET] = 0;