[PATCH] drm/vmwgfx: Add tracepoints
Zack Rusin
zack.rusin at broadcom.com
Fri Sep 6 03:59:30 UTC 2024
On Thu, Sep 5, 2024 at 2:17 PM Ian Forbes <ian.forbes at broadcom.com> wrote:
>
> Adds the necessary files to create tracepoints for the vmwgfx driver.
>
> Adds a single tracepoint for command buffer completion. This tracepoint
> can be used to time command buffer execution time and to decode command
> buffer errors. The submission time is also now recorded when the command
> buffer is submitted to hardware.
>
> Signed-off-by: Ian Forbes <ian.forbes at broadcom.com>
> ---
> drivers/gpu/drm/vmwgfx/Makefile | 2 +-
> drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 9 +++-
> drivers/gpu/drm/vmwgfx/vmwgfx_trace.c | 32 +++++++++++++
> drivers/gpu/drm/vmwgfx/vmwgfx_trace.h | 62 ++++++++++++++++++++++++++
> 4 files changed, 102 insertions(+), 3 deletions(-)
> create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_trace.c
> create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_trace.h
>
> diff --git a/drivers/gpu/drm/vmwgfx/Makefile b/drivers/gpu/drm/vmwgfx/Makefile
> index 46a4ab688a7f..482c1935bde6 100644
> --- a/drivers/gpu/drm/vmwgfx/Makefile
> +++ b/drivers/gpu/drm/vmwgfx/Makefile
> @@ -10,6 +10,6 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
> vmwgfx_simple_resource.o vmwgfx_va.o vmwgfx_blit.o \
> vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \
> vmwgfx_devcaps.o ttm_object.o vmwgfx_system_manager.o \
> - vmwgfx_gem.o vmwgfx_vkms.o
> + vmwgfx_gem.o vmwgfx_vkms.o vmwgfx_trace.o
>
> obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
> index 94e8982f5616..1ac7f382cdb1 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
> @@ -27,6 +27,7 @@
>
> #include "vmwgfx_bo.h"
> #include "vmwgfx_drv.h"
> +#include "vmwgfx_trace.h"
>
> #include <drm/ttm/ttm_bo.h>
>
> @@ -141,6 +142,7 @@ struct vmw_cmdbuf_man {
> * @man: The command buffer manager.
> * @cb_header: Device command buffer header, allocated from a DMA pool.
> * @cb_context: The device command buffer context.
> + * @inline_space: Whether inline command buffer space is used.
> * @list: List head for attaching to the manager lists.
> * @node: The range manager node.
> * @handle: The DMA address of @cb_header. Handed to the device on command
> @@ -148,19 +150,20 @@ struct vmw_cmdbuf_man {
> * @cmd: Pointer to the command buffer space of this buffer.
> * @size: Size of the command buffer space of this buffer.
> * @reserved: Reserved space of this buffer.
> - * @inline_space: Whether inline command buffer space is used.
> + * @submit_time: When the CB was submitted to hardware in jiffies.
In general it looks good but what's the reason for the submit_time?
z
More information about the dri-devel
mailing list