Files
linux-nvgpu/drivers/gpu
Vedashree Vidwans bc2ee54301 gpu: nvgpu: Add check for invalid nvgpu_aperture
Currently, in nvgpu_aperture_mask_raw function, if NVGPU_MM_HONORS_APERTURE
flag is disabled, invalid or junk aperture input is changed to APERTURE_VIDMEM
instead of raising a warning.To resolve this bug, need to check if input
aperture is APERTURE_INVALID or undefined.

This patch adds APERTURE_MAX_ENUM to nvgpu_aperture structure which
gives upperbound of nvgpu_aperture types. This patch also adds condition in
nvgpu_aperture_mask_raw function to check for invalid or undefined aperture
input. For invalid inputs, function will BUG().

Jira NVGPU-2933

Change-Id: Ic9d260250e3083d693f025c6e32657f6a863aafb
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2034281
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-03-12 11:46:03 -07:00
..
2017-10-29 11:00:55 -07:00