From e1161fe0e423d159ba7d5953d9be959ee96b4371 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 27 Jun 2018 13:50:42 +0530 Subject: gpu: nvgpu: fix active fbpa mask calculation In gr_gv100_get_active_fpba_mask(), we currently use num_fbpas passed by the caller which is usually litter (max possible on h/w) value We should instead read the number of FBPAs from h/w instead of reading litter value Jira NVGPUT-117 Change-Id: I6ecd4db0fd939e1dfebf31d27e0022ae02809399 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1762721 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_top_gv100.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_top_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_top_gv100.h index ff9c046c..506a8181 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_top_gv100.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_top_gv100.h @@ -80,6 +80,14 @@ static inline u32 top_num_fbps_value_v(u32 r) { return (r >> 0U) & 0x1fU; } +static inline u32 top_num_fbpas_r(void) +{ + return 0x0002243cU; +} +static inline u32 top_num_fbpas_value_v(u32 r) +{ + return (r >> 0U) & 0x1fU; +} static inline u32 top_ltc_per_fbp_r(void) { return 0x00022450U; -- cgit v1.2.2