summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-01-26 21:07:51 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-27 17:30:01 -0500
commitc45462288d09955b2a163274d501c4d0aa10a74b (patch)
treefb76c9472df4b10af854d1c3a1e1159a846648dd
parent5025350b80f4ded30d6ab2ed3590c6a61937eef7 (diff)
gpu: nvgpu: vgpu: move tegra_vgpu.h to include/nvgpu/vgpu/
tegra_vgpu.h is os agnostic, so move it out of linux folder. Jira EVLR-2364 Change-Id: Ibbe8923f7af036b3b6730f682f5243ca73810f7b Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1649936 Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel <nipatel@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/dbg_vgpu.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c3
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c4
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c4
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c3
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h5
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h (renamed from include/linux/tegra_vgpu.h)28
9 files changed, 28 insertions, 25 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c
index e0798475..6a0da7dc 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c
@@ -16,7 +16,7 @@
16#if defined(CONFIG_GK20A_CYCLE_STATS) 16#if defined(CONFIG_GK20A_CYCLE_STATS)
17 17
18#include <nvgpu/vgpu/vgpu_ivm.h> 18#include <nvgpu/vgpu/vgpu_ivm.h>
19#include <linux/tegra_vgpu.h> 19#include <nvgpu/vgpu/tegra_vgpu.h>
20#include <uapi/linux/nvgpu.h> 20#include <uapi/linux/nvgpu.h>
21 21
22#include "gk20a/gk20a.h" 22#include "gk20a/gk20a.h"
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/dbg_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/dbg_vgpu.c
index ec6fd875..90679cc7 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/dbg_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/dbg_vgpu.c
@@ -15,8 +15,8 @@
15 */ 15 */
16 16
17#include <nvgpu/vgpu/vgpu_ivc.h> 17#include <nvgpu/vgpu/vgpu_ivc.h>
18#include <nvgpu/vgpu/tegra_vgpu.h>
18 19
19#include <linux/tegra_vgpu.h>
20#include <uapi/linux/nvgpu.h> 20#include <uapi/linux/nvgpu.h>
21 21
22#include "gk20a/gk20a.h" 22#include "gk20a/gk20a.h"
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c
index 67a00c36..52a25893 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/string.h> 17#include <linux/string.h>
18#include <linux/tegra_vgpu.h>
19 18
20#include <uapi/linux/nvgpu.h> 19#include <uapi/linux/nvgpu.h>
21 20
@@ -24,6 +23,7 @@
24#include <nvgpu/enabled.h> 23#include <nvgpu/enabled.h>
25#include <nvgpu/ctxsw_trace.h> 24#include <nvgpu/ctxsw_trace.h>
26#include <nvgpu/vgpu/vgpu_ivm.h> 25#include <nvgpu/vgpu/vgpu_ivm.h>
26#include <nvgpu/vgpu/tegra_vgpu.h>
27 27
28#include "gk20a/gk20a.h" 28#include "gk20a/gk20a.h"
29#include "vgpu.h" 29#include "vgpu.h"
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c
index af25e486..c2129e4b 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c
@@ -19,8 +19,7 @@
19#include "common/linux/vgpu/vgpu.h" 19#include "common/linux/vgpu/vgpu.h"
20#include "gv11b/fifo_gv11b.h" 20#include "gv11b/fifo_gv11b.h"
21#include <nvgpu/nvhost.h> 21#include <nvgpu/nvhost.h>
22 22#include <nvgpu/vgpu/tegra_vgpu.h>
23#include <linux/tegra_vgpu.h>
24 23
25#ifdef CONFIG_TEGRA_GK20A_NVHOST 24#ifdef CONFIG_TEGRA_GK20A_NVHOST
26 25
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c
index a0099f03..5fbc7bbe 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -16,7 +16,7 @@
16 16
17#include "gk20a/gk20a.h" 17#include "gk20a/gk20a.h"
18#include "common/linux/vgpu/vgpu.h" 18#include "common/linux/vgpu/vgpu.h"
19#include <linux/tegra_vgpu.h> 19#include <nvgpu/vgpu/tegra_vgpu.h>
20#include <nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h> 20#include <nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h>
21 21
22int vgpu_gv11b_alloc_subctx_header(struct channel_gk20a *c) 22int vgpu_gv11b_alloc_subctx_header(struct channel_gk20a *c)
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c
index 8b060b24..82a3db8f 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017-2018, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include <linux/tegra_vgpu.h> 17#include <nvgpu/vgpu/tegra_vgpu.h>
18#include "gk20a/gk20a.h" 18#include "gk20a/gk20a.h"
19#include "common/linux/vgpu/vgpu.h" 19#include "common/linux/vgpu/vgpu.h"
20 20
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c
index 19987f0c..421763ec 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c
@@ -14,8 +14,6 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include <linux/tegra_vgpu.h>
18
19#include "gk20a/gk20a.h" 17#include "gk20a/gk20a.h"
20#include "gk20a/channel_gk20a.h" 18#include "gk20a/channel_gk20a.h"
21#include "gk20a/tsg_gk20a.h" 19#include "gk20a/tsg_gk20a.h"
@@ -24,6 +22,7 @@
24#include "fifo_vgpu.h" 22#include "fifo_vgpu.h"
25 23
26#include <nvgpu/bug.h> 24#include <nvgpu/bug.h>
25#include <nvgpu/vgpu/tegra_vgpu.h>
27 26
28int vgpu_tsg_open(struct tsg_gk20a *tsg) 27int vgpu_tsg_open(struct tsg_gk20a *tsg)
29{ 28{
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
index f59ad5bf..e9a73baf 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
@@ -27,14 +27,13 @@ struct gk20a_platform;
27 27
28#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION 28#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
29#include <nvgpu/vgpu/vgpu_ivc.h> 29#include <nvgpu/vgpu/vgpu_ivc.h>
30#include <nvgpu/vgpu/tegra_vgpu.h>
31#include <nvgpu/thread.h>
30 32
31#include <linux/tegra_vgpu.h>
32#include "gk20a/gk20a.h" 33#include "gk20a/gk20a.h"
33#include "common/linux/platform_gk20a.h" 34#include "common/linux/platform_gk20a.h"
34#include "common/linux/os_linux.h" 35#include "common/linux/os_linux.h"
35 36
36#include <nvgpu/thread.h>
37
38struct vgpu_priv_data { 37struct vgpu_priv_data {
39 u64 virt_handle; 38 u64 virt_handle;
40 struct nvgpu_thread intr_handler; 39 struct nvgpu_thread intr_handler;
diff --git a/include/linux/tegra_vgpu.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h
index 9980f4bc..78d64ebb 100644
--- a/include/linux/tegra_vgpu.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h
@@ -1,19 +1,25 @@
1/* 1/*
2 * Tegra GPU Virtualization Interfaces to Server 2 * Tegra GPU Virtualization Interfaces to Server
3 * 3 *
4 * Copyright (c) 2014-2018, NVIDIA Corporation. All rights reserved. 4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * under the terms and conditions of the GNU General Public License, 7 * copy of this software and associated documentation files (the "Software"),
8 * version 2, as published by the Free Software Foundation. 8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
9 * 12 *
10 * This program is distributed in the hope it will be useful, but WITHOUT 13 * The above copyright notice and this permission notice shall be included in
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * all copies or substantial portions of the Software.
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 * 15 *
15 * You should have received a copy of the GNU General Public License 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
17 */ 23 */
18 24
19#ifndef __TEGRA_VGPU_H 25#ifndef __TEGRA_VGPU_H
@@ -81,7 +87,7 @@ enum {
81 TEGRA_VGPU_CMD_CHANNEL_FREE_HWPM_CTX = 47, 87 TEGRA_VGPU_CMD_CHANNEL_FREE_HWPM_CTX = 47,
82 TEGRA_VGPU_CMD_GR_CTX_ALLOC = 48, 88 TEGRA_VGPU_CMD_GR_CTX_ALLOC = 48,
83 TEGRA_VGPU_CMD_GR_CTX_FREE = 49, 89 TEGRA_VGPU_CMD_GR_CTX_FREE = 49,
84 TEGRA_VGPU_CMD_CHANNEL_BIND_GR_CTX =50, 90 TEGRA_VGPU_CMD_CHANNEL_BIND_GR_CTX = 50,
85 TEGRA_VGPU_CMD_TSG_BIND_GR_CTX = 51, 91 TEGRA_VGPU_CMD_TSG_BIND_GR_CTX = 51,
86 TEGRA_VGPU_CMD_TSG_BIND_CHANNEL = 52, 92 TEGRA_VGPU_CMD_TSG_BIND_CHANNEL = 52,
87 TEGRA_VGPU_CMD_TSG_UNBIND_CHANNEL = 53, 93 TEGRA_VGPU_CMD_TSG_UNBIND_CHANNEL = 53,