From 5c740f7614b2513bbe4f30102abf1ddbce15e189 Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Wed, 3 Mar 2021 12:03:34 +0530 Subject: [PATCH] gpu: nvgpu: ga10b: print error when OPT_ECC_EN is not set On Silicon platforms it is expected that OPT_ECC_EN is set. Hence, print error message when this is not fused to 1. Bug 2919887 Change-Id: I35f6c6a795b9cea355f17027c9354a39ea2cdbec Signed-off-by: Antony Clince Alex Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2560042 Tested-by: mobile promotions Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: svc_kernel_abi Reviewed-by: Rajesh Devaraj Reviewed-by: Vaibhav Kachore Reviewed-by: Seema Khowala Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/fuse/fuse_ga10b.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/hal/fuse/fuse_ga10b.c b/drivers/gpu/nvgpu/hal/fuse/fuse_ga10b.c index 07d5a9313..0b43fcbf4 100644 --- a/drivers/gpu/nvgpu/hal/fuse/fuse_ga10b.c +++ b/drivers/gpu/nvgpu/hal/fuse/fuse_ga10b.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "fuse_ga10b.h" @@ -69,7 +70,13 @@ int ga10b_fuse_read_gcplex_config_fuse(struct gk20a *g, u32 *val) bool ga10b_fuse_is_opt_ecc_enable(struct gk20a *g) { - return nvgpu_readl(g, fuse_opt_ecc_en_r()) != 0U; + bool ecc_enable = nvgpu_readl(g, fuse_opt_ecc_en_r()) != 0U; + + if (nvgpu_platform_is_silicon(g) && !ecc_enable) { + nvgpu_err(g, "OPT_ECC_EN fuse not set"); + } + + return ecc_enable; } bool ga10b_fuse_is_opt_feature_override_disable(struct gk20a *g)