diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 16 |
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, |