aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/drm
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2022-02-24 14:23:21 -0800
committerRob Clark <robdclark@chromium.org>2022-03-04 22:49:52 -0800
commit17154addc5c1a175bcf3441ff0d9598efa1f05cd (patch)
treee4b4c3afed270e9734cc2f5930d470240cd0c852 /include/uapi/drm
parentdrm/msm/a6xx: Zap counters across context switch (diff)
downloadlinux-dev-17154addc5c1a175bcf3441ff0d9598efa1f05cd.tar.xz
linux-dev-17154addc5c1a175bcf3441ff0d9598efa1f05cd.zip
drm/msm: Add MSM_SUBMIT_FENCE_SN_IN
Add a way for userspace to specify the sequence number fence used to track completion of the submit. As the seqno fence is simply an incrementing counter which is local to the submitqueue, it is easy for userspace to know the next value. This is useful for native userspace drivers in a vm guest, as the guest to host roundtrip can have high latency. Assigning the fence seqno in the guest userspace allows the guest to continue without waiting for response from the host. Signed-off-by: Rob Clark <robdclark@chromium.org> Link: https://lore.kernel.org/r/20220224222321.60653-1-robdclark@gmail.com
Diffstat (limited to 'include/uapi/drm')
-rw-r--r--include/uapi/drm/msm_drm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 2ee03ba08681..07efc8033492 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -232,6 +232,7 @@ struct drm_msm_gem_submit_bo {
#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */
#define MSM_SUBMIT_SYNCOBJ_IN 0x08000000 /* enable input syncobj */
#define MSM_SUBMIT_SYNCOBJ_OUT 0x04000000 /* enable output syncobj */
+#define MSM_SUBMIT_FENCE_SN_IN 0x02000000 /* userspace passes in seqno fence */
#define MSM_SUBMIT_FLAGS ( \
MSM_SUBMIT_NO_IMPLICIT | \
MSM_SUBMIT_FENCE_FD_IN | \
@@ -239,6 +240,7 @@ struct drm_msm_gem_submit_bo {
MSM_SUBMIT_SUDO | \
MSM_SUBMIT_SYNCOBJ_IN | \
MSM_SUBMIT_SYNCOBJ_OUT | \
+ MSM_SUBMIT_FENCE_SN_IN | \
0)
#define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */
@@ -258,7 +260,7 @@ struct drm_msm_gem_submit_syncobj {
*/
struct drm_msm_gem_submit {
__u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */
- __u32 fence; /* out */
+ __u32 fence; /* out (or in with MSM_SUBMIT_FENCE_SN_IN flag) */
__u32 nr_bos; /* in, number of submit_bo's */
__u32 nr_cmds; /* in, number of submit_cmd's */
__u64 bos; /* in, ptr to array of submit_bo's */