diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 29 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.h | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index d9d045bd..6ef27abf 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -642,6 +642,31 @@ static void gr_gp10b_set_coalesce_buffer_size(struct gk20a *g, u32 data) | |||
642 | gk20a_dbg_fn("done"); | 642 | gk20a_dbg_fn("done"); |
643 | } | 643 | } |
644 | 644 | ||
645 | static void gr_gp10b_set_bes_crop_debug3(struct gk20a *g, u32 data) | ||
646 | { | ||
647 | u32 val; | ||
648 | |||
649 | gk20a_dbg_fn(""); | ||
650 | |||
651 | val = gk20a_readl(g, gr_bes_crop_debug3_r()); | ||
652 | if ((data & 1)) { | ||
653 | val = set_field(val, | ||
654 | gr_bes_crop_debug3_blendopt_read_suppress_m(), | ||
655 | gr_bes_crop_debug3_blendopt_read_suppress_enabled_f()); | ||
656 | val = set_field(val, | ||
657 | gr_bes_crop_debug3_blendopt_fill_override_m(), | ||
658 | gr_bes_crop_debug3_blendopt_fill_override_enabled_f()); | ||
659 | } else { | ||
660 | val = set_field(val, | ||
661 | gr_bes_crop_debug3_blendopt_read_suppress_m(), | ||
662 | gr_bes_crop_debug3_blendopt_read_suppress_disabled_f()); | ||
663 | val = set_field(val, | ||
664 | gr_bes_crop_debug3_blendopt_fill_override_m(), | ||
665 | gr_bes_crop_debug3_blendopt_fill_override_disabled_f()); | ||
666 | } | ||
667 | gk20a_writel(g, gr_bes_crop_debug3_r(), val); | ||
668 | } | ||
669 | |||
645 | static int gr_gp10b_handle_sw_method(struct gk20a *g, u32 addr, | 670 | static int gr_gp10b_handle_sw_method(struct gk20a *g, u32 addr, |
646 | u32 class_num, u32 offset, u32 data) | 671 | u32 class_num, u32 offset, u32 data) |
647 | { | 672 | { |
@@ -680,6 +705,9 @@ static int gr_gp10b_handle_sw_method(struct gk20a *g, u32 addr, | |||
680 | case NVC097_SET_RD_COALESCE: | 705 | case NVC097_SET_RD_COALESCE: |
681 | gr_gm20b_set_rd_coalesce(g, data); | 706 | gr_gm20b_set_rd_coalesce(g, data); |
682 | break; | 707 | break; |
708 | case NVC097_SET_BES_CROP_DEBUG3: | ||
709 | g->ops.gr.set_bes_crop_debug3(g, data); | ||
710 | break; | ||
683 | default: | 711 | default: |
684 | goto fail; | 712 | goto fail; |
685 | } | 713 | } |
@@ -2364,6 +2392,7 @@ void gp10b_init_gr(struct gpu_ops *gops) | |||
2364 | gr_gp10b_set_alpha_circular_buffer_size; | 2392 | gr_gp10b_set_alpha_circular_buffer_size; |
2365 | gops->gr.set_circular_buffer_size = | 2393 | gops->gr.set_circular_buffer_size = |
2366 | gr_gp10b_set_circular_buffer_size; | 2394 | gr_gp10b_set_circular_buffer_size; |
2395 | gops->gr.set_bes_crop_debug3 = gr_gp10b_set_bes_crop_debug3; | ||
2367 | gops->gr.init_ctx_state = gr_gp10b_init_ctx_state; | 2396 | gops->gr.init_ctx_state = gr_gp10b_init_ctx_state; |
2368 | gops->gr.alloc_gr_ctx = gr_gp10b_alloc_gr_ctx; | 2397 | gops->gr.alloc_gr_ctx = gr_gp10b_alloc_gr_ctx; |
2369 | gops->gr.free_gr_ctx = gr_gp10b_free_gr_ctx; | 2398 | gops->gr.free_gr_ctx = gr_gp10b_free_gr_ctx; |
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h index 76e48075..aac9eb65 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h | |||
@@ -37,6 +37,7 @@ enum { | |||
37 | #define NVC097_SET_RD_COALESCE 0x102c | 37 | #define NVC097_SET_RD_COALESCE 0x102c |
38 | #define NVC097_SET_CIRCULAR_BUFFER_SIZE 0x1280 | 38 | #define NVC097_SET_CIRCULAR_BUFFER_SIZE 0x1280 |
39 | #define NVC097_SET_SHADER_EXCEPTIONS 0x1528 | 39 | #define NVC097_SET_SHADER_EXCEPTIONS 0x1528 |
40 | #define NVC097_SET_BES_CROP_DEBUG3 0x10c4 | ||
40 | #define NVC0C0_SET_SHADER_EXCEPTIONS 0x1528 | 41 | #define NVC0C0_SET_SHADER_EXCEPTIONS 0x1528 |
41 | #define NVC0C0_SET_RD_COALESCE 0x0228 | 42 | #define NVC0C0_SET_RD_COALESCE 0x0228 |
42 | 43 | ||