From nobody Fri Nov 14 19:24:24 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589815016; cv=none; d=zohomail.com; s=zohoarc; b=f8JKn9aVqbb/r9Q/Sg4oopEBjaCxiwR2ZX8Sv5CHe7+OcItH5Rmef1d49/skohOJklvmKadfe70fwJTxy8YUU6Teq0I1zpJNRBagNpdO4X5WQ2xplBeyiIzYhpcW3XXu6NmlA5WxNcJFJsse0JJiJUzyunlwfxIreZ1r4aPWWSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589815016; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=+iI8FGRKs81adLpcBjB+Oh9YO05lIOQpzFUXVMZs9XA=; b=dXbmpaig5ixBaks+izV5+KzMVwYkabWJsUn85J6xKKZCfB7sUifVF0WGy4a7W4csRe7U/S0VVPKcY8aVPCjVLngnK4jHnYsmrtKgxmF9F9iW2mdz/rFEh+NwY74xCgcsxdb+MWjsKNyMXOiAX3RLz9qND8qPQQ2Y/Sl4hfMfqMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589815016085861.0433496753561; Mon, 18 May 2020 08:16:56 -0700 (PDT) Received: from localhost ([::1]:45298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jahVe-0004i2-HY for importer@patchew.org; Mon, 18 May 2020 11:16:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jahS7-0008DI-Dn for qemu-devel@nongnu.org; Mon, 18 May 2020 11:13:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:23405 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jahS0-0005wr-U4 for qemu-devel@nongnu.org; Mon, 18 May 2020 11:13:15 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-ZLrXOuxSPE2VLEQSGIjyag-1; Mon, 18 May 2020 11:13:04 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 99CC1805726; Mon, 18 May 2020 15:13:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6B8A99ED; Mon, 18 May 2020 15:12:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A50F59DAD; Mon, 18 May 2020 17:12:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589814787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=+iI8FGRKs81adLpcBjB+Oh9YO05lIOQpzFUXVMZs9XA=; b=P1OpDumv24JBrnngvxcOqJVEK0+tzFiIygOuFUF2TqiPr5eQlSRThDQQMOBqgCZU/iNjiT xq9Dylt+a/4o/TnpO4Fp/EtGnhA9e5RxofaFDrL2/5zA/3I2b/n1W0/av4S1FUQ3E+IR6d vRi7qRTk6EKOTLW+rUIAV74X0l1dNoE= X-MC-Unique: ZLrXOuxSPE2VLEQSGIjyag-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 4/8] Revert "hw/display/ramfb: lock guest resolution after it's set" Date: Mon, 18 May 2020 17:12:51 +0200 Message-Id: <20200518151255.10785-5-kraxel@redhat.com> In-Reply-To: <20200518151255.10785-1-kraxel@redhat.com> References: <20200518151255.10785-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Paolo Bonzini , Alex Williamson , Gerd Hoffmann , Hou Qiming Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This reverts commit a9e0cb67b7f4c485755659f9b764c38b5f970de4. This breaks OVMF. Reproducer: Just hit 'ESC' at early boot to enter firmware setup. OVMF wants switch from (default) 800x600 to 640x480 for that, and this patch blocks it. Cc: Hou Qiming Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Message-id: 20200429115236.28709-3-kraxel@redhat.com --- hw/display/ramfb.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index bd4746dc1768..9d41c2ad2868 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -31,7 +31,6 @@ struct RAMFBState { DisplaySurface *ds; uint32_t width, height; struct RAMFBCfg cfg; - bool locked; }; =20 static void ramfb_unmap_display_surface(pixman_image_t *image, void *unuse= d) @@ -72,25 +71,18 @@ static DisplaySurface *ramfb_create_display_surface(int= width, int height, static void ramfb_fw_cfg_write(void *dev, off_t offset, size_t len) { RAMFBState *s =3D dev; - uint32_t fourcc, format, width, height; + uint32_t fourcc, format; hwaddr stride, addr; =20 - width =3D be32_to_cpu(s->cfg.width); - height =3D be32_to_cpu(s->cfg.height); + s->width =3D be32_to_cpu(s->cfg.width); + s->height =3D be32_to_cpu(s->cfg.height); stride =3D be32_to_cpu(s->cfg.stride); fourcc =3D be32_to_cpu(s->cfg.fourcc); addr =3D be64_to_cpu(s->cfg.addr); format =3D qemu_drm_format_to_pixman(fourcc); =20 fprintf(stderr, "%s: %dx%d @ 0x%" PRIx64 "\n", __func__, - width, height, addr); - if (s->locked) { - fprintf(stderr, "%s: resolution locked, change rejected\n", __func= __); - return; - } - s->locked =3D true; - s->width =3D width; - s->height =3D height; + s->width, s->height, addr); s->ds =3D ramfb_create_display_surface(s->width, s->height, format, stride, addr); } @@ -110,13 +102,6 @@ void ramfb_display_update(QemuConsole *con, RAMFBState= *s) dpy_gfx_update_full(con); } =20 -static void ramfb_reset(void *opaque) -{ - RAMFBState *s =3D (RAMFBState *)opaque; - s->locked =3D false; - memset(&s->cfg, 0, sizeof(s->cfg)); -} - RAMFBState *ramfb_setup(Error **errp) { FWCfgState *fw_cfg =3D fw_cfg_find(); @@ -129,12 +114,9 @@ RAMFBState *ramfb_setup(Error **errp) =20 s =3D g_new0(RAMFBState, 1); =20 - s->locked =3D false; - rom_add_vga("vgabios-ramfb.bin"); fw_cfg_add_file_callback(fw_cfg, "etc/ramfb", NULL, ramfb_fw_cfg_write, s, &s->cfg, sizeof(s->cfg), false); - qemu_register_reset(ramfb_reset, s); return s; } --=20 2.18.4