summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-10-06 12:55:10 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2015-11-12 10:42:40 -0500
commitd29c3a2403ec3fa40d6ec2a6ec09c123740242db (patch)
treebc6f75718cbc722d69d674370f239a40ceb6994b /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parent411c3a9a4f7451a8f6fe3b533bfd77d3f46f7387 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/812288 (cherry picked from commit c37b2892d6d967ad48076b20e5a9ef97dc600b31) Reviewed-on: http://git-master/r/831333
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c16
1 files changed, 14 insertions, 2 deletions
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,
1198 struct device *d = dev_from_vm(vm); 1198 struct device *d = dev_from_vm(vm);
1199 struct gk20a *g = gk20a_from_vm(vm); 1199 struct gk20a *g = gk20a_from_vm(vm);
1200 int ctag_granularity = g->ops.fb.compression_page_size(g); 1200 int ctag_granularity = g->ops.fb.compression_page_size(g);
1201 u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity);
1201 1202
1202 if (clear_ctags && ctag_offset) { 1203 if (clear_ctags && ctag_offset) {
1203 u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity);
1204
1205 /* init/clear the ctag buffer */ 1204 /* init/clear the ctag buffer */
1206 g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, 1205 g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear,
1207 ctag_offset, ctag_offset + ctag_lines - 1); 1206 ctag_offset, ctag_offset + ctag_lines - 1);
@@ -1219,6 +1218,19 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,
1219 allocated = true; 1218 allocated = true;
1220 } 1219 }
1221 1220
1221 gk20a_dbg(gpu_dbg_map,
1222 "as=%d pgsz=%d "
1223 "kind=0x%x flags=0x%x "
1224 "ctags=%d start=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x",
1225 vm_aspace_id(vm), pgsz_idx,
1226 kind_v, flags,
1227 ctag_lines, ctag_offset,
1228 hi32(map_offset), lo32(map_offset),
1229 hi32((u64)sg_dma_address(sgt->sgl)),
1230 lo32((u64)sg_dma_address(sgt->sgl)),
1231 hi32((u64)sg_phys(sgt->sgl)),
1232 lo32((u64)sg_phys(sgt->sgl)));
1233
1222 err = update_gmmu_ptes_locked(vm, pgsz_idx, 1234 err = update_gmmu_ptes_locked(vm, pgsz_idx,
1223 sgt, 1235 sgt,
1224 buffer_offset, 1236 buffer_offset,