gpu: nvgpu: move gr config structs to priv header

Move sm_info and nvgpu_gr_config struts to a private
header and add APIs to access member fields.

JIRA NVGPU-3060

Change-Id: I90f44333f19cb8cb939c0a0f90d9a03f6c036080
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2091563
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nitin Kumbhar
2019-04-07 12:50:43 +05:30
committed by mobile promotions
parent 364c780469
commit c649ca9fd6
21 changed files with 292 additions and 144 deletions

View File

@@ -877,11 +877,12 @@ static ssize_t tpc_fs_mask_store(struct device *dev,
if (kstrtoul(buf, 10, &val) < 0)
return -EINVAL;
if (!config->gpc_tpc_mask)
if (nvgpu_gr_config_get_gpc_tpc_mask_base(config) != NULL)
return -ENODEV;
if (val && val != config->gpc_tpc_mask[0] && g->ops.gr.set_gpc_tpc_mask) {
config->gpc_tpc_mask[0] = val;
if (val && val != nvgpu_gr_config_get_gpc_tpc_mask(config, 0) &&
g->ops.gr.set_gpc_tpc_mask) {
nvgpu_gr_config_set_gpc_tpc_mask(config, 0, val);
g->tpc_fs_mask_user = val;
g->ops.gr.set_gpc_tpc_mask(g, 0);