summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c1
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c11
-rw-r--r--include/linux/tegra_gpu_t19x.h24
3 files changed, 33 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index ca5e8dc0..f60337e2 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -31,6 +31,7 @@
31#include "hw_mc_gv11b.h" 31#include "hw_mc_gv11b.h"
32#include "hw_gr_gv11b.h" 32#include "hw_gr_gv11b.h"
33#include <linux/vmalloc.h> 33#include <linux/vmalloc.h>
34#include <linux/tegra_gpu_t19x.h>
34 35
35static bool gr_gv11b_is_valid_class(struct gk20a *g, u32 class_num) 36static bool gr_gv11b_is_valid_class(struct gk20a *g, u32 class_num)
36{ 37{
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index a11d6a71..3124f540 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -17,7 +17,7 @@
17#include <linux/printk.h> 17#include <linux/printk.h>
18 18
19#include <linux/types.h> 19#include <linux/types.h>
20 20#include <linux/tegra_gpu_t19x.h>
21#include "gk20a/gk20a.h" 21#include "gk20a/gk20a.h"
22 22
23#include "gv11b/hal_gv11b.h" 23#include "gv11b/hal_gv11b.h"
@@ -40,8 +40,7 @@
40 40
41static struct gpu_ops gv11b_ops; 41static struct gpu_ops gv11b_ops;
42 42
43static int gv11b_get_litter_value(struct gk20a *g, 43static int gv11b_get_litter_value(struct gk20a *g, int value)
44 enum nvgpu_litter_value value)
45{ 44{
46 int ret = EINVAL; 45 int ret = EINVAL;
47 switch (value) { 46 switch (value) {
@@ -57,6 +56,9 @@ static int gv11b_get_litter_value(struct gk20a *g,
57 case GPU_LIT_NUM_TPC_PER_GPC: 56 case GPU_LIT_NUM_TPC_PER_GPC:
58 ret = proj_scal_litter_num_tpc_per_gpc_v(); 57 ret = proj_scal_litter_num_tpc_per_gpc_v();
59 break; 58 break;
59 case GPU_LIT_NUM_SM_PER_TPC:
60 ret = proj_scal_litter_num_sm_per_tpc_v();
61 break;
60 case GPU_LIT_NUM_FBPS: 62 case GPU_LIT_NUM_FBPS:
61 ret = proj_scal_litter_num_fbps_v(); 63 ret = proj_scal_litter_num_fbps_v();
62 break; 64 break;
@@ -108,6 +110,9 @@ static int gv11b_get_litter_value(struct gk20a *g,
108 case GPU_LIT_FBPA_STRIDE: 110 case GPU_LIT_FBPA_STRIDE:
109 ret = proj_fbpa_stride_v(); 111 ret = proj_fbpa_stride_v();
110 break; 112 break;
113 case GPU_LIT_NUM_SUBCTX:
114 ret = proj_litter_num_subctx_v();
115 break;
111 default: 116 default:
112 break; 117 break;
113 } 118 }
diff --git a/include/linux/tegra_gpu_t19x.h b/include/linux/tegra_gpu_t19x.h
new file mode 100644
index 00000000..f6157c12
--- /dev/null
+++ b/include/linux/tegra_gpu_t19x.h
@@ -0,0 +1,24 @@
1/*
2 * Tegra GPU Virtualization Interfaces to Server
3 *
4 * Copyright (c) 2016, NVIDIA Corporation. All rights reserved.
5 *
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,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __TEGRA_GPU_T19X_H
20#define __TEGRA_GPU_T19X_H
21
22#define GPU_LIT_NUM_SUBCTX 99
23
24#endif