diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2016-10-27 15:29:46 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-11-01 14:37:38 -0400 |
commit | e38542cc1e7cf4eb22cfa4089600a787ece0e189 (patch) | |
tree | 97072018bc51ac6ce03e5fd44427e23deeda25cc /drivers | |
parent | 56fcce12e00187438529d44f2e70cd28df9288bc (diff) |
gpu: nvgpu: gv11b: commit global timeslice
Implement chip specific commit_global_timeslice
function.
JIRA GV11B-21
Change-Id: I4f852913cb181f62063084c4e118d97148f99056
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1243947
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 94fd8058..cc4bbb21 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1677,6 +1677,59 @@ static void gr_gv11b_detect_sm_arch(struct gk20a *g) | |||
1677 | 1677 | ||
1678 | } | 1678 | } |
1679 | 1679 | ||
1680 | static int gr_gv11b_commit_global_timeslice(struct gk20a *g, | ||
1681 | struct channel_gk20a *c, bool patch) | ||
1682 | { | ||
1683 | struct channel_ctx_gk20a *ch_ctx = NULL; | ||
1684 | u32 pd_ab_dist_cfg0; | ||
1685 | u32 ds_debug; | ||
1686 | u32 mpc_vtg_debug; | ||
1687 | u32 pe_vaf; | ||
1688 | u32 pe_vsc_vpc; | ||
1689 | |||
1690 | gk20a_dbg_fn(""); | ||
1691 | |||
1692 | pd_ab_dist_cfg0 = gk20a_readl(g, gr_pd_ab_dist_cfg0_r()); | ||
1693 | ds_debug = gk20a_readl(g, gr_ds_debug_r()); | ||
1694 | mpc_vtg_debug = gk20a_readl(g, gr_gpcs_tpcs_mpc_vtg_debug_r()); | ||
1695 | |||
1696 | if (patch) { | ||
1697 | int err; | ||
1698 | |||
1699 | ch_ctx = &c->ch_ctx; | ||
1700 | err = gr_gk20a_ctx_patch_write_begin(g, ch_ctx); | ||
1701 | if (err) | ||
1702 | return err; | ||
1703 | } | ||
1704 | |||
1705 | pe_vaf = gk20a_readl(g, gr_gpcs_tpcs_pe_vaf_r()); | ||
1706 | pe_vsc_vpc = gk20a_readl(g, gr_gpcs_tpcs_pes_vsc_vpc_r()); | ||
1707 | |||
1708 | pe_vaf = gr_gpcs_tpcs_pe_vaf_fast_mode_switch_true_f() | pe_vaf; | ||
1709 | pe_vsc_vpc = gr_gpcs_tpcs_pes_vsc_vpc_fast_mode_switch_true_f() | | ||
1710 | pe_vsc_vpc; | ||
1711 | pd_ab_dist_cfg0 = gr_pd_ab_dist_cfg0_timeslice_enable_en_f() | | ||
1712 | pd_ab_dist_cfg0; | ||
1713 | ds_debug = gr_ds_debug_timeslice_mode_enable_f() | ds_debug; | ||
1714 | mpc_vtg_debug = gr_gpcs_tpcs_mpc_vtg_debug_timeslice_mode_enabled_f() | | ||
1715 | mpc_vtg_debug; | ||
1716 | |||
1717 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_gpcs_tpcs_pe_vaf_r(), pe_vaf, | ||
1718 | patch); | ||
1719 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_gpcs_tpcs_pes_vsc_vpc_r(), | ||
1720 | pe_vsc_vpc, patch); | ||
1721 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_pd_ab_dist_cfg0_r(), | ||
1722 | pd_ab_dist_cfg0, patch); | ||
1723 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_ds_debug_r(), ds_debug, patch); | ||
1724 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_gpcs_tpcs_mpc_vtg_debug_r(), | ||
1725 | mpc_vtg_debug, patch); | ||
1726 | |||
1727 | if (patch) | ||
1728 | gr_gk20a_ctx_patch_write_end(g, ch_ctx); | ||
1729 | |||
1730 | return 0; | ||
1731 | } | ||
1732 | |||
1680 | void gv11b_init_gr(struct gpu_ops *gops) | 1733 | void gv11b_init_gr(struct gpu_ops *gops) |
1681 | { | 1734 | { |
1682 | gp10b_init_gr(gops); | 1735 | gp10b_init_gr(gops); |
@@ -1719,4 +1772,5 @@ void gv11b_init_gr(struct gpu_ops *gops) | |||
1719 | gops->gr.setup_rop_mapping = gr_gv11b_setup_rop_mapping; | 1772 | gops->gr.setup_rop_mapping = gr_gv11b_setup_rop_mapping; |
1720 | gops->gr.init_sw_veid_bundle = gr_gv11b_init_sw_veid_bundle; | 1773 | gops->gr.init_sw_veid_bundle = gr_gv11b_init_sw_veid_bundle; |
1721 | gops->gr.program_zcull_mapping = gr_gv11b_program_zcull_mapping; | 1774 | gops->gr.program_zcull_mapping = gr_gv11b_program_zcull_mapping; |
1775 | gops->gr.commit_global_timeslice = gr_gv11b_commit_global_timeslice; | ||
1722 | } | 1776 | } |