summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/vgpu/ce2_vgpu.c14
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c1
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.h4
-rw-r--r--include/linux/tegra_vgpu.h1
4 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/ce2_vgpu.c b/drivers/gpu/nvgpu/vgpu/ce2_vgpu.c
index f7b06f3b..81035d71 100644
--- a/drivers/gpu/nvgpu/vgpu/ce2_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/ce2_vgpu.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Virtualized GPU CE2 2 * Virtualized GPU CE2
3 * 3 *
4 * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2017, 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,
@@ -33,3 +33,15 @@ int vgpu_ce2_nonstall_isr(struct gk20a *g,
33 33
34 return 0; 34 return 0;
35} 35}
36
37static u32 vgpu_ce_get_num_pce(struct gk20a *g)
38{
39 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
40
41 return priv->constants.num_pce;
42}
43
44void vgpu_init_ce2_ops(struct gpu_ops *gops)
45{
46 gops->ce2.get_num_pce = vgpu_ce_get_num_pce;
47}
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index 8f401ec6..06971bb0 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -440,6 +440,7 @@ void vgpu_init_hal_common(struct gk20a *g)
440#if defined(CONFIG_GK20A_CYCLE_STATS) 440#if defined(CONFIG_GK20A_CYCLE_STATS)
441 vgpu_init_css_ops(gops); 441 vgpu_init_css_ops(gops);
442#endif 442#endif
443 vgpu_init_ce2_ops(gops);
443 gops->chip_init_gpu_characteristics = vgpu_init_gpu_characteristics; 444 gops->chip_init_gpu_characteristics = vgpu_init_gpu_characteristics;
444 gops->bus.read_ptimer = vgpu_read_ptimer; 445 gops->bus.read_ptimer = vgpu_read_ptimer;
445 gops->bus.get_timestamps_zipper = vgpu_get_timestamps_zipper; 446 gops->bus.get_timestamps_zipper = vgpu_get_timestamps_zipper;
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h
index cee81bb1..c5e57efa 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.h
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.h
@@ -94,6 +94,7 @@ void vgpu_init_tsg_ops(struct gpu_ops *gops);
94#if defined(CONFIG_GK20A_CYCLE_STATS) 94#if defined(CONFIG_GK20A_CYCLE_STATS)
95void vgpu_init_css_ops(struct gpu_ops *gops); 95void vgpu_init_css_ops(struct gpu_ops *gops);
96#endif 96#endif
97void vgpu_init_ce2_ops(struct gpu_ops *gops);
97int vgpu_init_mm_support(struct gk20a *g); 98int vgpu_init_mm_support(struct gk20a *g);
98int vgpu_init_gr_support(struct gk20a *g); 99int vgpu_init_gr_support(struct gk20a *g);
99int vgpu_init_fifo_support(struct gk20a *g); 100int vgpu_init_fifo_support(struct gk20a *g);
@@ -178,6 +179,9 @@ static inline void vgpu_init_css_ops(struct gpu_ops *gops)
178{ 179{
179} 180}
180#endif 181#endif
182static inline void vgpu_init_ce2_ops(struct gpu_ops *gops)
183{
184}
181static inline int vgpu_init_mm_support(struct gk20a *g) 185static inline int vgpu_init_mm_support(struct gk20a *g)
182{ 186{
183 return -ENOSYS; 187 return -ENOSYS;
diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h
index 1c486f5c..bfa5862b 100644
--- a/include/linux/tegra_vgpu.h
+++ b/include/linux/tegra_vgpu.h
@@ -477,6 +477,7 @@ struct tegra_vgpu_constants_params {
477 u32 preempt_ctx_size; 477 u32 preempt_ctx_size;
478 u32 channel_base; 478 u32 channel_base;
479 struct tegra_vgpu_engines_info engines_info; 479 struct tegra_vgpu_engines_info engines_info;
480 u32 num_pce;
480}; 481};
481 482
482struct tegra_vgpu_channel_cyclestats_snapshot_params { 483struct tegra_vgpu_channel_cyclestats_snapshot_params {