mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add null check for mssnvlink hals
Add NULL check for mssnvlink related HALs. JIRA NVGPU-9263 Change-Id: I418191c11aabdb614255220d4e26120e9301a2d2 Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2806101 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f6aedfc36b
commit
69adc6c91d
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* GA10B FB
|
||||
*
|
||||
* Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -150,7 +150,9 @@ void ga10b_fb_init_fs_state(struct gk20a *g)
|
||||
nvgpu_log(g, gpu_dbg_fn, "initialize ga10b fb");
|
||||
|
||||
#if defined(CONFIG_NVGPU_HAL_NON_FUSA)
|
||||
g->ops.mssnvlink.init_soc_credits(g);
|
||||
if (g->ops.mssnvlink.init_soc_credits != NULL) {
|
||||
g->ops.mssnvlink.init_soc_credits(g);
|
||||
}
|
||||
#endif
|
||||
ga10b_fb_check_ltcs_count(g);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -72,6 +72,10 @@ void ga10b_mssnvlink_init_soc_credits(struct gk20a *g)
|
||||
|
||||
uintptr_t mssnvlink_control[MSS_NVLINK_INTERNAL_NUM];
|
||||
|
||||
if (g->ops.mssnvlink.get_links == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nvgpu_platform_is_simulation(g)) {
|
||||
nvgpu_log(g, gpu_dbg_info, "simulation platform: "
|
||||
"nvlink soc credits not required");
|
||||
|
||||
Reference in New Issue
Block a user