From 02d1e7ae979eedf74a27f0ec57bde85c06ba2d35 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Wed, 28 Jun 2017 14:47:36 -0700 Subject: gpu: nvgpu: add GPU_LIT_NUM_SM_PER_TPC litter value Required for multiple SM support in t19x JIRA GPUT19X-75 Change-Id: I14e19700849faf5180813e82179707a78eb977a5 Signed-off-by: Seema Khowala Reviewed-on: https://git-master/r/1510358 GVS: Gerrit_Virtual_Submit Reviewed-by: David Martinez Nieto Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/hal_gk20a.c | 3 +++ drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 3 +++ drivers/gpu/nvgpu/gp106/hal_gp106.c | 3 +++ drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 3 +++ drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_proj_gm20b.h | 6 +++++- drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_proj_gp106.h | 6 +++++- drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_proj_gp10b.h | 6 +++++- 7 files changed, 27 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c index 27ddbca1..5408c822 100644 --- a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c @@ -89,6 +89,9 @@ static int gk20a_get_litter_value(struct gk20a *g, int value) case GPU_LIT_NUM_TPC_PER_GPC: ret = proj_scal_litter_num_tpc_per_gpc_v(); break; + case GPU_LIT_NUM_SM_PER_TPC: + ret = 1; + break; case GPU_LIT_NUM_FBPS: ret = proj_scal_litter_num_fbps_v(); break; diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 53542702..d22caab8 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -128,6 +128,9 @@ static int gm20b_get_litter_value(struct gk20a *g, int value) case GPU_LIT_NUM_TPC_PER_GPC: ret = proj_scal_litter_num_tpc_per_gpc_v(); break; + case GPU_LIT_NUM_SM_PER_TPC: + ret = proj_scal_litter_num_sm_per_tpc_v(); + break; case GPU_LIT_NUM_FBPS: ret = proj_scal_litter_num_fbps_v(); break; diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index adea3eb8..3f0a9a98 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -134,6 +134,9 @@ static int gp106_get_litter_value(struct gk20a *g, int value) case GPU_LIT_NUM_PES_PER_GPC: ret = proj_scal_litter_num_pes_per_gpc_v(); break; + case GPU_LIT_NUM_SM_PER_TPC: + ret = proj_scal_litter_num_sm_per_tpc_v(); + break; case GPU_LIT_NUM_ZCULL_BANKS: ret = proj_scal_litter_num_zcull_banks_v(); break; diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index bf7a039c..505dc6d7 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -136,6 +136,9 @@ static int gp10b_get_litter_value(struct gk20a *g, int value) case GPU_LIT_NUM_TPC_PER_GPC: ret = proj_scal_litter_num_tpc_per_gpc_v(); break; + case GPU_LIT_NUM_SM_PER_TPC: + ret = proj_scal_litter_num_sm_per_tpc_v(); + break; case GPU_LIT_NUM_FBPS: ret = proj_scal_litter_num_fbps_v(); break; diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_proj_gm20b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_proj_gm20b.h index 026c7848..eeab2a9a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_proj_gm20b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_proj_gm20b.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -122,6 +122,10 @@ static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void) { return 0x00000002; } +static inline u32 proj_scal_litter_num_sm_per_tpc_v(void) +{ + return 0x00000001; +} static inline u32 proj_scal_litter_num_fbps_v(void) { return 0x00000001; diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_proj_gp106.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_proj_gp106.h index 8042bcae..dc56d7c9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_proj_gp106.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_proj_gp106.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -130,6 +130,10 @@ static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void) { return 0x00000005; } +static inline u32 proj_scal_litter_num_sm_per_tpc_v(void) +{ + return 0x00000001; +} static inline u32 proj_scal_litter_num_fbps_v(void) { return 0x00000006; diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_proj_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_proj_gp10b.h index 3392242c..4f398b69 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_proj_gp10b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_proj_gp10b.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -130,6 +130,10 @@ static inline u32 proj_scal_litter_num_tpc_per_gpc_v(void) { return 0x00000002; } +static inline u32 proj_scal_litter_num_sm_per_tpc_v(void) +{ + return 0x00000001; +} static inline u32 proj_scal_litter_num_fbps_v(void) { return 0x00000001; -- cgit v1.2.2