summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-04-25 21:48:53 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-25 21:48:52 -0700
commit94bc5fd5e82c08155450de64c09b8d47568e0d20 (patch)
tree316d31affc843d2b7030db7dcfdd4822b8106f67 /include/uapi
parent877e5ff1ffa6b91290b9df687967ca98c1cfee28 (diff)
parente84be6486a923e82be8fa16a52c5bc0d2f355bc6 (diff)
Merge "drm/msm: Enable per cmdstream profiling for the user"
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/msm_drm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 8baf2bf6df2e..c974714a9abe 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -152,10 +152,13 @@ struct drm_msm_gem_submit_reloc {
* this buffer in the first-level ringbuffer
* CTX_RESTORE_BUF - only executed if there has been a GPU context
* switch since the last SUBMIT ioctl
+ * PROFILE_BUF - A profiling buffer written to by both GPU and CPU.
*/
#define MSM_SUBMIT_CMD_BUF 0x0001
#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002
#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003
+#define MSM_SUBMIT_CMD_PROFILE_BUF 0x0004
+
struct drm_msm_gem_submit_cmd {
__u32 type; /* in, one of MSM_SUBMIT_CMD_x */
__u32 submit_idx; /* in, index of submit_bo cmdstream buffer */
@@ -207,6 +210,14 @@ struct drm_msm_gem_submit {
__u64 __user cmds; /* in, ptr to array of submit_cmd's */
};
+struct drm_msm_gem_submit_profile_buffer {
+ __s64 queue_time; /* out, Ringbuffer queue time (seconds) */
+ __s64 submit_time; /* out, Ringbuffer submission time (seconds) */
+ __u64 ticks_queued; /* out, GPU ticks at ringbuffer submission */
+ __u64 ticks_submitted; /* out, GPU ticks before cmdstream execution*/
+ __u64 ticks_retired; /* out, GPU ticks after cmdstream execution */
+};
+
/* The normal way to synchronize with the GPU is just to CPU_PREP on
* a buffer if you need to access it from the CPU (other cmdstream
* submission from same or other contexts, PAGE_FLIP ioctl, etc, all