diff options
author | Vinod G <vinodg@nvidia.com> | 2018-07-10 19:13:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-19 03:06:43 -0400 |
commit | d859c5f4a03b975dc493f72a35016e83adad279a (patch) | |
tree | e7a1242a1d130a726456cf3a928a34941aad98f4 /drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |
parent | 74e1a11d840b3d7411b380c2e4e4c99126ea32a5 (diff) |
nvgpu: gv11b: Rearrange gr function
Moved gv11b_detect_ecc_enabled_units function
from gv11b.c to gr_gv11b.c, as this is being
used only in gr_gv11b file.
In order to avoid GR code touching fuse registers,
as it need to include fuse HW headers in GR code,
introduced two fuse HALs which are being called
from GR code. is_opt_ecc_enable for checking
whether ecc enable bit is set in fuse register
and is_opt_feature_overide_disable for checking
whether feature override disable bit is set in
fuse register.
Initialized fuse HAL functions for chips that
make use of those HAL functions.
JIRA NVGPU-615
Change-Id: Iafe5a3940bb19cb3da51e270403450b63c2f67a3
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775564
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 424c8490..16eddeca 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <nvgpu/hw/gp10b/hw_fifo_gp10b.h> | 43 | #include <nvgpu/hw/gp10b/hw_fifo_gp10b.h> |
44 | #include <nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h> | 44 | #include <nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h> |
45 | #include <nvgpu/hw/gp10b/hw_mc_gp10b.h> | 45 | #include <nvgpu/hw/gp10b/hw_mc_gp10b.h> |
46 | #include <nvgpu/hw/gp10b/hw_fuse_gp10b.h> | ||
47 | 46 | ||
48 | #define GFXP_WFI_TIMEOUT_COUNT_DEFAULT 100000 | 47 | #define GFXP_WFI_TIMEOUT_COUNT_DEFAULT 100000 |
49 | 48 | ||
@@ -2022,11 +2021,14 @@ u32 gp10b_gr_get_sm_hww_warp_esr(struct gk20a *g, | |||
2022 | 2021 | ||
2023 | u32 get_ecc_override_val(struct gk20a *g) | 2022 | u32 get_ecc_override_val(struct gk20a *g) |
2024 | { | 2023 | { |
2025 | u32 val; | 2024 | bool en = false; |
2026 | 2025 | ||
2027 | val = gk20a_readl(g, fuse_opt_ecc_en_r()); | 2026 | if (g->ops.fuse.is_opt_ecc_enable) { |
2028 | if (val) | 2027 | en = g->ops.fuse.is_opt_ecc_enable(g); |
2029 | return gk20a_readl(g, gr_fecs_feature_override_ecc_r()); | 2028 | if (en) { |
2029 | return gk20a_readl(g, gr_fecs_feature_override_ecc_r()); | ||
2030 | } | ||
2031 | } | ||
2030 | 2032 | ||
2031 | return 0; | 2033 | return 0; |
2032 | } | 2034 | } |