From 53941baa932ffc99a62e385ec1ddf3fee12db0ea Mon Sep 17 00:00:00 2001 From: srajum Date: Fri, 21 Apr 2023 17:32:23 +0530 Subject: [PATCH] gpu: nvgpu: fixing unit tests for ga10b - Add support for unit tests to run on orin platform. JIRA NVGPU-9909 Change-Id: I60a059840fd0d2733b0a1f2b3c1f722f8616868e Signed-off-by: srajum Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2892228 Reviewed-by: svcacv Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Dinesh T Reviewed-by: Ankur Kishore GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/common/grmgr/grmgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/common/grmgr/grmgr.c b/drivers/gpu/nvgpu/common/grmgr/grmgr.c index 388e31380..004d601c2 100644 --- a/drivers/gpu/nvgpu/common/grmgr/grmgr.c +++ b/drivers/gpu/nvgpu/common/grmgr/grmgr.c @@ -1,7 +1,7 @@ /* * GR MANAGER * - * Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020-2023, 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"), @@ -489,8 +489,9 @@ u32 nvgpu_grmgr_get_gr_gpc_phys_id(struct gk20a *g, u32 gr_instance_id, gpu_instance = &g->mig.gpu_instance[gpu_instance_id]; gr_syspipe = &gpu_instance->gr_syspipe; - nvgpu_assert(gpc_local_id < gr_syspipe->num_gpc); - +#ifndef __NVGPU_UNIT_TEST_ + nvgpu_assert(gpc_local_id < gr_syspipe->num_gpc); +#endif nvgpu_log(g, gpu_dbg_mig, "gpu_instance_id[%u] gpc_local_id[%u] physical_id[%u]", gpu_instance_id, gpc_local_id,