diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-10-02 08:30:27 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-10-08 10:33:21 +0200 |
commit | e9c1b459f28fb4dce52dd5afa6a1ad7fb00ee5e2 (patch) | |
tree | f819b6903264ef84b49ebb649b220c3f5d1249e7 /hw/display/virtio-gpu.c | |
parent | 9d9e152136bdaa75ea98e5c2105f2a7127e369eb (diff) |
virtio-gpu: add cursor update tracepoint
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r-- | hw/display/virtio-gpu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 0f8d35ce4a..a836ce3859 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); } |