From b41e1417787aabf8e2d37f3259bce2a4ad041607 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 27 Sep 2017 13:07:57 -0700 Subject: gpu: nvgpu: Declare gk20a_user_*init() in ioctl.h The functions are gk20a_user_init() and gk20a_user_deinit() are defined in ioctl.c. Move declaration of the functions to new header file ioctl.h. JIRA NVGPU-259 Change-Id: If348b51e9032083f252a7c7717ed7bc153dbba52 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1569696 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/driver_common.c | 1 + drivers/gpu/nvgpu/common/linux/ioctl.h | 23 +++++++++++++++++++++++ drivers/gpu/nvgpu/common/linux/module.c | 1 + drivers/gpu/nvgpu/gk20a/gk20a.h | 4 ---- drivers/gpu/nvgpu/vgpu/vgpu.c | 1 + 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/nvgpu/common/linux/ioctl.h diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index b82e3784..b4e6a02c 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 00000000..7bf16711 --- /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 dcff089b..ac64041e 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 51672b2f..131caa68 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 5f672b11..c13d8ff0 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 -- cgit v1.2.2