diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-11-10 08:02:37 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-14 07:58:39 -0500 |
commit | 90aeab9dee07a63e4bac6d92646dfd80e65d2edd (patch) | |
tree | a175a1724590dc14c599db9c23f04d79a8f3ac79 /drivers/gpu/nvgpu/common/linux/ioctl_channel.h | |
parent | fd2cac59f3491cb5b4f5d1f3fc97df94734bd682 (diff) |
gpu: nvgpu: define preemption modes in common code
We use linux specific graphics/compute preemption modes defined in uapi header
(and of below form) in all over common code
NVGPU_GRAPHICS_PREEMPTION_MODE_*
NVGPU_COMPUTE_PREEMPTION_MODE_*
Since common code should be independent of linux specific code, define new modes
of the form in common code and used them everywhere
NVGPU_PREEMPTION_MODE_GRAPHICS_*
NVGPU_PREEMPTION_MODE_COMPUTE_*
Add required parser functions to convert both the modes into each other
For linux IOCTL NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE, we need to convert
linux specific modes into common modes first before passing them to common code
And to pass gpu characteristics to user space we need to first convert common
modes into linux specific modes and then pass them to user space
Jira NVGPU-392
Change-Id: I8c62c6859bdc1baa5b44eb31c7020e42d2462c8c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1596930
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.h b/drivers/gpu/nvgpu/common/linux/ioctl_channel.h index 48caf9df..235d84ef 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.h +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.h | |||
@@ -32,4 +32,9 @@ extern const struct file_operations gk20a_channel_ops; | |||
32 | 32 | ||
33 | u32 nvgpu_event_id_to_ioctl_channel_event_id(u32 event_id); | 33 | u32 nvgpu_event_id_to_ioctl_channel_event_id(u32 event_id); |
34 | u32 nvgpu_get_common_runlist_level(u32 level); | 34 | u32 nvgpu_get_common_runlist_level(u32 level); |
35 | |||
36 | u32 nvgpu_get_ioctl_graphics_preempt_mode_flags(u32 graphics_preempt_mode_flags); | ||
37 | u32 nvgpu_get_ioctl_compute_preempt_mode_flags(u32 compute_preempt_mode_flags); | ||
38 | u32 nvgpu_get_ioctl_graphics_preempt_mode(u32 graphics_preempt_mode); | ||
39 | u32 nvgpu_get_ioctl_compute_preempt_mode(u32 compute_preempt_mode); | ||
35 | #endif | 40 | #endif |