summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/os_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/os_ops.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/os_ops.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/os_ops.c b/drivers/gpu/nvgpu/os/linux/os_ops.c
new file mode 100644
index 00000000..14f92787
--- /dev/null
+++ b/drivers/gpu/nvgpu/os/linux/os_ops.c
@@ -0,0 +1,40 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
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,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "os_linux.h"
18
19#include "os_ops_gm20b.h"
20#include "os_ops_gp10b.h"
21
22int nvgpu_init_os_linux_ops(struct nvgpu_os_linux *l)
23{
24 struct gk20a *g = &l->g;
25 u32 ver = g->params.gpu_arch + g->params.gpu_impl;
26
27 switch (ver) {
28 case GK20A_GPUID_GM20B:
29 case GK20A_GPUID_GM20B_B:
30 nvgpu_gm20b_init_os_ops(l);
31 break;
32 case NVGPU_GPUID_GP10B:
33 nvgpu_gp10b_init_os_ops(l);
34 break;
35 default:
36 break;
37 }
38
39 return 0;
40}