mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: gr_priv header cleanup
Remove gr_priv.h from outside gr files. Add hal function in gr.init for get_no_of_sm. This helps to avoid dereferencing gr in couple of files for g->gr->config and avoid gr_priv.h include in those files. Replace nvgpu_gr_config_get_no_of_sm call with g->ops.gr.init.get_no_of_sm for files outside gr unit. Jira NVGPU-3218 Change-Id: I435bb233f70986e31fbfcb900ada3b3bda0bc787 Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2109182 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c272264f54
commit
7581601f80
@@ -563,15 +563,15 @@ static int gk20a_tsg_ioctl_read_single_sm_error_state(struct gk20a *g,
|
||||
struct tsg_gk20a *tsg,
|
||||
struct nvgpu_tsg_read_single_sm_error_state_args *args)
|
||||
{
|
||||
struct nvgpu_gr *gr = g->gr;
|
||||
struct nvgpu_tsg_sm_error_state *sm_error_state;
|
||||
struct nvgpu_tsg_sm_error_state_record sm_error_state_record;
|
||||
u32 sm_id;
|
||||
int err = 0;
|
||||
|
||||
sm_id = args->sm_id;
|
||||
if (sm_id >= nvgpu_gr_config_get_no_of_sm(gr->config))
|
||||
if (sm_id >= g->ops.gr.init.get_no_of_sm(g)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
nvgpu_speculation_barrier();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user