diff options
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index d4582036..2d044db4 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -524,20 +524,24 @@ struct nvgpu_gpu_clk_range { | |||
524 | __u32 max_mhz; | 524 | __u32 max_mhz; |
525 | }; | 525 | }; |
526 | 526 | ||
527 | /* Request on specific clock domains */ | ||
528 | #define NVGPU_GPU_CLK_FLAG_SPECIFIC_DOMAINS (1UL << 0) | ||
529 | |||
527 | struct nvgpu_gpu_clk_range_args { | 530 | struct nvgpu_gpu_clk_range_args { |
528 | 531 | ||
529 | /* Flags (not currently used) */ | 532 | /* Flags. If NVGPU_GPU_CLK_FLAG_SPECIFIC_DOMAINS the request will |
533 | apply only to domains specified in clock entries. In this case | ||
534 | caller must set clock domain in each entry. Otherwise, the | ||
535 | ioctl will return all clock domains. | ||
536 | */ | ||
530 | __u32 flags; | 537 | __u32 flags; |
531 | 538 | ||
532 | /* in/out: max number of entries in clk_range_entries buffer. If zero, | 539 | __u16 pad0; |
533 | NVGPU_GPU_IOCTL_CLK_GET_RANGE will return 0 and max_entries will be | ||
534 | set to the max number of clock domains. If there are more entries | ||
535 | than max_entries, then ioctl will return -EINVAL. | ||
536 | */ | ||
537 | __u16 max_entries; | ||
538 | 540 | ||
539 | /* out: number of nvgpu_gpu_clk_range entries contained in | 541 | /* in/out: Number of entries in clk_range_entries buffer. If zero, |
540 | clk_range_entries */ | 542 | NVGPU_GPU_IOCTL_CLK_GET_RANGE will return 0 and |
543 | num_entries will be set to number of clock domains. | ||
544 | */ | ||
541 | __u16 num_entries; | 545 | __u16 num_entries; |
542 | 546 | ||
543 | /* in: Pointer to clock range entries in the caller's address space. | 547 | /* in: Pointer to clock range entries in the caller's address space. |
@@ -606,14 +610,18 @@ struct nvgpu_gpu_clk_info { | |||
606 | 610 | ||
607 | struct nvgpu_gpu_clk_get_info_args { | 611 | struct nvgpu_gpu_clk_get_info_args { |
608 | 612 | ||
609 | /* in: Flags (not currently used). */ | 613 | /* Flags. If NVGPU_GPU_CLK_FLAG_SPECIFIC_DOMAINS the request will |
614 | apply only to domains specified in clock entries. In this case | ||
615 | caller must set clock domain in each entry. Otherwise, the | ||
616 | ioctl will return all clock domains. | ||
617 | */ | ||
610 | __u32 flags; | 618 | __u32 flags; |
611 | 619 | ||
612 | __u16 pad0; | 620 | __u16 pad0; |
613 | 621 | ||
614 | /* in/out: Number of clock info entries contained in clk_info_entries. | 622 | /* in/out: Number of clock info entries contained in clk_info_entries. |
615 | If zero, NVGPU_GPU_IOCTL_CLK_GET_INFO will return 0 and | 623 | If zero, NVGPU_GPU_IOCTL_CLK_GET_INFO will return 0 and |
616 | max_entries will be set to number of clock domains. Also, | 624 | num_entries will be set to number of clock domains. Also, |
617 | last_req_nr will be updated, which allows checking if a given | 625 | last_req_nr will be updated, which allows checking if a given |
618 | request has completed. If there are more entries than max_entries, | 626 | request has completed. If there are more entries than max_entries, |
619 | then ioctl will return -EINVAL. | 627 | then ioctl will return -EINVAL. |
@@ -623,8 +631,9 @@ struct nvgpu_gpu_clk_get_info_args { | |||
623 | /* in: Pointer to nvgpu_gpu_clk_info entries in the caller's address | 631 | /* in: Pointer to nvgpu_gpu_clk_info entries in the caller's address |
624 | space. Buffer size must be at least: | 632 | space. Buffer size must be at least: |
625 | num_entries * sizeof(struct nvgpu_gpu_clk_info) | 633 | num_entries * sizeof(struct nvgpu_gpu_clk_info) |
626 | For each entry, the clk_domain to be queried should be set. Note | 634 | If NVGPU_GPU_CLK_FLAG_SPECIFIC_DOMAINS is set, caller should set |
627 | that clk_info_entries passed to an NVGPU_GPU_IOCTL_CLK_SET_INFO, | 635 | clk_domain to be queried in each entry. With this flag, |
636 | clk_info_entries passed to an NVGPU_GPU_IOCTL_CLK_SET_INFO, | ||
628 | can be re-used on completion for a NVGPU_GPU_IOCTL_CLK_GET_INFO. | 637 | can be re-used on completion for a NVGPU_GPU_IOCTL_CLK_GET_INFO. |
629 | This allows checking actual_mhz. | 638 | This allows checking actual_mhz. |
630 | */ | 639 | */ |