diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index b82e3784c..b4e6a02c0 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c @@ -29,6 +29,7 @@ #include "module.h" #include "os_linux.h" #include "sysfs.h" +#include "ioctl.h" #define EMC3D_DEFAULT_RATIO 750 diff --git a/drivers/gpu/nvgpu/common/linux/ioctl.h b/drivers/gpu/nvgpu/common/linux/ioctl.h new file mode 100644 index 000000000..7bf167119 --- /dev/null +++ b/drivers/gpu/nvgpu/common/linux/ioctl.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ +#ifndef __NVGPU_IOCTL_H__ +#define __NVGPU_IOCTL_H__ + +struct device; +struct class; + +int gk20a_user_init(struct device *dev, const char *interface_name, + struct class *class); +void gk20a_user_deinit(struct device *dev, struct class *class); + +#endif diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index dcff089b9..ac64041e5 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -40,6 +40,7 @@ #include "module.h" #include "intr.h" #include "cde.h" +#include "ioctl.h" #ifdef CONFIG_TEGRA_19x_GPU #include "nvgpu_gpuid_t19x.h" #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 51672b2fb..131caa686 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1504,10 +1504,6 @@ int gk20a_wait_for_idle(struct gk20a *g); int gk20a_init_gpu_characteristics(struct gk20a *g); -int gk20a_user_init(struct device *dev, const char *interface_name, - struct class *class); -void gk20a_user_deinit(struct device *dev, struct class *class); - static inline u32 ptimer_scalingfactor10x(u32 ptimer_src_freq) { return (u32)(((u64)(PTIMER_REF_FREQ_HZ * 10)) / ptimer_src_freq); diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 5f672b11a..c13d8ff00 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -46,6 +46,7 @@ #include "common/linux/module.h" #include "common/linux/os_linux.h" +#include "common/linux/ioctl.h" #ifdef CONFIG_TEGRA_19x_GPU #include