qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tina Zhang <tina.zhang@intel.com>
To: intel-gvt-dev@lists.freedesktop.org, qemu-devel@nongnu.org
Cc: kevin.tian@intel.com, zhenyuw@linux.intel.com,
	Tina Zhang <tina.zhang@intel.com>,
	alex.williamson@redhat.com, zhiyuan.lv@intel.com,
	hang.yuan@intel.com, zhi.a.wang@intel.com, kraxel@redhat.com
Subject: [Qemu-devel] [RFC PATCH 2/3] ui/console: Introduce two new APIs
Date: Tue,  4 Jun 2019 17:58:46 +0800	[thread overview]
Message-ID: <20190604095847.10532-3-tina.zhang@intel.com> (raw)
In-Reply-To: <20190604095847.10532-1-tina.zhang@intel.com>

graphic_hw_refresh is used by display to invoke console refresh.
dpy_update_interval is used by display to update gui timer interval.

Signed-off-by: Tina Zhang <tina.zhang@intel.com>
---
 include/ui/console.h |  2 ++
 ui/console.c         | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/include/ui/console.h b/include/ui/console.h
index fef900db76..3b46264efb 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -275,6 +275,7 @@ void register_displaychangelistener(DisplayChangeListener *dcl);
 void update_displaychangelistener(DisplayChangeListener *dcl,
                                   uint64_t interval);
 void unregister_displaychangelistener(DisplayChangeListener *dcl);
+void dpy_update_interval(QemuConsole *con, uint64_t interval);
 
 bool dpy_ui_info_supported(QemuConsole *con);
 int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info);
@@ -379,6 +380,7 @@ void graphic_console_set_hwops(QemuConsole *con,
 void graphic_console_close(QemuConsole *con);
 
 void graphic_hw_update(QemuConsole *con);
+void graphic_hw_refresh(QemuConsole *con);
 void graphic_hw_invalidate(QemuConsole *con);
 void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata);
 void graphic_hw_gl_block(QemuConsole *con, bool block);
diff --git a/ui/console.c b/ui/console.c
index 6d2282d3e9..3a02cea37d 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -268,6 +268,24 @@ void graphic_hw_update(QemuConsole *con)
     }
 }
 
+void graphic_hw_refresh(QemuConsole *con)
+{
+    DisplayState *ds;
+    DisplayChangeListener *dcl;
+
+    if (!con) {
+        con = active_console;
+    }
+
+    ds = con->ds;
+
+    QLIST_FOREACH(dcl, &ds->listeners, next) {
+        if (dcl->ops->dpy_refresh) {
+            dcl->ops->dpy_refresh(dcl);
+        }
+    }
+}
+
 void graphic_hw_gl_block(QemuConsole *con, bool block)
 {
     assert(con != NULL);
@@ -1480,6 +1498,23 @@ void update_displaychangelistener(DisplayChangeListener *dcl,
     }
 }
 
+void dpy_update_interval(QemuConsole *con, uint64_t interval)
+{
+    DisplayChangeListener *dcl;
+    DisplayState *ds;
+
+    if (!con) {
+        return;
+    }
+
+    ds = con->ds;
+
+    QLIST_FOREACH(dcl, &ds->listeners, next) {
+        update_displaychangelistener(dcl, interval);
+    }
+}
+
+
 void unregister_displaychangelistener(DisplayChangeListener *dcl)
 {
     DisplayState *ds = dcl->ds;
-- 
2.17.1



  parent reply	other threads:[~2019-06-04 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  9:58 [Qemu-devel] [RFC PATCH 0/3] hw/display: Refresh UI depending on vGPU page flip events Tina Zhang
2019-06-04  9:58 ` [Qemu-devel] [RFC PATCH 1/3] vfio: Add a funtion to return a specific irq capabilities Tina Zhang
2019-06-04  9:58 ` Tina Zhang [this message]
2019-06-04  9:58 ` [Qemu-devel] [RFC PATCH 3/3] vfio/display: Refresh display depending on vGPU page flip events Tina Zhang
2019-06-04 10:58 ` [Qemu-devel] [RFC PATCH 0/3] hw/display: Refresh UI " no-reply
2019-06-04 11:18 ` no-reply

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=20190604095847.10532-3-tina.zhang@intel.com \
    --to=tina.zhang@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=hang.yuan@intel.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kevin.tian@intel.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhenyuw@linux.intel.com \
    --cc=zhi.a.wang@intel.com \
    --cc=zhiyuan.lv@intel.com \
    /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).