Files
linux-nvgpu/drivers/gpu/nvgpu/common/linux/vm.c
Sami Kiminki 9f5f029ae2 gpu: nvgpu: Return error code properly from nvgpu_vm_map_linux
The function nvgpu_vm_map_linux() used to return GPU VA on successful
map or 0 when things didn't go smoothly. However, this scheme does not
propagate the actual map error back to the userspace.

So, modify the function a bit: return error and return the GPU VA via
pointer on success.

Bug 1705731

Change-Id: I2174b5fbaf64dcb00f9567dab1c583d6ddfa5d78
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1590961
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-03 11:55:30 -07:00

13 KiB