diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-12-15 12:04:15 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-17 15:29:09 -0500 |
commit | 2f6698b863c9cc1db6455637b7c72e812b470b93 (patch) | |
tree | d0c8abf32d6994b9f54bf5eddafd8316e038c829 /drivers/gpu/nvgpu/gp10b/gr_gp10b.h | |
parent | 6a73114788ffafe4c53771c707ecbd9c9ea0a117 (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.h | 19 |
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 | ||
30 | struct gk20a; | 30 | struct gk20a; |
31 | struct gr_gk20a_isr_data; | 31 | struct gr_gk20a_isr_data; |
32 | struct channel_ctx_gk20a; | 32 | struct nvgpu_gr_ctx; |
33 | struct zbc_entry; | 33 | struct zbc_entry; |
34 | struct gr_ctx_desc; | ||
35 | struct nvgpu_preemption_modes_rec; | 34 | struct nvgpu_preemption_modes_rec; |
36 | struct gk20a_debug_output; | 35 | struct gk20a_debug_output; |
37 | 36 | ||
@@ -75,7 +74,7 @@ int gr_gp10b_handle_tex_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
75 | int gr_gp10b_commit_global_cb_manager(struct gk20a *g, | 74 | int gr_gp10b_commit_global_cb_manager(struct gk20a *g, |
76 | struct channel_gk20a *c, bool patch); | 75 | struct channel_gk20a *c, bool patch); |
77 | void gr_gp10b_commit_global_pagepool(struct gk20a *g, | 76 | void 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); |
80 | u32 gr_gp10b_get_gpcs_swdx_dss_zbc_c_format_reg(struct gk20a *g); | 79 | u32 gr_gp10b_get_gpcs_swdx_dss_zbc_c_format_reg(struct gk20a *g); |
81 | u32 gr_gp10b_get_gpcs_swdx_dss_zbc_z_format_reg(struct gk20a *g); | 80 | u32 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); | |||
93 | void gr_gp10b_set_circular_buffer_size(struct gk20a *g, u32 data); | 92 | void gr_gp10b_set_circular_buffer_size(struct gk20a *g, u32 data); |
94 | int gr_gp10b_init_ctx_state(struct gk20a *g); | 93 | int gr_gp10b_init_ctx_state(struct gk20a *g); |
95 | int gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g, | 94 | int 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); |
100 | int gr_gp10b_alloc_gr_ctx(struct gk20a *g, | 99 | int 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); |
104 | void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g, | 103 | void 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); |
107 | int gr_gp10b_dump_gr_status_regs(struct gk20a *g, | 106 | int gr_gp10b_dump_gr_status_regs(struct gk20a *g, |
108 | struct gk20a_debug_output *o); | 107 | struct gk20a_debug_output *o); |
109 | void gr_gp10b_dump_ctxsw_stats(struct gk20a *g, struct vm_gk20a *vm, | 108 | void 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); |
111 | int gr_gp10b_wait_empty(struct gk20a *g, unsigned long duration_ms, | 110 | int gr_gp10b_wait_empty(struct gk20a *g, unsigned long duration_ms, |
112 | u32 expect_delay); | 111 | u32 expect_delay); |
113 | void gr_gp10b_commit_global_attrib_cb(struct gk20a *g, | 112 | void 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); |
116 | void gr_gp10b_commit_global_bundle_cb(struct gk20a *g, | 115 | void 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); |
119 | int gr_gp10b_load_smid_config(struct gk20a *g); | 118 | int gr_gp10b_load_smid_config(struct gk20a *g); |
120 | void gr_gp10b_set_gpc_tpc_mask(struct gk20a *g, u32 gpc_index); | 119 | void gr_gp10b_set_gpc_tpc_mask(struct gk20a *g, u32 gpc_index); |
@@ -133,7 +132,7 @@ int gr_gp10b_suspend_contexts(struct gk20a *g, | |||
133 | int gr_gp10b_set_boosted_ctx(struct channel_gk20a *ch, | 132 | int gr_gp10b_set_boosted_ctx(struct channel_gk20a *ch, |
134 | bool boost); | 133 | bool boost); |
135 | void gr_gp10b_update_boosted_ctx(struct gk20a *g, struct nvgpu_mem *mem, | 134 | void 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); |
137 | int gr_gp10b_set_preemption_mode(struct channel_gk20a *ch, | 136 | int 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); |