dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@mailbox.org>
To: "Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Philipp Stanner" <phasta@kernel.org>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>
Cc: "Lucas Stach" <l.stach@pengutronix.de>,
	"Maíra Canal" <mcanal@igalia.com>,
	"Christian König" <christian.koenig@amd.com>,
	dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH v9 09/10] drm/doc: document some tracepoints as uAPI
Date: Wed, 14 May 2025 14:53:17 +0200	[thread overview]
Message-ID: <27825c551adeda28f4b329f44c316ad2ab67fa5d.camel@mailbox.org> (raw)
In-Reply-To: <20250424083834.15518-10-pierre-eric.pelloux-prayer@amd.com>

On Thu, 2025-04-24 at 10:38 +0200, Pierre-Eric Pelloux-Prayer wrote:
> This commit adds a document section in drm-uapi.rst about
> tracepoints,
> and mark the events gpu_scheduler_trace.h as stable uAPI.
> 
> The goal is to explicitly state that tools can rely on the fields,
> formats and semantics of these events.
> 
> Acked-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Maíra Canal <mcanal@igalia.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>
> Signed-off-by: Pierre-Eric Pelloux-Prayer
> <pierre-eric.pelloux-prayer@amd.com>
> ---
>  Documentation/gpu/drm-uapi.rst                | 19
> +++++++++++++++++++
>  .../gpu/drm/scheduler/gpu_scheduler_trace.h   | 19
> +++++++++++++++++++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-
> uapi.rst
> index 69f72e71a96e..4863a4deb0ee 100644
> --- a/Documentation/gpu/drm-uapi.rst
> +++ b/Documentation/gpu/drm-uapi.rst
> @@ -693,3 +693,22 @@ dma-buf interoperability
>  
>  Please see Documentation/userspace-api/dma-buf-alloc-exchange.rst
> for
>  information on how dma-buf is integrated and exposed within DRM.
> +
> +
> +Trace events
> +============
> +
> +See Documentation/trace/tracepoints.rst for information about using
> +Linux Kernel Tracepoints.
> +In the DRM subsystem, some events are considered stable uAPI to
> avoid
> +breaking tools (e.g.: GPUVis, umr) relying on them. Stable means
> that fields
> +cannot be removed, nor their formatting updated. Adding new fields
> is
> +possible, under the normal uAPI requirements.
> +
> +Stable uAPI events
> +------------------
> +
> +From ``drivers/gpu/drm/scheduler/gpu_scheduler_trace.h``
> +
> +.. kernel-doc::  drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
> +   :doc: uAPI trace events
> \ No newline at end of file
> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
> b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
> index 781b20349389..7e840d08ef39 100644
> --- a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
> @@ -32,6 +32,25 @@
>  #define TRACE_SYSTEM gpu_scheduler
>  #define TRACE_INCLUDE_FILE gpu_scheduler_trace
>  
> +/**
> + * DOC: uAPI trace events
> + *
> + * ``drm_sched_job_queue``, ``drm_sched_job_run``,
> ``drm_sched_job_add_dep``,
> + * ``drm_sched_job_done`` and ``drm_sched_job_unschedulable`` are
> considered
> + * stable uAPI.
> + *
> + * Common trace events attributes:
> + *
> + * * ``dev``   - the dev_name() of the device running the job.
> + *
> + * * ``ring``  - the hardware ring running the job. Together with
> ``dev`` it
> + *   uniquely identifies where the job is going to be executed.
> + *
> + * * ``fence`` - the &dma_fence.context and the &dma_fence.seqno of
> + *   &drm_sched_fence.finished
> + *
> + */

For my understanding, why do you use the double apostrophes here?

Also, the linking for the docu afair here two requires you to write

&struct dma_fence.seqno

If I am not mistaken

https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#highlights-and-cross-references


P.

> +
>  DECLARE_EVENT_CLASS(drm_sched_job,
>  	    TP_PROTO(struct drm_sched_job *sched_job, struct
> drm_sched_entity *entity),
>  	    TP_ARGS(sched_job, entity),


  reply	other threads:[~2025-05-14 12:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24  8:38 [PATCH v9 00/10] Improve gpu_scheduler trace events + UAPI Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 01/10] drm/debugfs: output client_id in in drm_clients_info Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 02/10] drm/sched: store the drm client_id in drm_sched_fence Pierre-Eric Pelloux-Prayer
2025-05-14 12:44   ` Philipp Stanner
2025-05-15  6:53     ` Pierre-Eric Pelloux-Prayer
2025-05-19 11:02       ` Pierre-Eric Pelloux-Prayer
2025-05-19 11:59         ` Philipp Stanner
2025-04-24  8:38 ` [PATCH v9 03/10] drm/sched: add device name to the drm_sched_process_job event Pierre-Eric Pelloux-Prayer
2025-05-19 15:34   ` Danilo Krummrich
2025-05-20 16:56     ` Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 04/10] drm/sched: cleanup gpu_scheduler trace events Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 05/10] drm/sched: trace dependencies for gpu jobs Pierre-Eric Pelloux-Prayer
2025-05-14 12:46   ` Philipp Stanner
2025-04-24  8:38 ` [PATCH v9 06/10] drm/sched: add the drm_client_id to the drm_sched_run/exec_job events Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 07/10] drm/sched: cleanup event names Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 08/10] drm: get rid of drm_sched_job::id Pierre-Eric Pelloux-Prayer
2025-04-25  5:26   ` Yadav, Arvind
2025-05-14 12:50   ` Philipp Stanner
2025-04-24  8:38 ` [PATCH v9 09/10] drm/doc: document some tracepoints as uAPI Pierre-Eric Pelloux-Prayer
2025-05-14 12:53   ` Philipp Stanner [this message]
2025-05-16  7:56     ` Pierre-Eric Pelloux-Prayer
2025-04-24  8:38 ` [PATCH v9 10/10] drm/amdgpu: update trace format to match gpu_scheduler_trace Pierre-Eric Pelloux-Prayer
2025-04-25  5:31   ` Yadav, Arvind
2025-05-14 12:25 ` [PATCH v9 00/10] Improve gpu_scheduler trace events + UAPI Pierre-Eric Pelloux-Prayer

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=27825c551adeda28f4b329f44c316ad2ab67fa5d.camel@mailbox.org \
    --to=phasta@mailbox.org \
    --cc=airlied@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=l.stach@pengutronix.de \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=phasta@kernel.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=simona@ffwll.ch \
    --cc=sumit.semwal@linaro.org \
    --cc=tzimmermann@suse.de \
    /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).