summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-04-06 09:08:18 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-10 14:23:11 -0400
commit78151bb6f9cf9f355c57a28df0c7e4cd867c3322 (patch)
treeaa7413d9caae2766ce7f81384336af0556bfe63a /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent19aa748be53787da6abe435ea7043a7827d0fde0 (diff)
gpu: nvgpu: use HAL for chiplet offset
We currently use hard coded values of NV_PERF_PMMGPC_CHIPLET_OFFSET and NV_PMM_FBP_STRIDE which are incorrect for Volta Add new GR HAL get_pmm_per_chiplet_offset() to get correct value per-chip Set gr_gm20b_get_pmm_per_chiplet_offset() for older chips Set gr_gv11b_get_pmm_per_chiplet_offset() for Volta Use HAL instead of hard coded values wherever required Bug 200398811 Jira NVGPU-556 Change-Id: I947e7febd4f84fae740a1bc74f99d72e1df523aa Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1690028 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
index 08ac20e4..262957c5 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GM20B GPC MMU 2 * GM20B GPC MMU
3 * 3 *
4 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -41,6 +41,7 @@
41#include <nvgpu/hw/gm20b/hw_ltc_gm20b.h> 41#include <nvgpu/hw/gm20b/hw_ltc_gm20b.h>
42#include <nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h> 42#include <nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h>
43#include <nvgpu/hw/gm20b/hw_fuse_gm20b.h> 43#include <nvgpu/hw/gm20b/hw_fuse_gm20b.h>
44#include <nvgpu/hw/gm20b/hw_perf_gm20b.h>
44 45
45void gr_gm20b_init_gpc_mmu(struct gk20a *g) 46void gr_gm20b_init_gpc_mmu(struct gk20a *g)
46{ 47{
@@ -1541,3 +1542,8 @@ void gm20a_gr_disable_rd_coalesce(struct gk20a *g)
1541 1542
1542 gk20a_writel(g, gr_gpcs_tpcs_tex_m_dbg2_r(), dbg2_reg); 1543 gk20a_writel(g, gr_gpcs_tpcs_tex_m_dbg2_r(), dbg2_reg);
1543} 1544}
1545
1546u32 gr_gm20b_get_pmm_per_chiplet_offset(void)
1547{
1548 return (perf_pmmsys_extent_v() - perf_pmmsys_base_v() + 1);
1549}