From 870e76fbc7076a41e711ad9d5569a74373a4697a Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 7 Nov 2017 10:08:16 -0800 Subject: gpu: nvgpu: Move sm_arch to nvgpu_gpu_params Move sm_arch_* fields to nvgpu_gpu_params to make them available from common code without accessing Linux specific GPU characteristics. JIRA NVGPU-259 Change-Id: Ieffb2ddde81b27af53dfedb9fe3972d20757cc35 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1593686 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b') diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index afe60b98..61f608f4 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c @@ -841,11 +841,11 @@ void gr_gm20b_detect_sm_arch(struct gk20a *g) { u32 v = gk20a_readl(g, gr_gpc0_tpc0_sm_arch_r()); - g->gpu_characteristics.sm_arch_spa_version = + g->params.sm_arch_spa_version = gr_gpc0_tpc0_sm_arch_spa_version_v(v); - g->gpu_characteristics.sm_arch_sm_version = + g->params.sm_arch_sm_version = gr_gpc0_tpc0_sm_arch_sm_version_v(v); - g->gpu_characteristics.sm_arch_warp_count = + g->params.sm_arch_warp_count = gr_gpc0_tpc0_sm_arch_warp_count_v(v); } @@ -1154,7 +1154,7 @@ void gr_gm20b_bpt_reg_info(struct gk20a *g, struct nvgpu_warpstate *w_state) /* for maxwell & kepler */ u32 numSmPerTpc = 1; - u32 numWarpPerTpc = g->gpu_characteristics.sm_arch_warp_count * numSmPerTpc; + u32 numWarpPerTpc = g->params.sm_arch_warp_count * numSmPerTpc; for (sm_id = 0; sm_id < gr->no_of_sm; sm_id++) { gpc = g->gr.sm_to_cluster[sm_id].gpc_index; -- cgit v1.2.2