diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 738df2af..660fbb6f 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A memory management | 2 | * GK20A memory management |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -1290,12 +1290,6 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
1290 | int ctag_granularity = g->ops.fb.compression_page_size(g); | 1290 | int ctag_granularity = g->ops.fb.compression_page_size(g); |
1291 | u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity); | 1291 | u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity); |
1292 | 1292 | ||
1293 | if (clear_ctags && ctag_offset) { | ||
1294 | /* init/clear the ctag buffer */ | ||
1295 | g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, | ||
1296 | ctag_offset, ctag_offset + ctag_lines - 1); | ||
1297 | } | ||
1298 | |||
1299 | /* Allocate (or validate when map_offset != 0) the virtual address. */ | 1293 | /* Allocate (or validate when map_offset != 0) the virtual address. */ |
1300 | if (!map_offset) { | 1294 | if (!map_offset) { |
1301 | map_offset = gk20a_vm_alloc_va(vm, size, | 1295 | map_offset = gk20a_vm_alloc_va(vm, size, |
@@ -1651,17 +1645,14 @@ u64 gk20a_vm_map(struct vm_gk20a *vm, | |||
1651 | bfr.kind_v = bfr.uc_kind_v; | 1645 | bfr.kind_v = bfr.uc_kind_v; |
1652 | } else { | 1646 | } else { |
1653 | gk20a_get_comptags(d, dmabuf, &comptags); | 1647 | gk20a_get_comptags(d, dmabuf, &comptags); |
1654 | clear_ctags = true; | ||
1655 | |||
1656 | if (comptags.lines < comptags.allocated_lines) { | ||
1657 | /* clear tail-padding comptags */ | ||
1658 | u32 ctagmin = comptags.offset + comptags.lines; | ||
1659 | u32 ctagmax = comptags.offset + | ||
1660 | comptags.allocated_lines - 1; | ||
1661 | 1648 | ||
1649 | if (g->ops.ltc.cbc_ctrl) | ||
1662 | g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, | 1650 | g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, |
1663 | ctagmin, ctagmax); | 1651 | comptags.offset, |
1664 | } | 1652 | comptags.offset + |
1653 | comptags.allocated_lines - 1); | ||
1654 | else | ||
1655 | clear_ctags = true; | ||
1665 | } | 1656 | } |
1666 | } | 1657 | } |
1667 | 1658 | ||