From d29c3a2403ec3fa40d6ec2a6ec09c123740242db Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 6 Oct 2015 09:55:10 -0700 Subject: gpu: nvgpu: Report all mapping calls Add dbg_map debug spew for all mapping calls. This plugs the hole where kernel mappings were not logged, because the debug log is added only in ioctl path. Change-Id: I036bf41f92ba5b612d32805020ca7a16fe54f9f4 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/812288 (cherry picked from commit c37b2892d6d967ad48076b20e5a9ef97dc600b31) Reviewed-on: http://git-master/r/831333 --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 7876af63..1bc35597 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -1198,10 +1198,9 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, struct device *d = dev_from_vm(vm); struct gk20a *g = gk20a_from_vm(vm); int ctag_granularity = g->ops.fb.compression_page_size(g); + u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity); if (clear_ctags && ctag_offset) { - u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity); - /* init/clear the ctag buffer */ g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, ctag_offset, ctag_offset + ctag_lines - 1); @@ -1219,6 +1218,19 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, allocated = true; } + gk20a_dbg(gpu_dbg_map, + "as=%d pgsz=%d " + "kind=0x%x flags=0x%x " + "ctags=%d start=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x", + vm_aspace_id(vm), pgsz_idx, + kind_v, flags, + ctag_lines, ctag_offset, + hi32(map_offset), lo32(map_offset), + hi32((u64)sg_dma_address(sgt->sgl)), + lo32((u64)sg_dma_address(sgt->sgl)), + hi32((u64)sg_phys(sgt->sgl)), + lo32((u64)sg_phys(sgt->sgl))); + err = update_gmmu_ptes_locked(vm, pgsz_idx, sgt, buffer_offset, -- cgit v1.2.2