summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/ce2_vgpu.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2017-08-17 13:32:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-28 22:34:23 -0400
commit0130c7ba43253790ef7e6e79c86c14223715f572 (patch)
tree55d12877e0d8eaff7ab0774e2bad4d982c6742f3 /drivers/gpu/nvgpu/vgpu/ce2_vgpu.c
parent0e0767672ae7e66d0ec249b8847f36c685fe995e (diff)
gpu: nvgpu: vgpu: add num_pce to constants
Implement hal gops->ce2.get_num_pce. Jira VFND-3797 Change-Id: Ie4fd3f170f2961ab5ebd1867b83bfda40e57aa2b Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1543020 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/ce2_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/ce2_vgpu.c14
1 files changed, 13 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}