From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78A89C433E0 for ; Fri, 26 Feb 2021 04:49:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A935164ECE for ; Fri, 26 Feb 2021 04:49:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A935164ECE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFV3k-0001r8-Hv for qemu-devel@archiver.kernel.org; Thu, 25 Feb 2021 23:49:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFV2l-0001OD-02 for qemu-devel@nongnu.org; Thu, 25 Feb 2021 23:47:59 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:34781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFV2i-0007jJ-HE for qemu-devel@nongnu.org; Thu, 25 Feb 2021 23:47:58 -0500 Received: by mail-ej1-x62c.google.com with SMTP id hs11so12620197ejc.1 for ; Thu, 25 Feb 2021 20:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=eSegB5Tn100fjF6cMx01sLj7QAzt6mWuluXvHTB2+fo=; b=NdrDvZLAm+S+WbPm1+SkWGTWzukLJOHiAt/bPonkTB36VLmZRFCeyvW9oYX0NCxm3K Yk6LsUGmgndTGDv+ViVAjvcfIhn7yLqrD5yFYiUBkR5W6m08QKnXpb6lEL/1R+OgBFKT +Ui8rmv13ofNMtpZnlkBFFfTKe51pzhx6yC31AfisA5y6Ed6ynD6qYDVcHsI/MxSN7M3 lZQIYQSIRmCbc9FnyiRNjmoS7wEfpxjzRQzujI6msHfDgqIAvfNWs9tjGR1e8Bq25W9o no8lfdwja4+nvU999f0DrSo/ErrUrOsohXkfwL6fbU1OfKyd03ySNqqXLeLlqf3Zqz7e VvLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eSegB5Tn100fjF6cMx01sLj7QAzt6mWuluXvHTB2+fo=; b=lP8aBT07ryOrGFB/MmkhgnctUpNrzJ6KrE7lK0pyE6sBmKZu/b9D6Wv5s80uX1obdC 9jVxpqDUq0QohcxDzxU5+2xjoj2vi333rFr/fCbzNIhVo9QQVcCSSocecFWdOfxvDCF2 BbpRQaMnq3/oDFpFklizRFjWDszsGq+B3tXt7zkRd2QysmIWk5UxEfkj4yHvx8BczUTv UO96LbUVh23dAy3Gi6CpWl7P2F7vZef+kk+70ph9zlYkGfZgHwyIhllnkc01Xq1+68Iy T3uGO0T/sFSl+Y+Ep6vxFEm7Adorg1488KJT3PUloLM8KgKt4DWaWf6PZXpnQUy+8QWS cLAg== X-Gm-Message-State: AOAM532J2CYSDIgEEuy7A4GiP0/pZuL+cyIIeQeqQLRly/sXG0x5rx9n 0VZOl5wXs2qFiYyIuoXLgcC7gg919EdvS6JxBhU= X-Google-Smtp-Source: ABdhPJyVniYDvxXKn4lUYlhspOSbMbOOaPMZpGpQWzR0w7eap/HgCB4YP5247R22V8cQ2QJbAVjw+VDjDrVN9B4OBvM= X-Received: by 2002:a17:907:778d:: with SMTP id ky13mr397591ejc.291.1614314873688; Thu, 25 Feb 2021 20:47:53 -0800 (PST) MIME-Version: 1.0 References: <20210221133414.7262-1-akihiko.odaki@gmail.com> <20210222105738.w2q6vp5pi4p6bx5m@sirius.home.kraxel.org> <20210224111540.xd5a6yszql6wln7m@sirius.home.kraxel.org> <20210225114626.dn7wevr3fozp5rcu@sirius.home.kraxel.org> In-Reply-To: <20210225114626.dn7wevr3fozp5rcu@sirius.home.kraxel.org> From: Akihiko Odaki Date: Fri, 26 Feb 2021 13:47:38 +0900 Message-ID: Subject: Re: [PATCH] virtio-gpu: Respect graphics update interval for EDID To: Gerd Hoffmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=akihiko.odaki@gmail.com; helo=mail-ej1-x62c.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: Stefano Stabellini , Paul Durrant , "Michael S. Tsirkin" , qemu Developers , Anthony Perard , xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 2021=E5=B9=B42=E6=9C=8825=E6=97=A5(=E6=9C=A8) 20:46 Gerd Hoffmann : > > Hi, > > > > Because of the wasted frames I'd like this to be an option you can > > > enable when needed. For the majority of use cases this seems to be > > > no problem ... > > > > I see blinks with GNOME on Wayland on Ubuntu 20.04 and virtio-gpu with > > the EDID change included in this patch. > > /me looks closely at the patch again. > > So you update the edid dynamically, each time the refresh rate changes. > Problem with that approach is software doesn't expect edid to change > dynamically because on physical hardware it is static information about > the connected monitor. > > So what the virtio-gpu guest driver does is emulate a monitor hotplug > event to notify userspace. If you resize the qemu window on the host > it'll look like the monitor with the old window size was unplugged and > a new monitor with the new window size got plugged instead, so gnome > shell goes adapt the display resolution to the new virtual monitor size. > > The blink you are seeing probably comes from gnome-shell processing the > monitor hotplug event. > > We could try to skip generating a monitor hotplug event in case only the > refresh rate did change. That would fix the blink, but it would also > have the effect that nobody will notice the update. > > Bottom line: I think making the edid refresh rate configurable might be > useful, but changing it dynamically most likely isn't. > > take care, > Gerd > The "hotplug" implementation is probably what other combinations of devices and guests will do if they want to respond to the changes of the refresh rate, or display mode in general. That makes telling the dynamic refresh rate to guests infeasible. As you wrote, making the refresh rate configurable should be still useful, and I think matching it to the backend physical display is even better. GTK, the sole implementer of gfx_update_interval in my patch reports the refresh rate of the physical display the window resides in. It means the value may change when the physical display changes its refresh rate, which should be rare if it does, or the window moves to another physical display. In the former case, there is nothing different from implementing a physical display driver for guests so there should be no problem. The latter case is similar to how the changes of the window size, which is also part of display mode, is delivered to guests and they should be consistent. The only inconsistency I see in my patch is that the refresh rate change has no throttling while the window size change has. I don't think it is problematic because it should be rare to move the window across physical displays, but I can implement one if you don't agree or know other cases the refresh rate frequently changes. Regards, Akihiko Odaki