summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-03-31 16:20:51 -0400
committerAlexander Van Brunt <avanbrunt@nvidia.com>2015-05-05 16:55:49 -0400
commit5486503343ca9db24d7ce4acd4f7cf22e1f515f2 (patch)
treeea8485a2ac5f277663e9abffab5da5de35891ec7 /drivers/gpu/nvgpu
parentd47b01d74f66ea1f1d68976dc4d602b4e299bd90 (diff)
gpu: nvgpu: Align VA of compressible buffer
Ensure that the GPU VA for a buffer is aligned correctly if compression is enabled. Bug 1605769 Change-Id: I12566ddd554da7cc9fb41dd553576c534ac96ba8 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/725767 Reviewed-on: http://git-master/r/737529 Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> Tested-by: Alexander Van Brunt <avanbrunt@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 45f6fd64..fa84337b 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -1378,6 +1378,11 @@ u64 gk20a_vm_map(struct vm_gk20a *vm,
1378 1378
1379 gk20a_get_comptags(d, dmabuf, &comptags); 1379 gk20a_get_comptags(d, dmabuf, &comptags);
1380 1380
1381 /* ensure alignment to compression page size if compression enabled */
1382 if (bfr.ctag_offset)
1383 mapping_size = ALIGN(mapping_size,
1384 g->ops.fb.compression_page_size(g));
1385
1381 if (bfr.ctag_lines && !comptags.lines) { 1386 if (bfr.ctag_lines && !comptags.lines) {
1382 /* allocate compression resources if needed */ 1387 /* allocate compression resources if needed */
1383 err = gk20a_alloc_comptags(d, dmabuf, ctag_allocator, 1388 err = gk20a_alloc_comptags(d, dmabuf, ctag_allocator,