diff --git a/drivers/gpu/nvgpu/hal/fb/fb_ga10b_fusa.c b/drivers/gpu/nvgpu/hal/fb/fb_ga10b_fusa.c index 982e244ee..18b08e122 100644 --- a/drivers/gpu/nvgpu/hal/fb/fb_ga10b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fb/fb_ga10b_fusa.c @@ -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); diff --git a/drivers/gpu/nvgpu/hal/mssnvlink/mssnvlink_ga10b.c b/drivers/gpu/nvgpu/hal/mssnvlink/mssnvlink_ga10b.c index c606aa7ae..1e2689827 100644 --- a/drivers/gpu/nvgpu/hal/mssnvlink/mssnvlink_ga10b.c +++ b/drivers/gpu/nvgpu/hal/mssnvlink/mssnvlink_ga10b.c @@ -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");