diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ltc_common.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 85 |
4 files changed, 37 insertions, 53 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index ce211449..06106b91 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -803,7 +803,7 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) | |||
803 | goto clean_up; | 803 | goto clean_up; |
804 | } | 804 | } |
805 | 805 | ||
806 | gk20a_dbg(gpu_dbg_map, "userd bar1 va = 0x%llx", f->userd.gpu_va); | 806 | gk20a_dbg(gpu_dbg_map_v, "userd bar1 va = 0x%llx", f->userd.gpu_va); |
807 | 807 | ||
808 | f->channel = vzalloc(f->num_channels * sizeof(*f->channel)); | 808 | f->channel = vzalloc(f->num_channels * sizeof(*f->channel)); |
809 | f->tsg = vzalloc(f->num_channels * sizeof(*f->tsg)); | 809 | f->tsg = vzalloc(f->num_channels * sizeof(*f->tsg)); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 2b348677..77a84e59 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -952,6 +952,7 @@ enum gk20a_dbg_categories { | |||
952 | gpu_dbg_cde_ctx = BIT(11), /* cde context usage messages */ | 952 | gpu_dbg_cde_ctx = BIT(11), /* cde context usage messages */ |
953 | gpu_dbg_ctxsw = BIT(12), /* ctxsw tracing */ | 953 | gpu_dbg_ctxsw = BIT(12), /* ctxsw tracing */ |
954 | gpu_dbg_sched = BIT(13), /* sched control tracing */ | 954 | gpu_dbg_sched = BIT(13), /* sched control tracing */ |
955 | gpu_dbg_map_v = BIT(14), /* verbose mem mappings */ | ||
955 | gpu_dbg_mem = BIT(31), /* memory accesses, very verbose */ | 956 | gpu_dbg_mem = BIT(31), /* memory accesses, very verbose */ |
956 | }; | 957 | }; |
957 | 958 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_common.c b/drivers/gpu/nvgpu/gk20a/ltc_common.c index 5795fe91..e1c23f79 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_common.c +++ b/drivers/gpu/nvgpu/gk20a/ltc_common.c | |||
@@ -120,7 +120,7 @@ static void gk20a_ltc_init_cbc(struct gk20a *g, struct gr_gk20a *gr) | |||
120 | gk20a_writel(g, ltc_ltcs_ltss_cbc_base_r(), | 120 | gk20a_writel(g, ltc_ltcs_ltss_cbc_base_r(), |
121 | compbit_base_post_divide); | 121 | compbit_base_post_divide); |
122 | 122 | ||
123 | gk20a_dbg(gpu_dbg_info | gpu_dbg_map | gpu_dbg_pte, | 123 | gk20a_dbg(gpu_dbg_info | gpu_dbg_map_v | gpu_dbg_pte, |
124 | "compbit base.pa: 0x%x,%08x cbc_base:0x%08x\n", | 124 | "compbit base.pa: 0x%x,%08x cbc_base:0x%08x\n", |
125 | (u32)(compbit_store_iova >> 32), | 125 | (u32)(compbit_store_iova >> 32), |
126 | (u32)(compbit_store_iova & 0xffffffff), | 126 | (u32)(compbit_store_iova & 0xffffffff), |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index cab10902..7ace85d7 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -1685,20 +1685,18 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
1685 | } | 1685 | } |
1686 | 1686 | ||
1687 | gk20a_dbg(gpu_dbg_map, | 1687 | gk20a_dbg(gpu_dbg_map, |
1688 | "as=%d pgsz=%d " | 1688 | "gv: 0x%04x_%08x + 0x%-7llx " |
1689 | "kind=0x%x flags=0x%x " | 1689 | "[dma: 0x%02x_%08x, pa: 0x%02x_%08x] " |
1690 | "ctags=%d start=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x + %llx size=%lld aperture=%s", | 1690 | "pgsz=%-3dKb as=%-2d ctags=%d start=%d " |
1691 | vm_aspace_id(vm), pgsz_idx, | 1691 | "kind=0x%x flags=0x%x apt=%s", |
1692 | kind_v, flags, | 1692 | hi32(map_offset), lo32(map_offset), size, |
1693 | ctag_lines, ctag_offset, | 1693 | sgt ? hi32((u64)sg_dma_address(sgt->sgl)) : 0, |
1694 | hi32(map_offset), lo32(map_offset), | 1694 | sgt ? lo32((u64)sg_dma_address(sgt->sgl)) : 0, |
1695 | hi32((u64)sg_dma_address(sgt->sgl)), | 1695 | sgt ? hi32((u64)sg_phys(sgt->sgl)) : 0, |
1696 | lo32((u64)sg_dma_address(sgt->sgl)), | 1696 | sgt ? lo32((u64)sg_phys(sgt->sgl)) : 0, |
1697 | hi32((u64)sg_phys(sgt->sgl)), | 1697 | vm->gmmu_page_sizes[pgsz_idx] >> 10, vm_aspace_id(vm), |
1698 | lo32((u64)sg_phys(sgt->sgl)), | 1698 | ctag_lines, ctag_offset, |
1699 | buffer_offset, | 1699 | kind_v, flags, gk20a_aperture_str(aperture)); |
1700 | size, | ||
1701 | gk20a_aperture_str(aperture)); | ||
1702 | 1700 | ||
1703 | err = update_gmmu_ptes_locked(vm, pgsz_idx, | 1701 | err = update_gmmu_ptes_locked(vm, pgsz_idx, |
1704 | sgt, | 1702 | sgt, |
@@ -1857,21 +1855,21 @@ static u64 gk20a_vm_map_duplicate_locked(struct vm_gk20a *vm, | |||
1857 | kref_get(&mapped_buffer->ref); | 1855 | kref_get(&mapped_buffer->ref); |
1858 | 1856 | ||
1859 | gk20a_dbg(gpu_dbg_map, | 1857 | gk20a_dbg(gpu_dbg_map, |
1860 | "reusing as=%d pgsz=%d flags=0x%x ctags=%d " | 1858 | "gv: 0x%04x_%08x + 0x%-7zu " |
1861 | "start=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x " | 1859 | "[dma: 0x%02x_%08x, pa: 0x%02x_%08x] " |
1862 | "own_mem_ref=%d user_mapped=%d size=%zu aperture=%s", | 1860 | "pgsz=%-3dKb as=%-2d ctags=%d start=%d " |
1863 | vm_aspace_id(vm), mapped_buffer->pgsz_idx, | 1861 | "flags=0x%x apt=%s (reused)", |
1864 | mapped_buffer->flags, | 1862 | hi32(mapped_buffer->addr), lo32(mapped_buffer->addr), |
1865 | mapped_buffer->ctag_lines, | 1863 | dmabuf->size, |
1866 | mapped_buffer->ctag_offset, | 1864 | hi32((u64)sg_dma_address(mapped_buffer->sgt->sgl)), |
1867 | hi32(mapped_buffer->addr), lo32(mapped_buffer->addr), | 1865 | lo32((u64)sg_dma_address(mapped_buffer->sgt->sgl)), |
1868 | hi32((u64)sg_dma_address(mapped_buffer->sgt->sgl)), | 1866 | hi32((u64)sg_phys(mapped_buffer->sgt->sgl)), |
1869 | lo32((u64)sg_dma_address(mapped_buffer->sgt->sgl)), | 1867 | lo32((u64)sg_phys(mapped_buffer->sgt->sgl)), |
1870 | hi32((u64)sg_phys(mapped_buffer->sgt->sgl)), | 1868 | vm->gmmu_page_sizes[mapped_buffer->pgsz_idx] >> 10, |
1871 | lo32((u64)sg_phys(mapped_buffer->sgt->sgl)), | 1869 | vm_aspace_id(vm), |
1872 | mapped_buffer->own_mem_ref, user_mapped, | 1870 | mapped_buffer->ctag_lines, mapped_buffer->ctag_offset, |
1873 | dmabuf->size, | 1871 | mapped_buffer->flags, |
1874 | gk20a_aperture_str(gk20a_dmabuf_aperture(g, dmabuf))); | 1872 | gk20a_aperture_str(gk20a_dmabuf_aperture(g, dmabuf))); |
1875 | 1873 | ||
1876 | if (sgt) | 1874 | if (sgt) |
1877 | *sgt = mapped_buffer->sgt; | 1875 | *sgt = mapped_buffer->sgt; |
@@ -2260,22 +2258,6 @@ u64 gk20a_vm_map(struct vm_gk20a *vm, | |||
2260 | if (!map_offset) | 2258 | if (!map_offset) |
2261 | goto clean_up; | 2259 | goto clean_up; |
2262 | 2260 | ||
2263 | gk20a_dbg(gpu_dbg_map, | ||
2264 | "as=%d pgsz=%d " | ||
2265 | "kind=0x%x kind_uc=0x%x flags=0x%x " | ||
2266 | "ctags=%d start=%d ctags_allocated=%d ctags_mappable=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x size=%lld/%lld aperture=%s", | ||
2267 | vm_aspace_id(vm), gmmu_page_size, | ||
2268 | bfr.kind_v, bfr.uc_kind_v, flags, | ||
2269 | bfr.ctag_lines, bfr.ctag_offset, | ||
2270 | bfr.ctag_allocated_lines, bfr.ctag_user_mappable, | ||
2271 | hi32(map_offset), lo32(map_offset), | ||
2272 | hi32((u64)sg_dma_address(bfr.sgt->sgl)), | ||
2273 | lo32((u64)sg_dma_address(bfr.sgt->sgl)), | ||
2274 | hi32((u64)sg_phys(bfr.sgt->sgl)), | ||
2275 | lo32((u64)sg_phys(bfr.sgt->sgl)), | ||
2276 | bfr.size, mapping_size, | ||
2277 | gk20a_aperture_str(aperture)); | ||
2278 | |||
2279 | #if defined(NVHOST_DEBUG) | 2261 | #if defined(NVHOST_DEBUG) |
2280 | { | 2262 | { |
2281 | int i; | 2263 | int i; |
@@ -3437,7 +3419,7 @@ static int update_gmmu_ptes_locked(struct vm_gk20a *vm, | |||
3437 | } | 3419 | } |
3438 | } | 3420 | } |
3439 | 3421 | ||
3440 | gk20a_dbg(gpu_dbg_map, "size_idx=%d, gpu_va=[%llx,%llx], iova=%llx", | 3422 | gk20a_dbg(gpu_dbg_map_v, "size_idx=%d, gpu_va=[%llx,%llx], iova=%llx", |
3441 | pgsz_idx, gpu_va, gpu_end-1, iova); | 3423 | pgsz_idx, gpu_va, gpu_end-1, iova); |
3442 | err = map_gmmu_pages(g, &vm->pdb); | 3424 | err = map_gmmu_pages(g, &vm->pdb); |
3443 | if (err) { | 3425 | if (err) { |
@@ -3493,11 +3475,12 @@ void gk20a_vm_unmap_locked(struct mapped_buffer_node *mapped_buffer, | |||
3493 | mapped_buffer->va_node->sparse : false, | 3475 | mapped_buffer->va_node->sparse : false, |
3494 | batch); | 3476 | batch); |
3495 | 3477 | ||
3496 | gk20a_dbg(gpu_dbg_map, "as=%d pgsz=%d gv=0x%x,%08x own_mem_ref=%d", | 3478 | gk20a_dbg(gpu_dbg_map, |
3497 | vm_aspace_id(vm), | 3479 | "gv: 0x%04x_%08x pgsz=%-3dKb as=%-2d own_mem_ref=%d", |
3498 | vm->gmmu_page_sizes[mapped_buffer->pgsz_idx], | 3480 | hi32(mapped_buffer->addr), lo32(mapped_buffer->addr), |
3499 | hi32(mapped_buffer->addr), lo32(mapped_buffer->addr), | 3481 | vm->gmmu_page_sizes[mapped_buffer->pgsz_idx] >> 10, |
3500 | mapped_buffer->own_mem_ref); | 3482 | vm_aspace_id(vm), |
3483 | mapped_buffer->own_mem_ref); | ||
3501 | 3484 | ||
3502 | gk20a_mm_unpin(dev_from_vm(vm), mapped_buffer->dmabuf, | 3485 | gk20a_mm_unpin(dev_from_vm(vm), mapped_buffer->dmabuf, |
3503 | mapped_buffer->sgt); | 3486 | mapped_buffer->sgt); |