mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-19 20:13:49 -04:00
drm/virtio: add trace events for commands
Trace when commands are queued for both ctrlq and cursorq. Trace when responses are received for ctrlq. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-3-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include "virtgpu_drv.h"
|
||||
#include "virtgpu_trace.h"
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_ring.h>
|
||||
@@ -192,6 +193,9 @@ void virtio_gpu_dequeue_ctrl_func(struct work_struct *work)
|
||||
|
||||
list_for_each_entry_safe(entry, tmp, &reclaim_list, list) {
|
||||
resp = (struct virtio_gpu_ctrl_hdr *)entry->resp_buf;
|
||||
|
||||
trace_virtio_gpu_cmd_response(vgdev->ctrlq.vq, resp);
|
||||
|
||||
if (resp->type != cpu_to_le32(VIRTIO_GPU_RESP_OK_NODATA)) {
|
||||
if (resp->type >= cpu_to_le32(VIRTIO_GPU_RESP_ERR_UNSPEC)) {
|
||||
struct virtio_gpu_ctrl_hdr *cmd;
|
||||
@@ -284,6 +288,9 @@ retry:
|
||||
spin_lock(&vgdev->ctrlq.qlock);
|
||||
goto retry;
|
||||
} else {
|
||||
trace_virtio_gpu_cmd_queue(vq,
|
||||
(struct virtio_gpu_ctrl_hdr *)vbuf->buf);
|
||||
|
||||
virtqueue_kick(vq);
|
||||
}
|
||||
|
||||
@@ -359,6 +366,9 @@ retry:
|
||||
spin_lock(&vgdev->cursorq.qlock);
|
||||
goto retry;
|
||||
} else {
|
||||
trace_virtio_gpu_cmd_queue(vq,
|
||||
(struct virtio_gpu_ctrl_hdr *)vbuf->buf);
|
||||
|
||||
virtqueue_kick(vq);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user