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 1BDE3C433DB for ; Wed, 10 Mar 2021 16:38:32 +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 BFD4764FCA for ; Wed, 10 Mar 2021 16:38:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFD4764FCA 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]:49018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK1qw-0007ME-Ts for qemu-devel@archiver.kernel.org; Wed, 10 Mar 2021 11:38:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK1Ny-00031p-Jx for qemu-devel@nongnu.org; Wed, 10 Mar 2021 11:08:34 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:43613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK1Nw-0006dP-Uv for qemu-devel@nongnu.org; Wed, 10 Mar 2021 11:08:34 -0500 Received: by mail-ed1-x52e.google.com with SMTP id bd6so28797623edb.10 for ; Wed, 10 Mar 2021 08:08:32 -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=tQKjpBbeAGvVs6+wLD13+b80I0XRG1ErL3vCY11jAQ8=; b=fdE5vTpiprs9YgRwlunxA9uEI9O0zmGuFBxCn/Y9h/HRt6y0fhl74xYB2ZmtpNEHNT VxAsHzhVii1AMqO8frlqoZbLGCcaipV4uY9aEp7JqIlq26FHy3mUq4JH/gvGBd3q4Yr0 +WTS9QP00tSkjkXPQcvXXC1gp712WR93L2inQ9WO4BguThQpbse6wjrzs8dZxEwYOmsE NOxUaufrJdib3LkMMUAbBIdDrw7FYZ32PakrNuuXa/e0k+zvpCQvxDX26kEkt5t9J+AT LwJ+lRYYx2V1UCGdP2umMrH3g8NbqHwO1EFKxcKTHjvdK+ai5oWKbi+A/e3/bGrd9drX Hiqw== 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=tQKjpBbeAGvVs6+wLD13+b80I0XRG1ErL3vCY11jAQ8=; b=EEVIGaaiADRJT9jl11qkHw4tq/lPseubpjsa7DK/iZ+VOTl9zywb51nFEztRn5dJYC 4J6RiyFdIh30PbxV+tvp9G9Q97FLwkneIqS9c2fvBdoq1XF+vP1SXMVUTuYVFjZdWlYd rozUalNDObCkw+455RlAS1MREQKJO4FD4DxnQOJcXrOcfmBGujfKIxqxk/NcuDBxdmbF OHH9j44JrK9OR3UlIqLeiIVAfNoHKannqpdma745sRb7ZP9BOdK6UyDPxv8TVb7BAZHr 5Eac/ODj2zwTlOD932P/8ukttDY+Qd08hR9zsJ/Ij8OS+FK//sN8zZiZdptENZ4UNyxJ LpAA== X-Gm-Message-State: AOAM532wdG+QD1a81K165tJKCBtE4JC0SqAe1ppVEfIxbyB/HjoJSYz6 YY4lFga3kTTfql6kPiB2RBHdC7N8zBJOankJLKg= X-Google-Smtp-Source: ABdhPJymb2jto6uErJnYtWurPU9cGbyu9Ua1yZmFZ3/d2gFzamREE3Ee/fVojMDSuRSGbqjKgURDFzCJyhkmYPEsreU= X-Received: by 2002:a50:fa42:: with SMTP id c2mr4195637edq.159.1615392511620; Wed, 10 Mar 2021 08:08:31 -0800 (PST) MIME-Version: 1.0 References: <20210303152948.59943-1-akihiko.odaki@gmail.com> <20210303152948.59943-2-akihiko.odaki@gmail.com> <20210310132920.6rv5f62ineowzscq@sirius.home.kraxel.org> In-Reply-To: <20210310132920.6rv5f62ineowzscq@sirius.home.kraxel.org> From: Akihiko Odaki Date: Thu, 11 Mar 2021 01:08:20 +0900 Message-ID: Subject: Re: [PATCH v2 2/2] virtio-gpu: Respect UI refresh rate 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::52e; envelope-from=akihiko.odaki@gmail.com; helo=mail-ed1-x52e.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=B43=E6=9C=8810=E6=97=A5(=E6=B0=B4) 22:29 Gerd Hoffmann : > > Hi, > > > -static void xenfb_update_interval(void *opaque, uint64_t interval) > > +static void xenfb_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info= ) > > > - .update_interval =3D xenfb_update_interval, > > + .ui_info =3D xenfb_ui_info, > > Hmm, I suspect xenfb really wants the actual refresh rate, even in case > vnc/sdl change it dynamically. Anthony? Stefano? > > I guess we should just leave the update_interval callback as-is, for > those who want know, and use ui_info->refresh_rate for the virtual edid > refresh rate (which may not match the actual update interval in case of > dynamic changes). Adding a comment explaining the difference to > console.h is a good idea too. sdl shortens update_interval to respond to user inputs, but it has nothing to do with frame buffer. Using ui_info->refresh_rate will eliminate worthless frame updates even for xenfb in such cases. xenfb has a behavior similar to virtio-gpu. Instead of generating interrupts, they just tell the refresh rate to the guest and expect the guest to provide a frame buffer by itself. I think the dynamic display mode change is also problematic for xenfb if the guest driver uses the information (although the Linux driver does not use it at least.) It is possible to have both of the refresh rate member in QemuUIInfo and update_interval, but I don't see a difference justifying that. Anyway, I'd also like to hear opinions from Xen developers. > > Otherwise looks good to me overall. Splitting the ui/gtk update to a > separate patch is probably a good idea. > I'll do so when submitting the next version. Regards, Akihiko Odaki 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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 ABC80C433DB for ; Wed, 10 Mar 2021 16:08:42 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 6A7AE64EB3 for ; Wed, 10 Mar 2021 16:08:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A7AE64EB3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.96197.181802 (Exim 4.92) (envelope-from ) id 1lK1Ny-00047y-Aa; Wed, 10 Mar 2021 16:08:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 96197.181802; Wed, 10 Mar 2021 16:08:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lK1Ny-00047r-7N; Wed, 10 Mar 2021 16:08:34 +0000 Received: by outflank-mailman (input) for mailman id 96197; Wed, 10 Mar 2021 16:08:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lK1Nx-00047k-6y for xen-devel@lists.xenproject.org; Wed, 10 Mar 2021 16:08:33 +0000 Received: from mail-ed1-x534.google.com (unknown [2a00:1450:4864:20::534]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9c662e29-b27d-474e-95f8-2f16dc4e3697; Wed, 10 Mar 2021 16:08:32 +0000 (UTC) Received: by mail-ed1-x534.google.com with SMTP id h10so28880345edl.6 for ; Wed, 10 Mar 2021 08:08:32 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9c662e29-b27d-474e-95f8-2f16dc4e3697 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=tQKjpBbeAGvVs6+wLD13+b80I0XRG1ErL3vCY11jAQ8=; b=fdE5vTpiprs9YgRwlunxA9uEI9O0zmGuFBxCn/Y9h/HRt6y0fhl74xYB2ZmtpNEHNT VxAsHzhVii1AMqO8frlqoZbLGCcaipV4uY9aEp7JqIlq26FHy3mUq4JH/gvGBd3q4Yr0 +WTS9QP00tSkjkXPQcvXXC1gp712WR93L2inQ9WO4BguThQpbse6wjrzs8dZxEwYOmsE NOxUaufrJdib3LkMMUAbBIdDrw7FYZ32PakrNuuXa/e0k+zvpCQvxDX26kEkt5t9J+AT LwJ+lRYYx2V1UCGdP2umMrH3g8NbqHwO1EFKxcKTHjvdK+ai5oWKbi+A/e3/bGrd9drX Hiqw== 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=tQKjpBbeAGvVs6+wLD13+b80I0XRG1ErL3vCY11jAQ8=; b=MrMRQf+SaMiSV6wm+naxrDJqgX/UGs4jpdLH5KGOxDUvkI3a+mbo4yDQCHLpONhBaY yRQj3ODqK3vDcrKCjbmlLAo6BIpIku86fErE66FUIJTc4gB46sEyPU/4shTfMUR3rI38 KvnflPObhzk5kxFZsEk9/rh/Z/bUfBh5R5gifu31UmHZp2BtaMFNMeWT9sF8YK8aSNvp VuSyaWHgSKt6pFdRw8m7vNCJaE8rJ5d4niaREt7c6QsybQAmDMPjy5p4+2jsr/OdyRu8 kzLgc+iGMk5DKe5dFFkD2pejG/cnV/asj+IsSvAB3gq+8ANCMonX+jB8yBtHzZu0evuB Zfqw== X-Gm-Message-State: AOAM532o0r8VpYGBiIcA+37Q23qX4cSbgOf5nijy+/HjvPYCXPyslPT5 eHIA1pn8bOtGhfhZop/9eH3QTywNVGOa3v1caac= X-Google-Smtp-Source: ABdhPJymb2jto6uErJnYtWurPU9cGbyu9Ua1yZmFZ3/d2gFzamREE3Ee/fVojMDSuRSGbqjKgURDFzCJyhkmYPEsreU= X-Received: by 2002:a50:fa42:: with SMTP id c2mr4195637edq.159.1615392511620; Wed, 10 Mar 2021 08:08:31 -0800 (PST) MIME-Version: 1.0 References: <20210303152948.59943-1-akihiko.odaki@gmail.com> <20210303152948.59943-2-akihiko.odaki@gmail.com> <20210310132920.6rv5f62ineowzscq@sirius.home.kraxel.org> In-Reply-To: <20210310132920.6rv5f62ineowzscq@sirius.home.kraxel.org> From: Akihiko Odaki Date: Thu, 11 Mar 2021 01:08:20 +0900 Message-ID: Subject: Re: [PATCH v2 2/2] virtio-gpu: Respect UI refresh rate for EDID To: Gerd Hoffmann Cc: qemu Developers , xen-devel@lists.xenproject.org, "Michael S . Tsirkin" , Stefano Stabellini , Anthony Perard , Paul Durrant Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2021=E5=B9=B43=E6=9C=8810=E6=97=A5(=E6=B0=B4) 22:29 Gerd Hoffmann : > > Hi, > > > -static void xenfb_update_interval(void *opaque, uint64_t interval) > > +static void xenfb_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info= ) > > > - .update_interval =3D xenfb_update_interval, > > + .ui_info =3D xenfb_ui_info, > > Hmm, I suspect xenfb really wants the actual refresh rate, even in case > vnc/sdl change it dynamically. Anthony? Stefano? > > I guess we should just leave the update_interval callback as-is, for > those who want know, and use ui_info->refresh_rate for the virtual edid > refresh rate (which may not match the actual update interval in case of > dynamic changes). Adding a comment explaining the difference to > console.h is a good idea too. sdl shortens update_interval to respond to user inputs, but it has nothing to do with frame buffer. Using ui_info->refresh_rate will eliminate worthless frame updates even for xenfb in such cases. xenfb has a behavior similar to virtio-gpu. Instead of generating interrupts, they just tell the refresh rate to the guest and expect the guest to provide a frame buffer by itself. I think the dynamic display mode change is also problematic for xenfb if the guest driver uses the information (although the Linux driver does not use it at least.) It is possible to have both of the refresh rate member in QemuUIInfo and update_interval, but I don't see a difference justifying that. Anyway, I'd also like to hear opinions from Xen developers. > > Otherwise looks good to me overall. Splitting the ui/gtk update to a > separate patch is probably a good idea. > I'll do so when submitting the next version. Regards, Akihiko Odaki