summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/vgpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu')
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c7
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c6
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c3
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c3
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c6
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c10
7 files changed, 13 insertions, 24 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c
index d343da03..5e880261 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c
@@ -169,10 +169,8 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
169 p->flags = TEGRA_VGPU_MAP_CACHEABLE; 169 p->flags = TEGRA_VGPU_MAP_CACHEABLE;
170 if (flags & NVGPU_VM_MAP_IO_COHERENT) 170 if (flags & NVGPU_VM_MAP_IO_COHERENT)
171 p->flags |= TEGRA_VGPU_MAP_IO_COHERENT; 171 p->flags |= TEGRA_VGPU_MAP_IO_COHERENT;
172#ifdef CONFIG_TEGRA_19x_GPU
173 if (flags & NVGPU_VM_MAP_L3_ALLOC) 172 if (flags & NVGPU_VM_MAP_L3_ALLOC)
174 p->flags |= TEGRA_VGPU_MAP_L3_ALLOC; 173 p->flags |= TEGRA_VGPU_MAP_L3_ALLOC;
175#endif
176 p->prot = prot; 174 p->prot = prot;
177 p->ctag_offset = ctag_offset; 175 p->ctag_offset = ctag_offset;
178 p->clear_ctags = clear_ctags; 176 p->clear_ctags = clear_ctags;
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c
index 3b9d63e8..4d796f67 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.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,
@@ -20,7 +20,6 @@
20#include "common/linux/os_linux.h" 20#include "common/linux/os_linux.h"
21 21
22#include <nvgpu/nvhost.h> 22#include <nvgpu/nvhost.h>
23#include <nvgpu/nvhost_t19x.h>
24 23
25#include <linux/platform_device.h> 24#include <linux/platform_device.h>
26 25
@@ -44,12 +43,12 @@ static int gv11b_vgpu_probe(struct device *dev)
44 dev_err(dev, "failed to map usermode regs\n"); 43 dev_err(dev, "failed to map usermode regs\n");
45 return PTR_ERR(regs); 44 return PTR_ERR(regs);
46 } 45 }
47 l->t19x.usermode_regs = regs; 46 l->usermode_regs = regs;
48 47
49#ifdef CONFIG_TEGRA_GK20A_NVHOST 48#ifdef CONFIG_TEGRA_GK20A_NVHOST
50 ret = nvgpu_get_nvhost_dev(g); 49 ret = nvgpu_get_nvhost_dev(g);
51 if (ret) { 50 if (ret) {
52 l->t19x.usermode_regs = NULL; 51 l->usermode_regs = NULL;
53 return ret; 52 return ret;
54 } 53 }
55 54
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 475036ee..134ca67a 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
@@ -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,
@@ -18,7 +18,7 @@
18 18
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_t19x.h> 21#include <nvgpu/nvhost.h>
22 22
23#include <linux/tegra_vgpu.h> 23#include <linux/tegra_vgpu.h>
24 24
@@ -99,7 +99,7 @@ int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g)
99 struct fifo_gk20a *f = &g->fifo; 99 struct fifo_gk20a *f = &g->fifo;
100 struct vgpu_priv_data *priv = vgpu_get_priv_data(g); 100 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
101 101
102 f->t19x.max_subctx_count = priv->constants.max_subctx_count; 102 f->max_subctx_count = priv->constants.max_subctx_count;
103 103
104 return 0; 104 return 0;
105} 105}
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c
index 93e26541..749e9e81 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_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,
@@ -17,7 +17,6 @@
17#include "gk20a/gk20a.h" 17#include "gk20a/gk20a.h"
18 18
19#include <nvgpu/enabled.h> 19#include <nvgpu/enabled.h>
20#include <nvgpu/enabled_t19x.h>
21 20
22#include "common/linux/vgpu/vgpu.h" 21#include "common/linux/vgpu/vgpu.h"
23#include "vgpu_gv11b.h" 22#include "vgpu_gv11b.h"
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c
index d205f039..88d6bde0 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c
@@ -68,8 +68,7 @@
68#include <gv11b/gr_ctx_gv11b.h> 68#include <gv11b/gr_ctx_gv11b.h>
69#include <gv11b/ltc_gv11b.h> 69#include <gv11b/ltc_gv11b.h>
70#include <gv11b/gv11b_gating_reglist.h> 70#include <gv11b/gv11b_gating_reglist.h>
71 71#include <gv11b/gr_gv11b.h>
72#include <gv100/gr_gv100.h>
73 72
74#include <nvgpu/enabled.h> 73#include <nvgpu/enabled.h>
75 74
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 c2e01218..8b060b24 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, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-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,
@@ -38,8 +38,8 @@ int vgpu_gv11b_tsg_bind_channel(struct tsg_gk20a *tsg,
38 msg.handle = vgpu_get_handle(tsg->g); 38 msg.handle = vgpu_get_handle(tsg->g);
39 p->tsg_id = tsg->tsgid; 39 p->tsg_id = tsg->tsgid;
40 p->ch_handle = ch->virt_ctx; 40 p->ch_handle = ch->virt_ctx;
41 p->subctx_id = ch->t19x.subctx_id; 41 p->subctx_id = ch->subctx_id;
42 p->runqueue_sel = ch->t19x.runqueue_sel; 42 p->runqueue_sel = ch->runqueue_sel;
43 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); 43 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
44 err = err ? err : msg.ret; 44 err = err ? err : msg.ret;
45 if (err) { 45 if (err) {
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
index d0c9e66d..cdf3ef1c 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Virtualized GPU 2 * Virtualized GPU
3 * 3 *
4 * Copyright (c) 2014-2017, 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 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -47,10 +47,6 @@
47#include "common/linux/scale.h" 47#include "common/linux/scale.h"
48#include "common/linux/driver_common.h" 48#include "common/linux/driver_common.h"
49 49
50#ifdef CONFIG_TEGRA_19x_GPU
51#include <nvgpu_gpuid_t19x.h>
52#endif
53
54#include <nvgpu/hw/gk20a/hw_mc_gk20a.h> 50#include <nvgpu/hw/gk20a/hw_mc_gk20a.h>
55 51
56static inline int vgpu_comm_init(struct platform_device *pdev) 52static inline int vgpu_comm_init(struct platform_device *pdev)
@@ -436,11 +432,9 @@ static int vgpu_init_hal(struct gk20a *g)
436 gk20a_dbg_info("gp10b detected"); 432 gk20a_dbg_info("gp10b detected");
437 err = vgpu_gp10b_init_hal(g); 433 err = vgpu_gp10b_init_hal(g);
438 break; 434 break;
439#ifdef CONFIG_TEGRA_19x_GPU 435 case NVGPU_GPUID_GV11B:
440 case TEGRA_19x_GPUID:
441 err = vgpu_gv11b_init_hal(g); 436 err = vgpu_gv11b_init_hal(g);
442 break; 437 break;
443#endif
444 default: 438 default:
445 nvgpu_err(g, "no support for %x", ver); 439 nvgpu_err(g, "no support for %x", ver);
446 err = -ENODEV; 440 err = -ENODEV;