diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2017-11-30 14:42:22 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-12-01 12:55:37 -0500 |
commit | 18268185ec12f27cc1da76edb54ac133dab06aef (patch) | |
tree | 8e2b2a1c1a28084bb61b93b76485a5420298f37f /drivers/gpu/nvgpu/common/mm | |
parent | 823ae76b1bc7e82c1532c9298c57f644b4791535 (diff) |
gpu: nvgpu: Increase programmed ctagline at compr page boundaries
Increase the ctagline that is programmed in the page tables when the
buffer offset crosses the compression page boundaries. This fixes
compressible-kind fixed-address mapping with 4k pages when the GPU VA
is not aligned by the compression page size.
Bug 1995897
Bug 2011640
Bug 2011668
Change-Id: I1f1f9750635a20a916527c9d18fda7f8aa6b1b1f
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1608465
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 8d78212b..62c84e96 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c | |||
@@ -691,6 +691,14 @@ u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, | |||
691 | .aperture = aperture | 691 | .aperture = aperture |
692 | }; | 692 | }; |
693 | 693 | ||
694 | /* | ||
695 | * We need to add the buffer_offset within compression_page_size so that | ||
696 | * the programmed ctagline gets increased at compression_page_size | ||
697 | * boundaries. | ||
698 | */ | ||
699 | if (attrs.ctag) | ||
700 | attrs.ctag += buffer_offset & (ctag_granularity - 1U); | ||
701 | |||
694 | #ifdef CONFIG_TEGRA_19x_GPU | 702 | #ifdef CONFIG_TEGRA_19x_GPU |
695 | nvgpu_gmmu_add_t19x_attrs(&attrs, flags); | 703 | nvgpu_gmmu_add_t19x_attrs(&attrs, flags); |
696 | #endif | 704 | #endif |