diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 8acc5b45..9e19fa53 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Graphics | 2 | * GK20A Graphics |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -1684,33 +1684,13 @@ static int gr_gk20a_init_ctxsw_ucode_vaspace(struct gk20a *g) | |||
1684 | struct vm_gk20a *vm = &mm->pmu.vm; | 1684 | struct vm_gk20a *vm = &mm->pmu.vm; |
1685 | struct device *d = dev_from_gk20a(g); | 1685 | struct device *d = dev_from_gk20a(g); |
1686 | struct gk20a_ctxsw_ucode_info *ucode_info = &g->ctxsw_ucode_info; | 1686 | struct gk20a_ctxsw_ucode_info *ucode_info = &g->ctxsw_ucode_info; |
1687 | void *inst_ptr; | ||
1688 | u32 pde_addr_lo; | ||
1689 | u32 pde_addr_hi; | ||
1690 | u64 pde_addr; | ||
1691 | int err; | 1687 | int err; |
1692 | 1688 | ||
1693 | err = gk20a_alloc_inst_block(g, &ucode_info->inst_blk_desc); | 1689 | err = gk20a_alloc_inst_block(g, &ucode_info->inst_blk_desc); |
1694 | if (err) | 1690 | if (err) |
1695 | return err; | 1691 | return err; |
1696 | 1692 | ||
1697 | inst_ptr = ucode_info->inst_blk_desc.cpuva; | 1693 | gk20a_init_inst_block(&ucode_info->inst_blk_desc, vm, 0); |
1698 | |||
1699 | /* Set inst block */ | ||
1700 | gk20a_mem_wr32(inst_ptr, ram_in_adr_limit_lo_w(), | ||
1701 | u64_lo32(vm->va_limit) | 0xFFF); | ||
1702 | gk20a_mem_wr32(inst_ptr, ram_in_adr_limit_hi_w(), | ||
1703 | ram_in_adr_limit_hi_f(u64_hi32(vm->va_limit))); | ||
1704 | |||
1705 | pde_addr = gk20a_mm_iova_addr(g, vm->pdes.sgt->sgl); | ||
1706 | pde_addr_lo = u64_lo32(pde_addr >> 12); | ||
1707 | pde_addr_hi = u64_hi32(pde_addr); | ||
1708 | gk20a_mem_wr32(inst_ptr, ram_in_page_dir_base_lo_w(), | ||
1709 | ram_in_page_dir_base_target_vid_mem_f() | | ||
1710 | ram_in_page_dir_base_vol_true_f() | | ||
1711 | ram_in_page_dir_base_lo_f(pde_addr_lo)); | ||
1712 | gk20a_mem_wr32(inst_ptr, ram_in_page_dir_base_hi_w(), | ||
1713 | ram_in_page_dir_base_hi_f(pde_addr_hi)); | ||
1714 | 1694 | ||
1715 | /* Map ucode surface to GMMU */ | 1695 | /* Map ucode surface to GMMU */ |
1716 | ucode_info->ucode_gpuva = gk20a_gmmu_map(vm, | 1696 | ucode_info->ucode_gpuva = gk20a_gmmu_map(vm, |