diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 28 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.h | 5 |
2 files changed, 26 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 4274a800..94fd8058 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -364,7 +364,7 @@ static int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, | |||
364 | { | 364 | { |
365 | gk20a_dbg_fn(""); | 365 | gk20a_dbg_fn(""); |
366 | 366 | ||
367 | if (class_num == PASCAL_COMPUTE_A) { | 367 | if (class_num == VOLTA_COMPUTE_A) { |
368 | switch (offset << 2) { | 368 | switch (offset << 2) { |
369 | case NVC0C0_SET_SHADER_EXCEPTIONS: | 369 | case NVC0C0_SET_SHADER_EXCEPTIONS: |
370 | gk20a_gr_set_shader_exceptions(g, data); | 370 | gk20a_gr_set_shader_exceptions(g, data); |
@@ -374,18 +374,18 @@ static int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, | |||
374 | } | 374 | } |
375 | } | 375 | } |
376 | 376 | ||
377 | if (class_num == PASCAL_A) { | 377 | if (class_num == VOLTA_A) { |
378 | switch (offset << 2) { | 378 | switch (offset << 2) { |
379 | case NVC097_SET_SHADER_EXCEPTIONS: | 379 | case NVC397_SET_SHADER_EXCEPTIONS: |
380 | gk20a_gr_set_shader_exceptions(g, data); | 380 | gk20a_gr_set_shader_exceptions(g, data); |
381 | break; | 381 | break; |
382 | case NVC097_SET_CIRCULAR_BUFFER_SIZE: | 382 | case NVC397_SET_CIRCULAR_BUFFER_SIZE: |
383 | g->ops.gr.set_circular_buffer_size(g, data); | 383 | g->ops.gr.set_circular_buffer_size(g, data); |
384 | break; | 384 | break; |
385 | case NVC097_SET_ALPHA_CIRCULAR_BUFFER_SIZE: | 385 | case NVC397_SET_ALPHA_CIRCULAR_BUFFER_SIZE: |
386 | g->ops.gr.set_alpha_circular_buffer_size(g, data); | 386 | g->ops.gr.set_alpha_circular_buffer_size(g, data); |
387 | break; | 387 | break; |
388 | case NVC097_SET_GO_IDLE_TIMEOUT: | 388 | case NVC397_SET_GO_IDLE_TIMEOUT: |
389 | gr_gv11b_set_go_idle_timeout(g, data); | 389 | gr_gv11b_set_go_idle_timeout(g, data); |
390 | break; | 390 | break; |
391 | case NVC097_SET_COALESCE_BUFFER_SIZE: | 391 | case NVC097_SET_COALESCE_BUFFER_SIZE: |
@@ -401,12 +401,25 @@ fail: | |||
401 | return -EINVAL; | 401 | return -EINVAL; |
402 | } | 402 | } |
403 | 403 | ||
404 | static void gr_gv11b_bundle_cb_defaults(struct gk20a *g) | ||
405 | { | ||
406 | struct gr_gk20a *gr = &g->gr; | ||
407 | |||
408 | gr->bundle_cb_default_size = | ||
409 | gr_scc_bundle_cb_size_div_256b__prod_v(); | ||
410 | gr->min_gpm_fifo_depth = | ||
411 | gr_pd_ab_dist_cfg2_state_limit_min_gpm_fifo_depths_v(); | ||
412 | gr->bundle_cb_token_limit = | ||
413 | gr_pd_ab_dist_cfg2_token_limit_init_v(); | ||
414 | } | ||
415 | |||
404 | static void gr_gv11b_cb_size_default(struct gk20a *g) | 416 | static void gr_gv11b_cb_size_default(struct gk20a *g) |
405 | { | 417 | { |
406 | struct gr_gk20a *gr = &g->gr; | 418 | struct gr_gk20a *gr = &g->gr; |
407 | 419 | ||
408 | if (!gr->attrib_cb_default_size) | 420 | if (!gr->attrib_cb_default_size) |
409 | gr->attrib_cb_default_size = 0x800; | 421 | gr->attrib_cb_default_size = |
422 | gr_gpc0_ppc0_cbm_beta_cb_size_v_default_v(); | ||
410 | gr->alpha_cb_default_size = | 423 | gr->alpha_cb_default_size = |
411 | gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(); | 424 | gr_gpc0_ppc0_cbm_alpha_cb_size_v_default_v(); |
412 | } | 425 | } |
@@ -1680,6 +1693,7 @@ void gv11b_init_gr(struct gpu_ops *gops) | |||
1680 | gops->gr.commit_global_attrib_cb = gr_gv11b_commit_global_attrib_cb; | 1693 | gops->gr.commit_global_attrib_cb = gr_gv11b_commit_global_attrib_cb; |
1681 | gops->gr.commit_global_bundle_cb = gr_gv11b_commit_global_bundle_cb; | 1694 | gops->gr.commit_global_bundle_cb = gr_gv11b_commit_global_bundle_cb; |
1682 | gops->gr.handle_sw_method = gr_gv11b_handle_sw_method; | 1695 | gops->gr.handle_sw_method = gr_gv11b_handle_sw_method; |
1696 | gops->gr.bundle_cb_defaults = gr_gv11b_bundle_cb_defaults; | ||
1683 | gops->gr.cb_size_default = gr_gv11b_cb_size_default; | 1697 | gops->gr.cb_size_default = gr_gv11b_cb_size_default; |
1684 | gops->gr.set_alpha_circular_buffer_size = | 1698 | gops->gr.set_alpha_circular_buffer_size = |
1685 | gr_gv11b_set_alpha_circular_buffer_size; | 1699 | gr_gv11b_set_alpha_circular_buffer_size; |
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h index df03cd8a..fe5445d9 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h | |||
@@ -28,6 +28,11 @@ enum { | |||
28 | /* use magic number 99 for subctx litter value */ | 28 | /* use magic number 99 for subctx litter value */ |
29 | #define GPU_LIT_NUM_SUBCTX 99 | 29 | #define GPU_LIT_NUM_SUBCTX 99 |
30 | 30 | ||
31 | #define NVC397_SET_SHADER_EXCEPTIONS 0x1528 | ||
32 | #define NVC397_SET_CIRCULAR_BUFFER_SIZE 0x1280 | ||
33 | #define NVC397_SET_ALPHA_CIRCULAR_BUFFER_SIZE 0x02dc | ||
34 | #define NVC397_SET_GO_IDLE_TIMEOUT 0x022c | ||
35 | |||
31 | void gv11b_init_gr(struct gpu_ops *ops); | 36 | void gv11b_init_gr(struct gpu_ops *ops); |
32 | int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, | 37 | int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, |
33 | struct mem_desc *mem); | 38 | struct mem_desc *mem); |