summaryrefslogtreecommitdiff
path: root/include/drm/gpu_scheduler.h
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2023-02-01 16:26:07 +0100
committerLucas Stach <l.stach@pengutronix.de>2023-02-07 20:49:20 +0100
commitdf622729ddbf6607c10670e52d2cb484b1abe7c7 (patch)
tree34757a17f69957d9d8eaeecd2e71003846ae0d2f /include/drm/gpu_scheduler.h
parent6b05266a0d6b6c02faa0a2749456dfc85277bae6 (diff)
drm/scheduler: track GPU active time per entity
Track the accumulated time that jobs from this entity were active on the GPU. This allows drivers using the scheduler to trivially implement the DRM fdinfo when the hardware doesn't provide more specific information than signalling job completion anyways. [Bagas: Append missing colon to @elapsed_ns] Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Diffstat (limited to 'include/drm/gpu_scheduler.h')
-rw-r--r--include/drm/gpu_scheduler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
index ca857ec9e7eb..aa771e01f63f 100644
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@ -228,6 +228,13 @@ struct drm_sched_entity {
*/
struct rb_node rb_tree_node;
+ /**
+ * @elapsed_ns:
+ *
+ * Records the amount of time where jobs from this entity were active
+ * on the GPU.
+ */
+ uint64_t elapsed_ns;
};
/**