diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 4bc8d385..6c4637e8 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -1233,7 +1233,7 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
1233 | gk20a_dbg(gpu_dbg_map, | 1233 | gk20a_dbg(gpu_dbg_map, |
1234 | "as=%d pgsz=%d " | 1234 | "as=%d pgsz=%d " |
1235 | "kind=0x%x flags=0x%x " | 1235 | "kind=0x%x flags=0x%x " |
1236 | "ctags=%d start=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x", | 1236 | "ctags=%d start=%d gv=0x%x,%08x -> 0x%x,%08x -> 0x%x,%08x + %llx", |
1237 | vm_aspace_id(vm), pgsz_idx, | 1237 | vm_aspace_id(vm), pgsz_idx, |
1238 | kind_v, flags, | 1238 | kind_v, flags, |
1239 | ctag_lines, ctag_offset, | 1239 | ctag_lines, ctag_offset, |
@@ -1241,7 +1241,8 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
1241 | hi32((u64)sg_dma_address(sgt->sgl)), | 1241 | hi32((u64)sg_dma_address(sgt->sgl)), |
1242 | lo32((u64)sg_dma_address(sgt->sgl)), | 1242 | lo32((u64)sg_dma_address(sgt->sgl)), |
1243 | hi32((u64)sg_phys(sgt->sgl)), | 1243 | hi32((u64)sg_phys(sgt->sgl)), |
1244 | lo32((u64)sg_phys(sgt->sgl))); | 1244 | lo32((u64)sg_phys(sgt->sgl)), |
1245 | buffer_offset); | ||
1245 | 1246 | ||
1246 | err = update_gmmu_ptes_locked(vm, pgsz_idx, | 1247 | err = update_gmmu_ptes_locked(vm, pgsz_idx, |
1247 | sgt, | 1248 | sgt, |
@@ -1421,6 +1422,7 @@ u64 gk20a_vm_map(struct vm_gk20a *vm, | |||
1421 | u64 buf_addr; | 1422 | u64 buf_addr; |
1422 | u64 ctag_map_win_size = 0; | 1423 | u64 ctag_map_win_size = 0; |
1423 | u32 ctag_map_win_ctagline = 0; | 1424 | u32 ctag_map_win_ctagline = 0; |
1425 | u32 ctag_offset; | ||
1424 | struct vm_reserved_va_node *va_node = NULL; | 1426 | struct vm_reserved_va_node *va_node = NULL; |
1425 | 1427 | ||
1426 | if (user_mapped && vm->userspace_managed && | 1428 | if (user_mapped && vm->userspace_managed && |
@@ -1609,6 +1611,15 @@ u64 gk20a_vm_map(struct vm_gk20a *vm, | |||
1609 | bfr.ctag_allocated_lines = comptags.allocated_lines; | 1611 | bfr.ctag_allocated_lines = comptags.allocated_lines; |
1610 | bfr.ctag_user_mappable = comptags.user_mappable; | 1612 | bfr.ctag_user_mappable = comptags.user_mappable; |
1611 | 1613 | ||
1614 | /* | ||
1615 | * Calculate comptag index for this mapping. Differs in | ||
1616 | * case of partial mapping. | ||
1617 | */ | ||
1618 | ctag_offset = comptags.offset; | ||
1619 | if (ctag_offset) | ||
1620 | ctag_offset += buffer_offset / | ||
1621 | g->ops.fb.compression_page_size(g); | ||
1622 | |||
1612 | /* update gmmu ptes */ | 1623 | /* update gmmu ptes */ |
1613 | map_offset = g->ops.mm.gmmu_map(vm, map_offset, | 1624 | map_offset = g->ops.mm.gmmu_map(vm, map_offset, |
1614 | bfr.sgt, | 1625 | bfr.sgt, |
@@ -1616,7 +1627,7 @@ u64 gk20a_vm_map(struct vm_gk20a *vm, | |||
1616 | mapping_size, | 1627 | mapping_size, |
1617 | bfr.pgsz_idx, | 1628 | bfr.pgsz_idx, |
1618 | bfr.kind_v, | 1629 | bfr.kind_v, |
1619 | bfr.ctag_offset, | 1630 | ctag_offset, |
1620 | flags, rw_flag, | 1631 | flags, rw_flag, |
1621 | clear_ctags, | 1632 | clear_ctags, |
1622 | false, | 1633 | false, |