qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dongwon Kim <dongwon.kim@intel.com>
To: qemu-devel@nongnu.org
Cc: Dongwon Kim <dongwon.kim@intel.com>
Subject: [PATCH 3/3] virtio-gpu: call dpy_gl_frame_counter at every guest scanout flush
Date: Mon, 26 Jul 2021 15:25:51 -0700	[thread overview]
Message-ID: <20210726222551.28795-3-dongwon.kim@intel.com> (raw)
In-Reply-To: <20210726222551.28795-1-dongwon.kim@intel.com>

dpy_gl_frame_counter needs to be called for guest scanout frame count
to calculate and display the performance figure - ups, the guest FB
update per seconds.

Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
 hw/display/virtio-gpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index e183f4ecda..722869864a 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -523,6 +523,7 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g,
                 console_has_gl(scanout->con)) {
                 dpy_gl_update(scanout->con, 0, 0, scanout->width,
                               scanout->height);
+                dpy_gl_count_frame(scanout->con, true);
                 return;
             }
         }
@@ -566,6 +567,7 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g,
                        extents->x1, extents->y1,
                        extents->x2 - extents->x1,
                        extents->y2 - extents->y1);
+        dpy_gl_count_frame(scanout->con, true);
 
         pixman_region_fini(&region);
         pixman_region_fini(&finalregion);
-- 
2.17.1



  parent reply	other threads:[~2021-07-26 22:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 22:25 [PATCH 1/3] ui/gtk: adds status bar for expressing ups and fps Dongwon Kim
2021-07-26 22:25 ` [PATCH 2/3] ui/gtk: calling gd_gl_frame_counter at every draw/swap Dongwon Kim
2021-07-26 22:25 ` Dongwon Kim [this message]
2021-07-27  8:24 ` [PATCH 1/3] ui/gtk: adds status bar for expressing ups and fps Daniel P. Berrangé
2021-07-27 18:46   ` Dongwon Kim
2021-07-29 23:47 ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210726222551.28795-3-dongwon.kim@intel.com \
    --to=dongwon.kim@intel.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).