diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-01-30 16:05:47 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-31 15:37:36 -0500 |
commit | 8e523a9a53088cd6b8645ab2b9ea8b3cd7cd5e9d (patch) | |
tree | 23e374cac0d95d19075e0a3f22b0251058f94387 | |
parent | cb9f8bae1aeacf9da0d5fea2da36baa43e9a586b (diff) |
gpu: nvgpu: gv11b: disable cbm alpha/beta cache invalidates
Disabled CBM alpha and beta cache invalidates as required
by hw. Since these registers are context switched out, added
these invalidates as part of gr init sequence, so golden context
restore these settings for all contexts.
Bug 2040262
Change-Id: Iffdd03f2ac6440ddd615899c407cfee692460918
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1648948
Reviewed-by: Sami Kiminki <skiminki@nvidia.com>
Tested-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h | 28 |
2 files changed, 36 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 61529a01..857f4944 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -2711,6 +2711,14 @@ int gr_gv11b_init_fs_state(struct gk20a *g) | |||
2711 | gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_arm_63_48_match_f()); | 2711 | gr_gpcs_tpcs_sm_texio_control_oor_addr_check_mode_arm_63_48_match_f()); |
2712 | gk20a_writel(g, gr_gpcs_tpcs_sm_texio_control_r(), data); | 2712 | gk20a_writel(g, gr_gpcs_tpcs_sm_texio_control_r(), data); |
2713 | 2713 | ||
2714 | /* Disable CBM alpha and beta invalidations for l2 */ | ||
2715 | data = gk20a_readl(g, gr_gpcs_ppcs_cbm_debug_r()); | ||
2716 | data = set_field(data, gr_gpcs_ppcs_cbm_debug_invalidate_alpha_m(), | ||
2717 | gr_gpcs_ppcs_cbm_debug_invalidate_alpha_disable_f()); | ||
2718 | data = set_field(data, gr_gpcs_ppcs_cbm_debug_invalidate_beta_m(), | ||
2719 | gr_gpcs_ppcs_cbm_debug_invalidate_beta_disable_f()); | ||
2720 | gk20a_writel(g, gr_gpcs_ppcs_cbm_debug_r(), data); | ||
2721 | |||
2714 | data = gk20a_readl(g, gr_gpcs_tpcs_sm_disp_ctrl_r()); | 2722 | data = gk20a_readl(g, gr_gpcs_tpcs_sm_disp_ctrl_r()); |
2715 | data = set_field(data, gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_m(), | 2723 | data = set_field(data, gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_m(), |
2716 | gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f()); | 2724 | gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f()); |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h index 72cbc7dd..f40c7585 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h | |||
@@ -3636,6 +3636,34 @@ static inline u32 gr_gpcs_ppcs_cbm_beta_cb_ctrl_cbes_reserve_f(u32 v) | |||
3636 | { | 3636 | { |
3637 | return (v & 0xfffU) << 0U; | 3637 | return (v & 0xfffU) << 0U; |
3638 | } | 3638 | } |
3639 | static inline u32 gr_gpcs_ppcs_cbm_debug_r(void) | ||
3640 | { | ||
3641 | return 0x0041bec4U; | ||
3642 | } | ||
3643 | static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_alpha_m(void) | ||
3644 | { | ||
3645 | return 0x1U << 0U; | ||
3646 | } | ||
3647 | static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_alpha_disable_f(void) | ||
3648 | { | ||
3649 | return 0x0U; | ||
3650 | } | ||
3651 | static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_alpha_enable_f(void) | ||
3652 | { | ||
3653 | return 0x1U; | ||
3654 | } | ||
3655 | static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_beta_m(void) | ||
3656 | { | ||
3657 | return 0x1U << 1U; | ||
3658 | } | ||
3659 | static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_beta_disable_f(void) | ||
3660 | { | ||
3661 | return 0x0U; | ||
3662 | } | ||
3663 | static inline u32 gr_gpcs_ppcs_cbm_debug_invalidate_beta_enable_f(void) | ||
3664 | { | ||
3665 | return 0x2U; | ||
3666 | } | ||
3639 | static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i) | 3667 | static inline u32 gr_gpcs_swdx_tc_beta_cb_size_r(u32 i) |
3640 | { | 3668 | { |
3641 | return 0x00418ea0U + i*4U; | 3669 | return 0x00418ea0U + i*4U; |