summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index f5aef512..125be58c 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -504,6 +504,13 @@ static int vgpu_get_constants(struct gk20a *g)
504 return err; 504 return err;
505 } 505 }
506 506
507 if (unlikely(p->gpc_count > TEGRA_VGPU_MAX_GPC_COUNT ||
508 p->max_tpc_per_gpc_count > TEGRA_VGPU_MAX_TPC_COUNT_PER_GPC)) {
509 gk20a_err(g->dev, "gpc_count %d max_tpc_per_gpc %d overflow",
510 (int)p->gpc_count, (int)p->max_tpc_per_gpc_count);
511 return -EINVAL;
512 }
513
507 priv->constants = *p; 514 priv->constants = *p;
508 return 0; 515 return 0;
509} 516}