diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-03-03 14:59:29 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-08 19:39:51 -0500 |
commit | 26cd7b3d822b0b759468300777ff6e43cb5f0f7e (patch) | |
tree | 98757917ab9b3e66b0bef9f14cee4fbf262e5877 /drivers/gpu/nvgpu/gv11b | |
parent | 5e4ca8f5e8fca20b8357056242356bc608e54e27 (diff) |
gpu: nvgpu: gv11b: ltc related changes
There is no peermem access for gv11b nvlink.
So no need to enable peermem access through l2.
Implemented gv11b specific ltc_cbc_fix_config
function to read correct num_active_ltcs.
JIRA GV11B-71
Change-Id: I348ce3bbf42e864341494e386b6f33478badb3a8
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1315148
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/ltc_gv11b.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c index 70919f24..daad8718 100644 --- a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c | |||
@@ -53,8 +53,7 @@ static void gv11b_ltc_init_fs_state(struct gk20a *g) | |||
53 | gk20a_dbg_info("%u ltcs out of %u", g->ltc_count, g->max_ltc_count); | 53 | gk20a_dbg_info("%u ltcs out of %u", g->ltc_count, g->max_ltc_count); |
54 | 54 | ||
55 | reg = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); | 55 | reg = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); |
56 | reg |= ltc_ltcs_ltss_cbc_num_active_ltcs_nvlink_peer_through_l2_f(true) | 56 | reg |= ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_f(true); |
57 | | ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_f(true); | ||
58 | gk20a_writel(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r(), reg); | 57 | gk20a_writel(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r(), reg); |
59 | 58 | ||
60 | gk20a_writel(g, ltc_ltcs_ltss_dstg_cfg0_r(), | 59 | gk20a_writel(g, ltc_ltcs_ltss_dstg_cfg0_r(), |
@@ -75,10 +74,24 @@ static void gv11b_ltc_init_fs_state(struct gk20a *g) | |||
75 | ltc_intr); | 74 | ltc_intr); |
76 | } | 75 | } |
77 | 76 | ||
77 | u32 gv11b_ltc_cbc_fix_config(struct gk20a *g, int base) | ||
78 | { | ||
79 | u32 val = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); | ||
80 | |||
81 | if (ltc_ltcs_ltss_cbc_num_active_ltcs__v(val) == 2) | ||
82 | return base * 2; | ||
83 | else if (ltc_ltcs_ltss_cbc_num_active_ltcs__v(val) != 1) { | ||
84 | gk20a_err(dev_from_gk20a(g), | ||
85 | "Invalid number of active ltcs: %08x\n", val); | ||
86 | } | ||
87 | return base; | ||
88 | } | ||
89 | |||
78 | 90 | ||
79 | void gv11b_init_ltc(struct gpu_ops *gops) | 91 | void gv11b_init_ltc(struct gpu_ops *gops) |
80 | { | 92 | { |
81 | gp10b_init_ltc(gops); | 93 | gp10b_init_ltc(gops); |
82 | gops->ltc.set_zbc_s_entry = gv11b_ltc_set_zbc_stencil_entry; | 94 | gops->ltc.set_zbc_s_entry = gv11b_ltc_set_zbc_stencil_entry; |
83 | gops->ltc.init_fs_state = gv11b_ltc_init_fs_state; | 95 | gops->ltc.init_fs_state = gv11b_ltc_init_fs_state; |
96 | gops->ltc.cbc_fix_config = gv11b_ltc_cbc_fix_config; | ||
84 | } | 97 | } |