diff options
| author | Jordan Crouse <jcrouse@codeaurora.org> | 2017-06-12 09:16:46 -0600 |
|---|---|---|
| committer | Jordan Crouse <jcrouse@codeaurora.org> | 2017-06-12 15:11:52 -0600 |
| commit | 7d46546d28250cb7a5404dee299694ac421f20de (patch) | |
| tree | 8224a87a8d848b32a131273f539ad435651ec063 /include/uapi | |
| parent | 7851820e84ad7036e7d5ddc4b183dc75e43bc387 (diff) | |
drm/msm: Add per-instance submit queues
Currently the priority and other behavior of a command stream
is provided by the user application during submission and
the application is expected to internally maintain the settings
for each 'context' or 'rendering queue' and specify the correct
ones.
This works okay for simple cases but as applications become more
complex we will want to set context specific flags and do various
permisson checks to allow certain contexts to enable additional
privileges.
Add kernel-side submit queues to be analogous to 'contexts' or
'rendering queues' on the application side. Each file descriptor
instance will maintain its own list of queues. Queues cannot be
shared between file descriptors.
For backwards compatibility context id '0' is defined as a default
context specifying middle priority and no special flags. This is
intended to be the usual configuration for 99% of applications so
that a garden variety application can function correctly without
creating a queue. Only those applications requiring the specific
benefit of different queues need create one.
In addition to the basic infrastructure, allow the user to specify
the queue priority - this will be used in lieu of the legacy
flags to set priority during the submission. Only the master DRM
instance can set the highest priority, but all the others are open
to all processes.
Change-Id: Ic0dedbad02fa27c0ba20c1157a05ddb143e46357
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/drm/msm_drm.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index cc6d4fb42d9f..831a0c81cddb 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -225,6 +225,8 @@ struct drm_msm_gem_submit { __u32 nr_cmds; /* in, number of submit_cmd's */ __u64 __user bos; /* in, ptr to array of submit_bo's */ __u64 __user cmds; /* in, ptr to array of submit_cmd's */ + __s32 fence_fd; /* gap for the fence_fd which is upstream */ + __u32 queueid; /* in, submitqueue id */ }; struct drm_msm_gem_submit_profile_buffer { @@ -353,6 +355,21 @@ struct drm_msm_gem_sync { __u64 __user ops; }; +/* + * Draw queues allow the user to set specific submission parameter. Command + * submissions will specify a specific submit queue id to use. id '0' is + * reserved as a "default" drawqueue with medium priority. The user can safely + * use and query 0 but cannot destroy it. + */ + +#define MSM_SUBMITQUEUE_FLAGS (0) + +struct drm_msm_submitqueue { + __u32 flags; /* in, MSM_SUBMITQUEUE_x */ + __u32 prio; /* in, Priority level */ + __u32 id; /* out, identifier */ +}; + #define DRM_MSM_GET_PARAM 0x00 /* placeholder: #define DRM_MSM_SET_PARAM 0x01 @@ -365,6 +382,8 @@ struct drm_msm_gem_sync { #define DRM_MSM_WAIT_FENCE 0x07 /* Gap for upstream DRM_MSM_GEM_MADVISE */ #define DRM_MSM_GEM_SVM_NEW 0x09 +#define DRM_MSM_SUBMITQUEUE_NEW 0x0A +#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B #define DRM_SDE_WB_CONFIG 0x40 #define DRM_MSM_REGISTER_EVENT 0x41 @@ -407,6 +426,12 @@ struct drm_msm_gem_sync { #define DRM_IOCTL_MSM_GEM_SVM_NEW \ DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SVM_NEW, \ struct drm_msm_gem_svm_new) +#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW \ + DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, \ + struct drm_msm_submitqueue) +#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE \ + DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, \ + struct drm_msm_submitqueue) #if defined(__cplusplus) } |
