diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-10-11 17:58:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-26 17:35:38 -0400 |
commit | e49d93a960f8995affeb4541941eb7f16d04eafd (patch) | |
tree | 7b5eb1365bfee8a237ddf7d8e0b02959e50f5704 /drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |
parent | 9eebb7831facaa16b2975f50a716d2986c67b699 (diff) |
gpu: nvgpu: Linux specific GPU characteristics flags
Make GPU characteristics flags specific to Linux code only. The
rest of driver is moved to using nvgpu_is_enabled() API.
JIRA NVGPU-259
Change-Id: I2faf46ef64c964361c267887b28c9d19806d6d51
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1583876
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.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index ed00ad31..ee4755c8 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <nvgpu/log.h> | 28 | #include <nvgpu/log.h> |
29 | #include <nvgpu/list.h> | 29 | #include <nvgpu/list.h> |
30 | #include <nvgpu/debug.h> | 30 | #include <nvgpu/debug.h> |
31 | #include <nvgpu/enabled.h> | ||
31 | 32 | ||
32 | #include "gk20a/gk20a.h" | 33 | #include "gk20a/gk20a.h" |
33 | #include "gk20a/ctxsw_trace_gk20a.h" | 34 | #include "gk20a/ctxsw_trace_gk20a.h" |
@@ -99,8 +100,7 @@ static int gk20a_channel_cycle_stats(struct channel_gk20a *ch, | |||
99 | void *virtual_address; | 100 | void *virtual_address; |
100 | 101 | ||
101 | /* is it allowed to handle calls for current GPU? */ | 102 | /* is it allowed to handle calls for current GPU? */ |
102 | if (0 == (ch->g->gpu_characteristics.flags & | 103 | if (!nvgpu_is_enabled(ch->g, NVGPU_SUPPORT_CYCLE_STATS)) |
103 | NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS)) | ||
104 | return -ENOSYS; | 104 | return -ENOSYS; |
105 | 105 | ||
106 | if (args->dmabuf_fd && !ch->cyclestate.cyclestate_buffer_handler) { | 106 | if (args->dmabuf_fd && !ch->cyclestate.cyclestate_buffer_handler) { |
@@ -176,8 +176,7 @@ static int gk20a_channel_cycle_stats_snapshot(struct channel_gk20a *ch, | |||
176 | int ret; | 176 | int ret; |
177 | 177 | ||
178 | /* is it allowed to handle calls for current GPU? */ | 178 | /* is it allowed to handle calls for current GPU? */ |
179 | if (0 == (ch->g->gpu_characteristics.flags & | 179 | if (!nvgpu_is_enabled(ch->g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT)) |
180 | NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS_SNAPSHOT)) | ||
181 | return -ENOSYS; | 180 | return -ENOSYS; |
182 | 181 | ||
183 | if (!args->dmabuf_fd) | 182 | if (!args->dmabuf_fd) |