Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux/vm.c
scottl 456a814db5 gpu: nvgpu: add linux MAPPING_MODIFY ioctl
Add new MAPPING_MODIFY ioctl to the linux nvgpu driver.

This ioctl is used (for example) by the NvRmGpuMappingModify API to
change the kind of an existing mapping.

For compressed mappings the ioctl can be used to do the following:

 * switch between two different compressed kinds
 * switch between compressed and incompressed kinds

For incompressed mappings the ioctl can be used to do the following:

 * switch between two different incompressed kinds

In order to properly update an existing mapping the nvgpu_mapped_buf
structure has been extended to cache the following state when the
mapping is first created:

 * the compression tag offset (if applicable)
 * the GMMU read/write flags
 * the memory aperture

The unused ctag_lines field in the nvgpu_ctag_buffer_info structure
has been replaced with a new ctag_offset field.

Jira NVGPU-6374

Change-Id: I647ab9c2c272e3f9b52f1ccefc5e0de4577c14f1
Signed-off-by: scottl <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2468100
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-01-28 17:27:31 -08:00

12 KiB