summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c3
-rw-r--r--include/uapi/linux/nvgpu.h14
2 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 8a1df1cc..df57ec7c 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -2056,6 +2056,9 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
2056 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS; 2056 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS;
2057 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_TSG; 2057 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_TSG;
2058 2058
2059 if (g->ops.clk_arb.get_arbiter_clk_domains)
2060 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CLOCK_CONTROLS;
2061
2059 gpu->gpc_mask = (1 << g->gr.gpc_count)-1; 2062 gpu->gpc_mask = (1 << g->gr.gpc_count)-1;
2060 2063
2061 g->ops.gr.detect_sm_arch(g); 2064 g->ops.gr.detect_sm_arch(g);
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index 49e3fc5c..13492e0d 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -116,6 +116,16 @@ struct nvgpu_gpu_zbc_query_table_args {
116#define NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS (1ULL << 7) 116#define NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS (1ULL << 7)
117/* Both gpu driver and device support TSG */ 117/* Both gpu driver and device support TSG */
118#define NVGPU_GPU_FLAGS_SUPPORT_TSG (1ULL << 8) 118#define NVGPU_GPU_FLAGS_SUPPORT_TSG (1ULL << 8)
119/* Clock control support */
120#define NVGPU_GPU_FLAGS_SUPPORT_CLOCK_CONTROLS (1ULL << 9)
121/* NVGPU_GPU_IOCTL_GET_VOLTAGE is available */
122#define NVGPU_GPU_FLAGS_SUPPORT_GET_VOLTAGE (1ULL << 10)
123/* NVGPU_GPU_IOCTL_GET_CURRENT is available */
124#define NVGPU_GPU_FLAGS_SUPPORT_GET_CURRENT (1ULL << 11)
125/* NVGPU_GPU_IOCTL_GET_POWER is available */
126#define NVGPU_GPU_FLAGS_SUPPORT_GET_POWER (1ULL << 12)
127/* NVGPU_GPU_IOCTL_GET_TEMPERATURE is available */
128#define NVGPU_GPU_FLAGS_SUPPORT_GET_TEMPERATURE (1ULL << 13)
119 129
120struct nvgpu_gpu_characteristics { 130struct nvgpu_gpu_characteristics {
121 __u32 arch; 131 __u32 arch;
@@ -671,7 +681,7 @@ struct nvgpu_gpu_clk_set_info_args {
671 this file descriptor to determine when the request has completed. 681 this file descriptor to determine when the request has completed.
672 The fd must be closed afterwards. 682 The fd must be closed afterwards.
673 */ 683 */
674 int completion_fd; 684 __s32 completion_fd;
675}; 685};
676 686
677struct nvgpu_gpu_clk_get_event_fd_args { 687struct nvgpu_gpu_clk_get_event_fd_args {
@@ -680,7 +690,7 @@ struct nvgpu_gpu_clk_get_event_fd_args {
680 __u32 flags; 690 __u32 flags;
681 691
682 /* out: File descriptor for events, i.e. any clock update. */ 692 /* out: File descriptor for events, i.e. any clock update. */
683 int event_fd; 693 __s32 event_fd;
684}; 694};
685 695
686struct nvgpu_gpu_get_memory_state_args { 696struct nvgpu_gpu_get_memory_state_args {