qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH v3 08/11] virtio-gpu: add cursor update tracepoint
Date: Fri,  2 Oct 2015 14:31:53 +0200	[thread overview]
Message-ID: <1443789116-27876-9-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1443789116-27876-1-git-send-email-kraxel@redhat.com>

---
 hw/display/virtio-gpu.c | 9 ++++++++-
 trace-events            | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 0f8d35c..a836ce3 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -91,13 +91,20 @@ static void update_cursor_data_virgl(VirtIOGPU *g,
 static void update_cursor(VirtIOGPU *g, struct virtio_gpu_update_cursor *cursor)
 {
     struct virtio_gpu_scanout *s;
+    bool move = cursor->hdr.type != VIRTIO_GPU_CMD_MOVE_CURSOR;
 
     if (cursor->pos.scanout_id >= g->conf.max_outputs) {
         return;
     }
     s = &g->scanout[cursor->pos.scanout_id];
 
-    if (cursor->hdr.type != VIRTIO_GPU_CMD_MOVE_CURSOR) {
+    trace_virtio_gpu_update_cursor(cursor->pos.scanout_id,
+                                   cursor->pos.x,
+                                   cursor->pos.y,
+                                   move ? "move" : "update",
+                                   cursor->resource_id);
+
+    if (move) {
         if (!s->current_cursor) {
             s->current_cursor = cursor_alloc(64, 64);
         }
diff --git a/trace-events b/trace-events
index 02ff51b..2da6832 100644
--- a/trace-events
+++ b/trace-events
@@ -1199,6 +1199,7 @@ virtio_gpu_cmd_ctx_destroy(uint32_t ctx) "ctx 0x%x"
 virtio_gpu_cmd_ctx_res_attach(uint32_t ctx, uint32_t res) "ctx 0x%x, res 0x%x"
 virtio_gpu_cmd_ctx_res_detach(uint32_t ctx, uint32_t res) "ctx 0x%x, res 0x%x"
 virtio_gpu_cmd_ctx_submit(uint32_t ctx, uint32_t size) "ctx 0x%x, size %d"
+virtio_gpu_update_cursor(uint32_t scanout, uint32_t x, uint32_t y, const char *type, uint32_t res) "scanout %d, x %d, y %d, %s, res 0x%x"
 virtio_gpu_fence_ctrl(uint64_t fence, uint32_t type) "fence 0x%" PRIx64 ", type 0x%x"
 virtio_gpu_fence_resp(uint64_t fence) "fence 0x%" PRIx64
 
-- 
1.8.3.1

  parent reply	other threads:[~2015-10-02 12:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 12:31 [Qemu-devel] [PATCH v3 00/11] add virgl rendering support Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 01/11] shaders: initialize vertexes once Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 02/11] sdl2: stop flickering Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 03/11] ui/console: add opengl context and scanout support interfaces Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 04/11] virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 05/11] virtio-gpu: change licence from GPLv2 to GPLv2+ Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 06/11] virtio-gpu: update headers for virgl/3d Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 07/11] virtio-gpu: add 3d mode and virgl rendering support Gerd Hoffmann
2015-10-02 12:31 ` Gerd Hoffmann [this message]
2015-10-02 14:36   ` [Qemu-devel] [PATCH v3 08/11] virtio-gpu: add cursor update tracepoint Marc-André Lureau
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 09/11] opengl: add egl-context.[ch] helpers Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 10/11] gtk/opengl: add opengl context and scanout support (egl) Gerd Hoffmann
2015-10-02 12:31 ` [Qemu-devel] [PATCH v3 11/11] gtk/opengl: add opengl context and scanout support (GtkGLArea) Gerd Hoffmann

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=1443789116-27876-9-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mst@redhat.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).