summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gr_gp10b.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/gp10b/gr_gp10b.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/gp10b/gr_gp10b.h')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h
index e3ef6304..8d553d37 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h
@@ -29,9 +29,8 @@
29 29
30struct gk20a; 30struct gk20a;
31struct gr_gk20a_isr_data; 31struct gr_gk20a_isr_data;
32struct channel_ctx_gk20a; 32struct nvgpu_gr_ctx;
33struct zbc_entry; 33struct zbc_entry;
34struct gr_ctx_desc;
35struct nvgpu_preemption_modes_rec; 34struct nvgpu_preemption_modes_rec;
36struct gk20a_debug_output; 35struct gk20a_debug_output;
37 36
@@ -75,7 +74,7 @@ int gr_gp10b_handle_tex_exception(struct gk20a *g, u32 gpc, u32 tpc,
75int gr_gp10b_commit_global_cb_manager(struct gk20a *g, 74int gr_gp10b_commit_global_cb_manager(struct gk20a *g,
76 struct channel_gk20a *c, bool patch); 75 struct channel_gk20a *c, bool patch);
77void gr_gp10b_commit_global_pagepool(struct gk20a *g, 76void gr_gp10b_commit_global_pagepool(struct gk20a *g,
78 struct channel_ctx_gk20a *ch_ctx, 77 struct nvgpu_gr_ctx *ch_ctx,
79 u64 addr, u32 size, bool patch); 78 u64 addr, u32 size, bool patch);
80u32 gr_gp10b_get_gpcs_swdx_dss_zbc_c_format_reg(struct gk20a *g); 79u32 gr_gp10b_get_gpcs_swdx_dss_zbc_c_format_reg(struct gk20a *g);
81u32 gr_gp10b_get_gpcs_swdx_dss_zbc_z_format_reg(struct gk20a *g); 80u32 gr_gp10b_get_gpcs_swdx_dss_zbc_z_format_reg(struct gk20a *g);
@@ -93,28 +92,28 @@ void gr_gp10b_set_alpha_circular_buffer_size(struct gk20a *g, u32 data);
93void gr_gp10b_set_circular_buffer_size(struct gk20a *g, u32 data); 92void gr_gp10b_set_circular_buffer_size(struct gk20a *g, u32 data);
94int gr_gp10b_init_ctx_state(struct gk20a *g); 93int gr_gp10b_init_ctx_state(struct gk20a *g);
95int gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g, 94int gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g,
96 struct gr_ctx_desc *gr_ctx, 95 struct nvgpu_gr_ctx *gr_ctx,
97 struct vm_gk20a *vm, u32 class, 96 struct vm_gk20a *vm, u32 class,
98 u32 graphics_preempt_mode, 97 u32 graphics_preempt_mode,
99 u32 compute_preempt_mode); 98 u32 compute_preempt_mode);
100int gr_gp10b_alloc_gr_ctx(struct gk20a *g, 99int gr_gp10b_alloc_gr_ctx(struct gk20a *g,
101 struct gr_ctx_desc **gr_ctx, struct vm_gk20a *vm, 100 struct nvgpu_gr_ctx *gr_ctx, struct vm_gk20a *vm,
102 u32 class, 101 u32 class,
103 u32 flags); 102 u32 flags);
104void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g, 103void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g,
105 struct channel_ctx_gk20a *ch_ctx, 104 struct channel_gk20a *c,
106 struct nvgpu_mem *mem); 105 struct nvgpu_mem *mem);
107int gr_gp10b_dump_gr_status_regs(struct gk20a *g, 106int gr_gp10b_dump_gr_status_regs(struct gk20a *g,
108 struct gk20a_debug_output *o); 107 struct gk20a_debug_output *o);
109void gr_gp10b_dump_ctxsw_stats(struct gk20a *g, struct vm_gk20a *vm, 108void gr_gp10b_dump_ctxsw_stats(struct gk20a *g, struct vm_gk20a *vm,
110 struct gr_ctx_desc *gr_ctx); 109 struct nvgpu_gr_ctx *gr_ctx);
111int gr_gp10b_wait_empty(struct gk20a *g, unsigned long duration_ms, 110int gr_gp10b_wait_empty(struct gk20a *g, unsigned long duration_ms,
112 u32 expect_delay); 111 u32 expect_delay);
113void gr_gp10b_commit_global_attrib_cb(struct gk20a *g, 112void gr_gp10b_commit_global_attrib_cb(struct gk20a *g,
114 struct channel_ctx_gk20a *ch_ctx, 113 struct nvgpu_gr_ctx *ch_ctx,
115 u64 addr, bool patch); 114 u64 addr, bool patch);
116void gr_gp10b_commit_global_bundle_cb(struct gk20a *g, 115void gr_gp10b_commit_global_bundle_cb(struct gk20a *g,
117 struct channel_ctx_gk20a *ch_ctx, 116 struct nvgpu_gr_ctx *ch_ctx,
118 u64 addr, u64 size, bool patch); 117 u64 addr, u64 size, bool patch);
119int gr_gp10b_load_smid_config(struct gk20a *g); 118int gr_gp10b_load_smid_config(struct gk20a *g);
120void gr_gp10b_set_gpc_tpc_mask(struct gk20a *g, u32 gpc_index); 119void gr_gp10b_set_gpc_tpc_mask(struct gk20a *g, u32 gpc_index);
@@ -133,7 +132,7 @@ int gr_gp10b_suspend_contexts(struct gk20a *g,
133int gr_gp10b_set_boosted_ctx(struct channel_gk20a *ch, 132int gr_gp10b_set_boosted_ctx(struct channel_gk20a *ch,
134 bool boost); 133 bool boost);
135void gr_gp10b_update_boosted_ctx(struct gk20a *g, struct nvgpu_mem *mem, 134void gr_gp10b_update_boosted_ctx(struct gk20a *g, struct nvgpu_mem *mem,
136 struct gr_ctx_desc *gr_ctx); 135 struct nvgpu_gr_ctx *gr_ctx);
137int gr_gp10b_set_preemption_mode(struct channel_gk20a *ch, 136int gr_gp10b_set_preemption_mode(struct channel_gk20a *ch,
138 u32 graphics_preempt_mode, 137 u32 graphics_preempt_mode,
139 u32 compute_preempt_mode); 138 u32 compute_preempt_mode);