gpu: nvgpu: add clocks control capability

Add NVGPU_GPU_FLAGS_SUPPORT_CLOCK_CONTROLS bit to allow user library
to determine if GPU supports clock control ioctls.

Jira DNVGPU-125

Change-Id: Ia09808ed36aa85a7c520039bb336888e2b467076
Signed-off-by: David Martine Nieto <dmartineznie@nvidia.com>
Reviewed-on: http://git-master/r/1239379
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1267154
Reviewed-by: Automatic_Commit_Validation_User
This commit is contained in:
Thomas Fleury
2016-10-14 10:41:07 -07:00
committed by mobile promotions
parent a4731b3282
commit 8cfcf181f1
2 changed files with 15 additions and 2 deletions

View File

@@ -116,6 +116,16 @@ struct nvgpu_gpu_zbc_query_table_args {
#define NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS (1ULL << 7)
/* Both gpu driver and device support TSG */
#define NVGPU_GPU_FLAGS_SUPPORT_TSG (1ULL << 8)
/* Clock control support */
#define NVGPU_GPU_FLAGS_SUPPORT_CLOCK_CONTROLS (1ULL << 9)
/* NVGPU_GPU_IOCTL_GET_VOLTAGE is available */
#define NVGPU_GPU_FLAGS_SUPPORT_GET_VOLTAGE (1ULL << 10)
/* NVGPU_GPU_IOCTL_GET_CURRENT is available */
#define NVGPU_GPU_FLAGS_SUPPORT_GET_CURRENT (1ULL << 11)
/* NVGPU_GPU_IOCTL_GET_POWER is available */
#define NVGPU_GPU_FLAGS_SUPPORT_GET_POWER (1ULL << 12)
/* NVGPU_GPU_IOCTL_GET_TEMPERATURE is available */
#define NVGPU_GPU_FLAGS_SUPPORT_GET_TEMPERATURE (1ULL << 13)
struct nvgpu_gpu_characteristics {
__u32 arch;
@@ -671,7 +681,7 @@ struct nvgpu_gpu_clk_set_info_args {
this file descriptor to determine when the request has completed.
The fd must be closed afterwards.
*/
int completion_fd;
__s32 completion_fd;
};
struct nvgpu_gpu_clk_get_event_fd_args {
@@ -680,7 +690,7 @@ struct nvgpu_gpu_clk_get_event_fd_args {
__u32 flags;
/* out: File descriptor for events, i.e. any clock update. */
int event_fd;
__s32 event_fd;
};
struct nvgpu_gpu_get_memory_state_args {