mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: move no_of_sm to common.gr.config
1. Move no_of_sm from gr to common.gr.config 2. Add nvgpu_gr_config_get_no_of_sm() API in gr.config to fetch no_of_sm. JIRA NVGPU-1884 Change-Id: I3c6c20a12cd7f9939a349a409932195f17392943 Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2073583 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
03e137b552
commit
a2314ee780
@@ -35,6 +35,7 @@
|
||||
#include <nvgpu/channel.h>
|
||||
#include <nvgpu/tsg.h>
|
||||
#include <nvgpu/regops.h>
|
||||
#include <nvgpu/gr/config.h>
|
||||
#include <nvgpu/gr/ctx.h>
|
||||
#include <nvgpu/power_features/pg.h>
|
||||
|
||||
@@ -284,7 +285,7 @@ static int nvgpu_dbg_gpu_ioctl_read_single_sm_error_state(
|
||||
}
|
||||
|
||||
sm_id = args->sm_id;
|
||||
if (sm_id >= gr->no_of_sm) {
|
||||
if (sm_id >= nvgpu_gr_config_get_no_of_sm(gr->config)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1460,7 +1461,7 @@ static int nvgpu_dbg_gpu_ioctl_clear_single_sm_error_state(
|
||||
}
|
||||
|
||||
sm_id = args->sm_id;
|
||||
if (sm_id >= gr->no_of_sm)
|
||||
if (sm_id >= nvgpu_gr_config_get_no_of_sm(gr->config))
|
||||
return -EINVAL;
|
||||
|
||||
nvgpu_speculation_barrier();
|
||||
|
||||
Reference in New Issue
Block a user