diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 32 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.h | 5 |
2 files changed, 35 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index d8b251c6..78ffd3d4 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1622,6 +1622,37 @@ static int gr_gv11b_init_sw_veid_bundle(struct gk20a *g) | |||
1622 | return err; | 1622 | return err; |
1623 | } | 1623 | } |
1624 | 1624 | ||
1625 | void gr_gv11b_program_zcull_mapping(struct gk20a *g, u32 zcull_num_entries, | ||
1626 | u32 *zcull_map_tiles) | ||
1627 | { | ||
1628 | u32 val, i, j; | ||
1629 | |||
1630 | gk20a_dbg_fn(""); | ||
1631 | |||
1632 | for (i = 0, j = 0; i < (zcull_num_entries / 8); i++, j += 8) { | ||
1633 | val = | ||
1634 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_0_f( | ||
1635 | zcull_map_tiles[j+0]) | | ||
1636 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_1_f( | ||
1637 | zcull_map_tiles[j+1]) | | ||
1638 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_2_f( | ||
1639 | zcull_map_tiles[j+2]) | | ||
1640 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_3_f( | ||
1641 | zcull_map_tiles[j+3]) | | ||
1642 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_4_f( | ||
1643 | zcull_map_tiles[j+4]) | | ||
1644 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_5_f( | ||
1645 | zcull_map_tiles[j+5]) | | ||
1646 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_6_f( | ||
1647 | zcull_map_tiles[j+6]) | | ||
1648 | gr_gpcs_zcull_sm_in_gpc_number_map_tile_7_f( | ||
1649 | zcull_map_tiles[j+7]); | ||
1650 | |||
1651 | gk20a_writel(g, gr_gpcs_zcull_sm_in_gpc_number_map_r(i), val); | ||
1652 | } | ||
1653 | } | ||
1654 | |||
1655 | |||
1625 | void gv11b_init_gr(struct gpu_ops *gops) | 1656 | void gv11b_init_gr(struct gpu_ops *gops) |
1626 | { | 1657 | { |
1627 | gp10b_init_gr(gops); | 1658 | gp10b_init_gr(gops); |
@@ -1660,4 +1691,5 @@ void gv11b_init_gr(struct gpu_ops *gops) | |||
1660 | gops->gr.handle_fecs_error = gr_gv11b_handle_fecs_error; | 1691 | gops->gr.handle_fecs_error = gr_gv11b_handle_fecs_error; |
1661 | gops->gr.setup_rop_mapping = gr_gv11b_setup_rop_mapping; | 1692 | gops->gr.setup_rop_mapping = gr_gv11b_setup_rop_mapping; |
1662 | gops->gr.init_sw_veid_bundle = gr_gv11b_init_sw_veid_bundle; | 1693 | gops->gr.init_sw_veid_bundle = gr_gv11b_init_sw_veid_bundle; |
1694 | gops->gr.program_zcull_mapping = gr_gv11b_program_zcull_mapping; | ||
1663 | } | 1695 | } |
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h index 5f13aa5c..df03cd8a 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h | |||
@@ -31,6 +31,7 @@ enum { | |||
31 | void gv11b_init_gr(struct gpu_ops *ops); | 31 | void gv11b_init_gr(struct gpu_ops *ops); |
32 | int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, | 32 | int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, |
33 | struct mem_desc *mem); | 33 | struct mem_desc *mem); |
34 | 34 | /*zcull*/ | |
35 | 35 | void gr_gv11b_program_zcull_mapping(struct gk20a *g, u32 zcull_num_entries, | |
36 | u32 *zcull_map_tiles); | ||
36 | #endif | 37 | #endif |