diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2019-08-07 02:27:28 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-08-15 03:57:45 -0400 |
commit | 58ee7561f72653aea8acece9f5d33ff8fe6fb99d (patch) | |
tree | 9af9a5b706a9cdb52a0e32e2364edbe93dbdd69a /drivers/gpu/nvgpu/include | |
parent | ae175e45edc5807131dfb1b63d3e4795e96a3f86 (diff) |
gpu: nvgpu: Add CHANNEL_SETUP_BIND IOCTL
For a long time now, the ALLOC_GPFIFO_EX channel IOCTL has done much
more than just gpfifo allocation, and its signature does not match
support that's needed soon. Add a new one called SETUP_BIND to hopefully
cover our future needs and deprecate ALLOC_GPFIFO_EX.
Change nvgpu internals to match this new naming as well.
Bug 200145225
Bug 200541476
Change-Id: I766f9283a064e140656f6004b2b766db70bd6cad
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1835186
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry-picked from e0c8a16c8d474eac6723fea3980833873ab921a6
in dev-main)
Reviewed-on: https://git-master.nvidia.com/r/2169882
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/channel.h | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/channel.h b/drivers/gpu/nvgpu/include/nvgpu/channel.h index ba3d548e..d7bf7816 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/channel.h +++ b/drivers/gpu/nvgpu/include/nvgpu/channel.h | |||
@@ -38,11 +38,11 @@ struct fifo_profile_gk20a; | |||
38 | struct nvgpu_channel_sync; | 38 | struct nvgpu_channel_sync; |
39 | struct nvgpu_gpfifo_userdata; | 39 | struct nvgpu_gpfifo_userdata; |
40 | 40 | ||
41 | /* Flags to be passed to gk20a_channel_alloc_gpfifo() */ | 41 | /* Flags to be passed to nvgpu_channel_setup_bind() */ |
42 | #define NVGPU_GPFIFO_FLAGS_SUPPORT_VPR (1U << 0U) | 42 | #define NVGPU_SETUP_BIND_FLAGS_SUPPORT_VPR (1U << 0U) |
43 | #define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1U << 1U) | 43 | #define NVGPU_SETUP_BIND_FLAGS_SUPPORT_DETERMINISTIC (1U << 1U) |
44 | #define NVGPU_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1U << 2U) | 44 | #define NVGPU_SETUP_BIND_FLAGS_REPLAYABLE_FAULTS_ENABLE (1U << 2U) |
45 | #define NVGPU_GPFIFO_FLAGS_USERMODE_SUPPORT (1U << 3U) | 45 | #define NVGPU_SETUP_BIND_FLAGS_USERMODE_SUPPORT (1U << 3U) |
46 | 46 | ||
47 | /* Flags to be passed to nvgpu_submit_channel_gpfifo() */ | 47 | /* Flags to be passed to nvgpu_submit_channel_gpfifo() */ |
48 | #define NVGPU_SUBMIT_FLAGS_FENCE_WAIT (1U << 0U) | 48 | #define NVGPU_SUBMIT_FLAGS_FENCE_WAIT (1U << 0U) |
@@ -91,8 +91,8 @@ struct gpfifo_desc { | |||
91 | void *pipe; | 91 | void *pipe; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | struct nvgpu_gpfifo_args { | 94 | struct nvgpu_setup_bind_args { |
95 | u32 num_entries; | 95 | u32 num_gpfifo_entries; |
96 | u32 num_inflight_jobs; | 96 | u32 num_inflight_jobs; |
97 | u32 userd_dmabuf_fd; | 97 | u32 userd_dmabuf_fd; |
98 | u32 gpfifo_dmabuf_fd; | 98 | u32 gpfifo_dmabuf_fd; |
@@ -407,8 +407,8 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, | |||
407 | bool is_privileged_channel, | 407 | bool is_privileged_channel, |
408 | pid_t pid, pid_t tid); | 408 | pid_t pid, pid_t tid); |
409 | 409 | ||
410 | int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c, | 410 | int nvgpu_channel_setup_bind(struct channel_gk20a *c, |
411 | struct nvgpu_gpfifo_args *gpfifo_args); | 411 | struct nvgpu_setup_bind_args *args); |
412 | 412 | ||
413 | void gk20a_channel_timeout_restart_all_channels(struct gk20a *g); | 413 | void gk20a_channel_timeout_restart_all_channels(struct gk20a *g); |
414 | 414 | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index c9002f47..d523cf5f 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h | |||
@@ -47,7 +47,7 @@ struct nvgpu_clk_arb; | |||
47 | struct nvgpu_gpu_ctxsw_trace_filter; | 47 | struct nvgpu_gpu_ctxsw_trace_filter; |
48 | #endif | 48 | #endif |
49 | struct priv_cmd_entry; | 49 | struct priv_cmd_entry; |
50 | struct nvgpu_gpfifo_args; | 50 | struct nvgpu_setup_bind_args; |
51 | 51 | ||
52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
53 | #include <linux/notifier.h> | 53 | #include <linux/notifier.h> |
@@ -1604,7 +1604,7 @@ struct gk20a { | |||
1604 | struct nvgpu_gpfifo_userdata userdata, | 1604 | struct nvgpu_gpfifo_userdata userdata, |
1605 | u32 start, u32 length); | 1605 | u32 start, u32 length); |
1606 | int (*alloc_usermode_buffers)(struct channel_gk20a *c, | 1606 | int (*alloc_usermode_buffers)(struct channel_gk20a *c, |
1607 | struct nvgpu_gpfifo_args *gpfifo_args); | 1607 | struct nvgpu_setup_bind_args *gpfifo_args); |
1608 | } os_channel; | 1608 | } os_channel; |
1609 | 1609 | ||
1610 | struct gk20a_scale_profile *scale_profile; | 1610 | struct gk20a_scale_profile *scale_profile; |