mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Clear comptags for whole buffer
Clear comptags for whole buffer when nvgpu sees the buffer for the first time. Change-Id: I67108ce0f0def46ddda1aa9b9bb5ea22549cce13 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1013517 (cherry picked from commit 544446aacdc695dc2e27c42a0086292cd69c2eee) Reviewed-on: http://git-master/r/1031009 GVS: Gerrit_Virtual_Submit
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* GK20A memory management
|
||||
*
|
||||
* Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -1290,12 +1290,6 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,
|
||||
int ctag_granularity = g->ops.fb.compression_page_size(g);
|
||||
u32 ctag_lines = DIV_ROUND_UP_ULL(size, ctag_granularity);
|
||||
|
||||
if (clear_ctags && ctag_offset) {
|
||||
/* init/clear the ctag buffer */
|
||||
g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear,
|
||||
ctag_offset, ctag_offset + ctag_lines - 1);
|
||||
}
|
||||
|
||||
/* Allocate (or validate when map_offset != 0) the virtual address. */
|
||||
if (!map_offset) {
|
||||
map_offset = gk20a_vm_alloc_va(vm, size,
|
||||
@@ -1651,17 +1645,14 @@ u64 gk20a_vm_map(struct vm_gk20a *vm,
|
||||
bfr.kind_v = bfr.uc_kind_v;
|
||||
} else {
|
||||
gk20a_get_comptags(d, dmabuf, &comptags);
|
||||
clear_ctags = true;
|
||||
|
||||
if (comptags.lines < comptags.allocated_lines) {
|
||||
/* clear tail-padding comptags */
|
||||
u32 ctagmin = comptags.offset + comptags.lines;
|
||||
u32 ctagmax = comptags.offset +
|
||||
comptags.allocated_lines - 1;
|
||||
|
||||
if (g->ops.ltc.cbc_ctrl)
|
||||
g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear,
|
||||
ctagmin, ctagmax);
|
||||
}
|
||||
comptags.offset,
|
||||
comptags.offset +
|
||||
comptags.allocated_lines - 1);
|
||||
else
|
||||
clear_ctags = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user