From 3d313d06570dcb28bba73247a2c0fc52bec56af0 Mon Sep 17 00:00:00 2001 From: Mayank Kaushik Date: Wed, 17 Sep 2014 18:11:45 -0700 Subject: gpu: nvgpu: gm20b: halify tpc lookup Since the number of TPCs is different between GM20B and GK20a, the function to look up the number of TPCs needs to be halified. Change-Id: I19dab9a7105814f86c08c92283a0bb70abb6aa00 Signed-off-by: Mayank Kaushik Reviewed-on: http://git-master/r/500064 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h index 9e1a1cb8..0f70e8aa 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h @@ -1,7 +1,7 @@ /* * GK20A Graphics Context Pri Register Addressing * - * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014, 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, @@ -85,26 +85,6 @@ static inline bool pri_is_tpc_addr_shared(u32 addr) (addr < (proj_tpc_in_gpc_shared_base_v() + proj_tpc_in_gpc_stride_v())); } -static inline bool pri_is_tpc_addr(u32 addr) -{ - return ((addr >= proj_tpc_in_gpc_base_v()) && - (addr < proj_tpc_in_gpc_base_v() + (proj_scal_litter_num_tpc_per_gpc_v() * - proj_tpc_in_gpc_stride_v()))) - || - pri_is_tpc_addr_shared(addr); -} -static inline u32 pri_get_tpc_num(u32 addr) -{ - u32 i, start; - u32 num_tpcs = proj_scal_litter_num_tpc_per_gpc_v(); - - for (i = 0; i < num_tpcs; i++) { - start = proj_tpc_in_gpc_base_v() + (i * proj_tpc_in_gpc_stride_v()); - if ((addr >= start) && (addr < (start + proj_tpc_in_gpc_stride_v()))) - return i; - } - return 0; -} /* * BE pri addressing -- cgit v1.2.2