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
This commit is contained in:
Terje Bergstrom
2015-03-31 13:20:51 -07:00
committed by Alexander Van Brunt
parent d47b01d74f
commit 5486503343

View File

@@ -1378,6 +1378,11 @@ u64 gk20a_vm_map(struct vm_gk20a *vm,
gk20a_get_comptags(d, dmabuf, &comptags);
/* ensure alignment to compression page size if compression enabled */
if (bfr.ctag_offset)
mapping_size = ALIGN(mapping_size,
g->ops.fb.compression_page_size(g));
if (bfr.ctag_lines && !comptags.lines) {
/* allocate compression resources if needed */
err = gk20a_alloc_comptags(d, dmabuf, ctag_allocator,