From 093974e3970f5a218985baef787face5e26a2c7d Mon Sep 17 00:00:00 2001 From: Ramalingam C Date: Wed, 23 Nov 2022 10:07:57 +0000 Subject: [PATCH] gpu: nvgpu: ga10b: use a hal instead of a macro Use the g->ops.grmgr.get_allowed_swizzid_size() hal instead of smcarb_allowed_swizzid__size1_v(). This helps to avoid the duplication of another hal when the macro changes for new chips. JIRA: NVGPU-9078 Change-Id: I2dfb927172c30e945c2c20da7dd64f7f17bc71ae Signed-off-by: Ramalingam C Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2814618 Reviewed-by: svcacv Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Seema Khowala GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/grmgr/grmgr_ga10b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/grmgr/grmgr_ga10b.c b/drivers/gpu/nvgpu/hal/grmgr/grmgr_ga10b.c index c4c36aa07..b89358050 100644 --- a/drivers/gpu/nvgpu/hal/grmgr/grmgr_ga10b.c +++ b/drivers/gpu/nvgpu/hal/grmgr/grmgr_ga10b.c @@ -870,14 +870,14 @@ int ga10b_grmgr_get_gpc_instance_gpcgrp_id(struct gk20a *g, u32 gpu_instance_id, u32 gr_syspipe_id, u32 *gpcgrp_id) { - if ((gpu_instance_id >= smcarb_allowed_swizzid__size1_v()) || + if ((gpu_instance_id >= g->ops.grmgr.get_allowed_swizzid_size(g)) || (gr_syspipe_id >= g->ops.grmgr.get_max_sys_pipes(g)) || (gpcgrp_id == NULL)) { nvgpu_err(g, "[Invalid_param] gr_syspipe_id[%u %u] gpu_instance_id[%u %u] " "or gpcgrp_id == NULL ", gr_syspipe_id, g->ops.grmgr.get_max_sys_pipes(g), - gpu_instance_id, smcarb_allowed_swizzid__size1_v()); + gpu_instance_id, g->ops.grmgr.get_allowed_swizzid_size(g)); return -EINVAL; }