diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-10-02 08:09:20 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:36 -0400 |
commit | 2870a4bcecf93133141aee9f4d9007f0df22cfa8 (patch) | |
tree | 4494762e8b0710dc37b318b8d3915f547a0d10af /drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |
parent | 17e4b7ff3f48aca2d258f246a1eef4ed32dd53a2 (diff) |
gpu: nvgpu: Add no-op stubs for vgpu
Implement empty or -ENOSYS functions for vgpu if
CONFIG_TEGRA_GR_VIRTUALIZATION is not enabled, and remove ifdefs around
the calling code.
Change-Id: Idc75c9bc486d661786bc222bd9e0380aa7766e78
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/552898
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index cd70d7c3..ca587d00 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |||
@@ -161,9 +161,7 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
161 | struct zbc_entry *zbc_val; | 161 | struct zbc_entry *zbc_val; |
162 | struct zbc_query_params *zbc_tbl; | 162 | struct zbc_query_params *zbc_tbl; |
163 | int i, err = 0; | 163 | int i, err = 0; |
164 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | ||
165 | struct gk20a_platform *platform = platform_get_drvdata(dev); | 164 | struct gk20a_platform *platform = platform_get_drvdata(dev); |
166 | #endif | ||
167 | 165 | ||
168 | gk20a_dbg_fn(""); | 166 | gk20a_dbg_fn(""); |
169 | 167 | ||
@@ -225,10 +223,8 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
225 | case NVGPU_GPU_IOCTL_ZBC_SET_TABLE: | 223 | case NVGPU_GPU_IOCTL_ZBC_SET_TABLE: |
226 | set_table_args = (struct nvgpu_gpu_zbc_set_table_args *)buf; | 224 | set_table_args = (struct nvgpu_gpu_zbc_set_table_args *)buf; |
227 | 225 | ||
228 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | ||
229 | if (platform->virtual_dev) | 226 | if (platform->virtual_dev) |
230 | return -ENOMEM; | 227 | return -ENOMEM; |
231 | #endif | ||
232 | 228 | ||
233 | zbc_val = kzalloc(sizeof(struct zbc_entry), GFP_KERNEL); | 229 | zbc_val = kzalloc(sizeof(struct zbc_entry), GFP_KERNEL); |
234 | if (zbc_val == NULL) | 230 | if (zbc_val == NULL) |