summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-02-28 19:17:04 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-02 11:53:33 -0500
commit434b1c588b9c8d61ac413b0c9ae402b483deb68b (patch)
tree15545a2a436724bbe90e71c028869707a1587522 /drivers/gpu/nvgpu/gv11b
parent58c72012f4a8b554083cdf7ea8061b98e8de02dc (diff)
gpu: nvgpu: gv11b: handle l2 related changes
Implemented gv11b specific l2 state init and Configured ltc_ltcs_ltss_cbc_num_active_ltcs_r with following info: - cbc_num_active_ltcs is read only for gv11b, so did not write any data to that field. - enforced serilized access to l2 from sysmem and peermem. - nvlink connected peer trafic sent through l2 JIRA GV11B-71 Change-Id: I63d9ee3f0a6da62e672a34e207f1f5214b6ed1b4 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1312831 GVS: Gerrit_Virtual_Submit Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r--drivers/gpu/nvgpu/gv11b/ltc_gv11b.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
index 85ff33d2..70919f24 100644
--- a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
@@ -20,6 +20,8 @@
20#include "ltc_gv11b.h" 20#include "ltc_gv11b.h"
21 21
22#include <nvgpu/hw/gv11b/hw_ltc_gv11b.h> 22#include <nvgpu/hw/gv11b/hw_ltc_gv11b.h>
23#include <nvgpu/hw/gv11b/hw_top_gv11b.h>
24#include <nvgpu/hw/gv11b/hw_pri_ringmaster_gv11b.h>
23 25
24/* 26/*
25 * Sets the ZBC stencil for the passed index. 27 * Sets the ZBC stencil for the passed index.
@@ -39,8 +41,44 @@ static void gv11b_ltc_set_zbc_stencil_entry(struct gk20a *g,
39 gk20a_readl(g, ltc_ltcs_ltss_dstg_zbc_index_r()); 41 gk20a_readl(g, ltc_ltcs_ltss_dstg_zbc_index_r());
40} 42}
41 43
44static void gv11b_ltc_init_fs_state(struct gk20a *g)
45{
46 u32 ltc_intr;
47 u32 reg;
48
49 gk20a_dbg_info("initialize gv11b l2");
50
51 g->max_ltc_count = gk20a_readl(g, top_num_ltcs_r());
52 g->ltc_count = gk20a_readl(g, pri_ringmaster_enum_ltc_r());
53 gk20a_dbg_info("%u ltcs out of %u", g->ltc_count, g->max_ltc_count);
54
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)
57 | ltc_ltcs_ltss_cbc_num_active_ltcs_serialize_f(true);
58 gk20a_writel(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r(), reg);
59
60 gk20a_writel(g, ltc_ltcs_ltss_dstg_cfg0_r(),
61 gk20a_readl(g, ltc_ltc0_lts0_dstg_cfg0_r()) |
62 ltc_ltcs_ltss_dstg_cfg0_vdc_4to2_disable_m());
63
64 /* Disable LTC interrupts */
65 reg = gk20a_readl(g, ltc_ltcs_ltss_intr_r());
66 reg &= ~ltc_ltcs_ltss_intr_en_evicted_cb_m();
67 reg &= ~ltc_ltcs_ltss_intr_en_illegal_compstat_access_m();
68 gk20a_writel(g, ltc_ltcs_ltss_intr_r(), reg);
69
70 /* Enable ECC interrupts */
71 ltc_intr = gk20a_readl(g, ltc_ltcs_ltss_intr_r());
72 ltc_intr |= ltc_ltcs_ltss_intr_en_ecc_sec_error_enabled_f() |
73 ltc_ltcs_ltss_intr_en_ecc_ded_error_enabled_f();
74 gk20a_writel(g, ltc_ltcs_ltss_intr_r(),
75 ltc_intr);
76}
77
78
42void gv11b_init_ltc(struct gpu_ops *gops) 79void gv11b_init_ltc(struct gpu_ops *gops)
43{ 80{
44 gp10b_init_ltc(gops); 81 gp10b_init_ltc(gops);
45 gops->ltc.set_zbc_s_entry = gv11b_ltc_set_zbc_stencil_entry; 82 gops->ltc.set_zbc_s_entry = gv11b_ltc_set_zbc_stencil_entry;
83 gops->ltc.init_fs_state = gv11b_ltc_init_fs_state;
46} 84}