diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index 73a8131da..f9ad8082a 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c @@ -129,6 +129,8 @@ struct nvgpu_flags_mapping { }; static struct nvgpu_flags_mapping flags_mapping[] = { + {NVGPU_GPU_FLAGS_CAN_RAILGATE, + NVGPU_CAN_RAILGATE}, {NVGPU_GPU_FLAGS_HAS_SYNCPOINTS, NVGPU_HAS_SYNCPOINTS}, {NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS, diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 65e8427e3..b85ca7b63 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -162,6 +162,8 @@ struct nvgpu_gpu_zbc_query_table_args { #define NVGPU_GPU_FLAGS_SUPPORT_VPR (1ULL << 27) /* Allocating per-channel syncpoint in user space is supported */ #define NVGPU_GPU_FLAGS_SUPPORT_USER_SYNCPOINT (1ULL << 28) +/* Railgating (powering the GPU off completely) is supported and enabled */ +#define NVGPU_GPU_FLAGS_CAN_RAILGATE (1ULL << 29) /* SM LRF ECC is enabled */ #define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_LRF (1ULL << 60) /* SM SHM ECC is enabled */