diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-09-19 22:03:45 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-10-01 16:31:34 -0400 |
commit | e233b0fdcdf19ed6356a31fed04654f2ee103d98 (patch) | |
tree | a8b0612cddb352856468ee417d4ad94e3bc2dd54 /drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |
parent | 6e97491b007d4231e1934896a423027fda61c4c2 (diff) |
gpu: nvgpu: Commit cb manager at context create
Call commit_cb_manager() at context creation time instead of hardware
initialization. This allows per-channel sizes for buffers.
Bug 1686189
Change-Id: Ie4d08e87f237bc63bac0268128f59d4fe8536c95
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/801777
Reviewed-on: http://git-master/r/806181
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index df7f2af9..b8533f46 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -170,7 +170,7 @@ static int gr_gm20b_commit_global_cb_manager(struct gk20a *g, | |||
170 | struct channel_gk20a *c, bool patch) | 170 | struct channel_gk20a *c, bool patch) |
171 | { | 171 | { |
172 | struct gr_gk20a *gr = &g->gr; | 172 | struct gr_gk20a *gr = &g->gr; |
173 | struct channel_ctx_gk20a *ch_ctx = NULL; | 173 | struct channel_ctx_gk20a *ch_ctx = &c->ch_ctx; |
174 | u32 attrib_offset_in_chunk = 0; | 174 | u32 attrib_offset_in_chunk = 0; |
175 | u32 alpha_offset_in_chunk = 0; | 175 | u32 alpha_offset_in_chunk = 0; |
176 | u32 pd_ab_max_output; | 176 | u32 pd_ab_max_output; |
@@ -180,14 +180,6 @@ static int gr_gm20b_commit_global_cb_manager(struct gk20a *g, | |||
180 | 180 | ||
181 | gk20a_dbg_fn(""); | 181 | gk20a_dbg_fn(""); |
182 | 182 | ||
183 | if (patch) { | ||
184 | int err; | ||
185 | ch_ctx = &c->ch_ctx; | ||
186 | err = gr_gk20a_ctx_patch_write_begin(g, ch_ctx); | ||
187 | if (err) | ||
188 | return err; | ||
189 | } | ||
190 | |||
191 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_ds_tga_constraintlogic_r(), | 183 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_ds_tga_constraintlogic_r(), |
192 | gr_ds_tga_constraintlogic_beta_cbsize_f(gr->attrib_cb_default_size) | | 184 | gr_ds_tga_constraintlogic_beta_cbsize_f(gr->attrib_cb_default_size) | |
193 | gr_ds_tga_constraintlogic_alpha_cbsize_f(gr->alpha_cb_default_size), | 185 | gr_ds_tga_constraintlogic_alpha_cbsize_f(gr->alpha_cb_default_size), |
@@ -247,9 +239,6 @@ static int gr_gm20b_commit_global_cb_manager(struct gk20a *g, | |||
247 | } | 239 | } |
248 | } | 240 | } |
249 | 241 | ||
250 | if (patch) | ||
251 | gr_gk20a_ctx_patch_write_end(g, ch_ctx); | ||
252 | |||
253 | return 0; | 242 | return 0; |
254 | } | 243 | } |
255 | 244 | ||