diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-04-27 09:32:43 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-09 16:16:53 -0400 |
commit | 771f742703bb56598bc341ec4eaee5ff7c036d4d (patch) | |
tree | a74d32db43c4fe87ee6d55a587a8f6de12490bbf /include/uapi/linux/nvgpu.h | |
parent | d868b654419cfa096f563c9281a2a5cc067c23db (diff) |
gpu: nvgpu: add supported preemptions to gpu characteristics
Add below flag fields to gpu characteristics to indicate
supported and default preemption modes on platform for
graphics and compute
__u32 graphics_preemption_mode_flags;
__u32 compute_preemption_mode_flags;
__u32 default_graphics_preempt_mode;
__u32 default_compute_preempt_mode;
Add struct nvgpu_preemption_modes_rec to struct gr_gk20a
to store these values locally
Use platform specific get_preemption_mode_flags() to
get the flags and define gk20a/gm20b specific
get_preemption_mode_flags() API
Bug 1646259
Change-Id: I80193c0d988dc93bd96585f9aa631fd817f4dfa3
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1133595
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/uapi/linux/nvgpu.h')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 8ebe8d06..82b78f8f 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -187,6 +187,13 @@ struct nvgpu_gpu_characteristics { | |||
187 | 187 | ||
188 | __u64 max_freq; | 188 | __u64 max_freq; |
189 | 189 | ||
190 | /* supported preemption modes */ | ||
191 | __u32 graphics_preemption_mode_flags; /* NVGPU_GRAPHICS_PREEMPTION_MODE_* */ | ||
192 | __u32 compute_preemption_mode_flags; /* NVGPU_COMPUTE_PREEMPTION_MODE_* */ | ||
193 | /* default preemption modes */ | ||
194 | __u32 default_graphics_preempt_mode; /* NVGPU_GRAPHICS_PREEMPTION_MODE_* */ | ||
195 | __u32 default_compute_preempt_mode; /* NVGPU_COMPUTE_PREEMPTION_MODE_* */ | ||
196 | |||
190 | /* Notes: | 197 | /* Notes: |
191 | - This struct can be safely appended with new fields. However, always | 198 | - This struct can be safely appended with new fields. However, always |
192 | keep the structure size multiple of 8 and make sure that the binary | 199 | keep the structure size multiple of 8 and make sure that the binary |