From e49d93a960f8995affeb4541941eb7f16d04eafd Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 11 Oct 2017 14:58:57 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1583876 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c') 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 @@ #include #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/ctxsw_trace_gk20a.h" @@ -99,8 +100,7 @@ static int gk20a_channel_cycle_stats(struct channel_gk20a *ch, void *virtual_address; /* is it allowed to handle calls for current GPU? */ - if (0 == (ch->g->gpu_characteristics.flags & - NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS)) + if (!nvgpu_is_enabled(ch->g, NVGPU_SUPPORT_CYCLE_STATS)) return -ENOSYS; if (args->dmabuf_fd && !ch->cyclestate.cyclestate_buffer_handler) { @@ -176,8 +176,7 @@ static int gk20a_channel_cycle_stats_snapshot(struct channel_gk20a *ch, int ret; /* is it allowed to handle calls for current GPU? */ - if (0 == (ch->g->gpu_characteristics.flags & - NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS_SNAPSHOT)) + if (!nvgpu_is_enabled(ch->g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT)) return -ENOSYS; if (!args->dmabuf_fd) -- cgit v1.2.2