From 652da8116966af2a8438a9a9f135a11b4e5c6c7b Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 20 Jul 2018 11:12:19 -0700 Subject: gpu: nvgpu: Force the PMU VM to use 128K large pages (gm20b) Add a WAR for gm20b that allows us to force the PMU VM to use 128K large pages. For some reason setting the small page size to 64K breaks the PMU boot. Unclear why. Bug needs to be filed and fixed. Once fixed this patch can and should be reverted. Bug 200105199 Change-Id: I2b4c9e214e2a6dff33bea18bd2359c33364ba03f Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1782769 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/mm.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/common/mm/mm.c') diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c index 0608d66a..2e46e211 100644 --- a/drivers/gpu/nvgpu/common/mm/mm.c +++ b/drivers/gpu/nvgpu/common/mm/mm.c @@ -202,13 +202,21 @@ static int nvgpu_init_system_vm(struct mm_gk20a *mm) struct gk20a *g = gk20a_from_mm(mm); struct nvgpu_mem *inst_block = &mm->pmu.inst_block; u32 big_page_size = g->ops.mm.get_default_big_page_size(); - u32 low_hole, aperture_size; + u64 low_hole, aperture_size; + + /* + * For some reason the maxwell PMU code is dependent on the large page + * size. No reason AFAICT for this. Probably a bug somewhere. + */ + if (nvgpu_is_enabled(g, NVGPU_MM_FORCE_128K_PMU_VM)) { + big_page_size = SZ_128K; + } /* * No user region - so we will pass that as zero sized. */ - low_hole = SZ_4K * 16; - aperture_size = GK20A_PMU_VA_SIZE * 2; + low_hole = SZ_4K * 16UL; + aperture_size = GK20A_PMU_VA_SIZE; mm->pmu.aperture_size = GK20A_PMU_VA_SIZE; nvgpu_log_info(g, "pmu vm size = 0x%x", mm->pmu.aperture_size); -- cgit v1.2.2