From 26fe0fbc92bca183f4e543d45f5fc074d136eba1 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 26 Jun 2018 17:21:54 +0300 Subject: [PATCH] gpu: nvgpu: expose CAN_RAILGATE in characteristics Bug 200327089 Change-Id: Id7bd2795647f1e29dabe41acb20d0994cdd07958 Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1764267 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 2 ++ include/uapi/linux/nvgpu.h | 2 ++ 2 files changed, 4 insertions(+) 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 */