From patchwork Fri Oct 13 05:04:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jeanniestevenson X-Patchwork-Id: 1848256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=protonmail.com header.i=@protonmail.com header.a=rsa-sha256 header.s=protonmail3 header.b=t0GPUUyq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S6RGq196mz1yqj for ; Fri, 13 Oct 2023 23:52:03 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHbM-00018R-Eo; Fri, 13 Oct 2023 08:49:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrAMN-0007eJ-DV for qemu-devel@nongnu.org; Fri, 13 Oct 2023 01:05:15 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrAML-000602-07 for qemu-devel@nongnu.org; Fri, 13 Oct 2023 01:05:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1697173503; x=1697432703; bh=UNHJ0s9/AB/ec899ZyDbovnKqbzxJjgzKr2hRpklGhQ=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=t0GPUUyqThGzEHGMCQ/t17TPjkGUj7crxi+UcPRzuusrjrS4jAOOrM8A3eTtb24gV 9kp/XBBx5fhxuhZR0XPXhlbFvlPC8e+dNhb5zmlc0MdeG2DOdEmHeUIt30RwQ1PjUd weViJXM9NK6k2aZugv31u90dH7YI+o8D1gbCwGu83AxRdqSm6LxoJFKmuX0UJdq4BC xDeKjFryADTXFP9P52F/vEKXg0w6ywQTsezbtPvBz2w5bcTql9JrDxoy747OovsxEh Q1JzCzspALkKmhv/LM4CypQr2HhRyyQ8BM2O0J7OT5k3GPz70jqUqTPcaTrUpF5hju orkUOQ/qNvvgg== Date: Fri, 13 Oct 2023 05:04:57 +0000 To: "qemu-devel@nongnu.org" From: jeanniestevenson Cc: "kraxel@redhat.com" , "marcandre.lureau@redhat.com" Subject: [PATCH] Increase console refresh rate to let GVT-g VMs run at beyond 30 FPS Message-ID: Feedback-ID: 29602004:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.141; envelope-from=jeanniestevenson@protonmail.com; helo=mail-40141.protonmail.ch 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 13 Oct 2023 08:48:51 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 Increase console refresh rate for guest operating systems using Intel GVT-g, corresponding to ~60fps. This increases the refresh rate of access to the display of the GUI, creating a much smoother user experience. I've looked into why it is 30 by default and it appears to have been added in commit 313aa567104a63fbe84d6ec2eeff5b5c81cb3524 2 decades ago when VGA emulation was first added. This commit does not appear to break VGA emulation in my testing. If there's enough interest (IE for 75 fps displays), this constant could be replaced by a function that gets a command-line flag that could be set with a QEMU arg, but I'm currently not familiar enough with QEMU's codebase know how to get the arguments for a VM to add such a charge. Signed-off-by: Jeannie Stevenson diff --git a/include/ui/console.h b/include/ui/console.h index acb61a7f15..f0c4e6ae4e 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -43,7 +43,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(QemuFixedTextConsole, QEMU_FIXED_TEXT_CONSOLE) #define QEMU_CAPS_LOCK_LED (1 << 2) /* in ms */ -#define GUI_REFRESH_INTERVAL_DEFAULT 30 +#define GUI_REFRESH_INTERVAL_DEFAULT 16 #define GUI_REFRESH_INTERVAL_IDLE 3000 /* Color number is match to standard vga palette */