From patchwork Fri Oct 9 08:18:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 528270 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:4830:134:3::10]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 70FD314027C for ; Sat, 10 Oct 2015 02:47:06 +1100 (AEDT) Received: from lists.gnu.org ([208.118.235.17]:41108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkZst-0000yG-S9 for incoming@patchwork.ozlabs.org; Fri, 09 Oct 2015 11:47:03 -0400 Received: from localhost ([::1]:39437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkZst-0000mW-N4 for incoming@patchwork.ozlabs.org; Fri, 09 Oct 2015 11:47:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkSt2-00012f-PX for qemu-devel@nongnu.org; Fri, 09 Oct 2015 04:18:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkSsy-0003Jk-PR for qemu-devel@nongnu.org; Fri, 09 Oct 2015 04:18:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkSsy-0003JI-KR for qemu-devel@nongnu.org; Fri, 09 Oct 2015 04:18:40 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 347D8A381D for ; Fri, 9 Oct 2015 08:18:40 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-78.ams2.redhat.com [10.36.116.78]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t998IdJT006659; Fri, 9 Oct 2015 04:18:39 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 69D768094C; Fri, 9 Oct 2015 10:18:37 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 9 Oct 2015 10:18:31 +0200 Message-Id: <1444378714-15190-9-git-send-email-kraxel@redhat.com> In-Reply-To: <1444378714-15190-1-git-send-email-kraxel@redhat.com> References: <1444378714-15190-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , "Michael S. Tsirkin" Subject: [Qemu-devel] [PULL 08/11] virtio-gpu: add cursor update tracepoint X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- 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