summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-12-15 12:04:15 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-17 15:29:09 -0500
commit2f6698b863c9cc1db6455637b7c72e812b470b93 (patch)
treed0c8abf32d6994b9f54bf5eddafd8316e038c829 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h
parent6a73114788ffafe4c53771c707ecbd9c9ea0a117 (diff)
gpu: nvgpu: Make graphics context property of TSG
Move graphics context ownership to TSG instead of channel. Combine channel_ctx_gk20a and gr_ctx_desc to one structure, because the split between them was arbitrary. Move context header to be property of channel. Bug 1842197 Change-Id: I410e3262f80b318d8528bcbec270b63a2d8d2ff9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1639532 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@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.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index c13b1c58..29fa302f 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -31,7 +31,6 @@
31#include <nvgpu/atomic.h> 31#include <nvgpu/atomic.h>
32 32
33struct gk20a; 33struct gk20a;
34struct gr_gk20a;
35struct dbg_session_gk20a; 34struct dbg_session_gk20a;
36struct gk20a_fence; 35struct gk20a_fence;
37struct fifo_profile_gk20a; 36struct fifo_profile_gk20a;
@@ -50,10 +49,6 @@ struct fifo_profile_gk20a;
50#define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1 << 1) 49#define NVGPU_GPFIFO_FLAGS_SUPPORT_DETERMINISTIC (1 << 1)
51#define NVGPU_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2) 50#define NVGPU_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2)
52 51
53/* Flags to be passed to g->ops.gr.alloc_obj_ctx() */
54#define NVGPU_OBJ_CTX_FLAGS_SUPPORT_GFXP (1 << 1)
55#define NVGPU_OBJ_CTX_FLAGS_SUPPORT_CILP (1 << 2)
56
57struct notification { 52struct notification {
58 struct { 53 struct {
59 u32 nanoseconds[2]; 54 u32 nanoseconds[2];
@@ -63,19 +58,6 @@ struct notification {
63 u16 status; 58 u16 status;
64}; 59};
65 60
66/* contexts associated with a channel */
67struct channel_ctx_gk20a {
68 struct gr_ctx_desc *gr_ctx;
69 struct patch_desc patch_ctx;
70 struct zcull_ctx_desc zcull_ctx;
71 struct pm_ctx_desc pm_ctx;
72 u64 global_ctx_buffer_va[NR_GLOBAL_CTX_BUF_VA];
73 u64 global_ctx_buffer_size[NR_GLOBAL_CTX_BUF_VA];
74 int global_ctx_buffer_index[NR_GLOBAL_CTX_BUF_VA];
75 bool global_ctx_buffer_mapped;
76 struct ctx_header_desc ctx_header;
77};
78
79struct channel_gk20a_job { 61struct channel_gk20a_job {
80 struct nvgpu_mapped_buf **mapped_buffers; 62 struct nvgpu_mapped_buf **mapped_buffers;
81 int num_mapped_buffers; 63 int num_mapped_buffers;
@@ -190,7 +172,6 @@ struct channel_gk20a {
190 int chid; 172 int chid;
191 bool wdt_enabled; 173 bool wdt_enabled;
192 nvgpu_atomic_t bound; 174 nvgpu_atomic_t bound;
193 bool first_init;
194 bool vpr; 175 bool vpr;
195 bool deterministic; 176 bool deterministic;
196 /* deterministic, but explicitly idle and submits disallowed */ 177 /* deterministic, but explicitly idle and submits disallowed */
@@ -210,8 +191,6 @@ struct channel_gk20a {
210 191
211 struct gpfifo_desc gpfifo; 192 struct gpfifo_desc gpfifo;
212 193
213 struct channel_ctx_gk20a ch_ctx;
214
215 struct nvgpu_mem inst_block; 194 struct nvgpu_mem inst_block;
216 195
217 u64 userd_iova; 196 u64 userd_iova;
@@ -262,6 +241,8 @@ struct channel_gk20a {
262 struct channel_t19x t19x; 241 struct channel_t19x t19x;
263#endif 242#endif
264 243
244 struct ctx_header_desc ctx_header;
245
265 /* Any operating system specific data. */ 246 /* Any operating system specific data. */
266 void *os_priv; 247 void *os_priv;
267}; 248};