diff options
author | Sourab Gupta <sourabg@nvidia.com> | 2018-03-28 02:44:12 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-05 08:22:58 -0400 |
commit | abd5f68eef7a1b26f95cc9dd07515b49e29219de (patch) | |
tree | 94bc998200b1a53ee6e1608d2e8fb4a2bce263f7 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | 03b87689025b86b145236a9c707e31a3d3214eb0 (diff) |
gpu: nvgpu: add usermode submission interface HAL
The patch adds the HAL interfaces for handling the usermode
submission, particularly allocating channel specific usermode
userd. These interfaces are currently implemented only on QNX,
and are created accordingly. As and when linux adds the
usermode submission support, we can revisit them
if any further changes are needed.
Change-Id: I790e0ebdfaedcdc5f6bb624652b1af4549b7b062
Signed-off-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1683392
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index eaa5f81b..cd5bf7d7 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -45,10 +45,14 @@ struct fifo_profile_gk20a; | |||
45 | #define NVGPU_GPFIFO_FLAGS_SUPPORT_VPR (1 << 0) | 45 | #define NVGPU_GPFIFO_FLAGS_SUPPORT_VPR (1 << 0) |
46 | #define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1 << 1) | 46 | #define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1 << 1) |
47 | #define NVGPU_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2) | 47 | #define NVGPU_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2) |
48 | #define NVGPU_GPFIFO_FLAGS_USERMODE_SUPPORT (1 << 3) | ||
48 | 49 | ||
49 | struct nvgpu_gpfifo_args { | 50 | struct nvgpu_gpfifo_args { |
50 | u32 num_entries; | 51 | u32 num_entries; |
51 | u32 num_inflight_jobs; | 52 | u32 num_inflight_jobs; |
53 | u32 userd_dmabuf_fd; | ||
54 | u32 gpfifo_dmabuf_fd; | ||
55 | u32 work_submit_token; | ||
52 | u32 flags; | 56 | u32 flags; |
53 | }; | 57 | }; |
54 | 58 | ||
@@ -184,6 +188,7 @@ struct channel_gk20a { | |||
184 | /* deterministic, but explicitly idle and submits disallowed */ | 188 | /* deterministic, but explicitly idle and submits disallowed */ |
185 | bool deterministic_railgate_allowed; | 189 | bool deterministic_railgate_allowed; |
186 | bool cde; | 190 | bool cde; |
191 | bool usermode_submit_enabled; | ||
187 | pid_t pid; | 192 | pid_t pid; |
188 | pid_t tgid; | 193 | pid_t tgid; |
189 | struct nvgpu_mutex ioctl_lock; | 194 | struct nvgpu_mutex ioctl_lock; |
@@ -198,6 +203,7 @@ struct channel_gk20a { | |||
198 | 203 | ||
199 | struct gpfifo_desc gpfifo; | 204 | struct gpfifo_desc gpfifo; |
200 | 205 | ||
206 | struct nvgpu_mem usermode_userd; /* Used for Usermode Submission */ | ||
201 | struct nvgpu_mem inst_block; | 207 | struct nvgpu_mem inst_block; |
202 | 208 | ||
203 | u64 userd_iova; | 209 | u64 userd_iova; |
@@ -361,6 +367,7 @@ void free_priv_cmdbuf(struct channel_gk20a *c, | |||
361 | void gk20a_channel_clean_up_jobs(struct channel_gk20a *c, | 367 | void gk20a_channel_clean_up_jobs(struct channel_gk20a *c, |
362 | bool clean_all); | 368 | bool clean_all); |
363 | 369 | ||
370 | void gk20a_channel_free_usermode_buffers(struct channel_gk20a *c); | ||
364 | u32 nvgpu_get_gpfifo_entry_size(void); | 371 | u32 nvgpu_get_gpfifo_entry_size(void); |
365 | 372 | ||
366 | #endif /* CHANNEL_GK20A_H */ | 373 | #endif /* CHANNEL_GK20A_H */ |