From abd5f68eef7a1b26f95cc9dd07515b49e29219de Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Wed, 28 Mar 2018 12:14:12 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1683392 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') 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; #define NVGPU_GPFIFO_FLAGS_SUPPORT_VPR (1 << 0) #define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1 << 1) #define NVGPU_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2) +#define NVGPU_GPFIFO_FLAGS_USERMODE_SUPPORT (1 << 3) struct nvgpu_gpfifo_args { u32 num_entries; u32 num_inflight_jobs; + u32 userd_dmabuf_fd; + u32 gpfifo_dmabuf_fd; + u32 work_submit_token; u32 flags; }; @@ -184,6 +188,7 @@ struct channel_gk20a { /* deterministic, but explicitly idle and submits disallowed */ bool deterministic_railgate_allowed; bool cde; + bool usermode_submit_enabled; pid_t pid; pid_t tgid; struct nvgpu_mutex ioctl_lock; @@ -198,6 +203,7 @@ struct channel_gk20a { struct gpfifo_desc gpfifo; + struct nvgpu_mem usermode_userd; /* Used for Usermode Submission */ struct nvgpu_mem inst_block; u64 userd_iova; @@ -361,6 +367,7 @@ void free_priv_cmdbuf(struct channel_gk20a *c, void gk20a_channel_clean_up_jobs(struct channel_gk20a *c, bool clean_all); +void gk20a_channel_free_usermode_buffers(struct channel_gk20a *c); u32 nvgpu_get_gpfifo_entry_size(void); #endif /* CHANNEL_GK20A_H */ -- cgit v1.2.2