diff options
author | sujeet baranwal <sbaranwal@nvidia.com> | 2014-08-07 20:04:18 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:49 -0400 |
commit | 5db7a42055eb2239b5a3a597935c27ac0b920d3d (patch) | |
tree | 778d28ffd3e32200a6a3ff978c3ad02146281234 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | 42d37357f8b4d2f2433f43f951dcbc3978d9f949 (diff) |
gpu: sysfs mode for allowing access to registers
Through this sysfs entry, the register space becomes accessible.
This is be accessible root-only.
Bug 1523403
Change-Id: Ia46f130a0cfd8324c5b675d19e7cbfba9dcb17ca
Signed-off-by: sujeet baranwal <sbaranwal@nvidia.com>
Reviewed-on: http://git-master/r/454198
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index d9ab99a4..874b8056 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1713,8 +1713,13 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g, | |||
1713 | virt_addr_hi = | 1713 | virt_addr_hi = |
1714 | u64_hi32(ch_ctx->global_ctx_buffer_va[PRIV_ACCESS_MAP_VA]); | 1714 | u64_hi32(ch_ctx->global_ctx_buffer_va[PRIV_ACCESS_MAP_VA]); |
1715 | 1715 | ||
1716 | if (g->allow_all) | ||
1717 | data = ctxsw_prog_main_image_priv_access_map_config_mode_allow_all_f(); | ||
1718 | else | ||
1719 | data = ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f(); | ||
1720 | |||
1716 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_priv_access_map_config_o(), 0, | 1721 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_priv_access_map_config_o(), 0, |
1717 | ctxsw_prog_main_image_priv_access_map_config_mode_use_map_f()); | 1722 | data); |
1718 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_priv_access_map_addr_lo_o(), 0, | 1723 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_priv_access_map_addr_lo_o(), 0, |
1719 | virt_addr_lo); | 1724 | virt_addr_lo); |
1720 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_priv_access_map_addr_hi_o(), 0, | 1725 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_priv_access_map_addr_hi_o(), 0, |