summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c47
-rw-r--r--drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h21
-rw-r--r--drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c29
3 files changed, 0 insertions, 97 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c
deleted file mode 100644
index 23da728e..00000000
--- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * Copyright (c) 2015-2016, 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
14#include "gk20a/gk20a.h"
15#include "vgpu_gr_gk20a.h"
16
17static int vgpu_gk20a_init_fs_state(struct gk20a *g)
18{
19 struct gr_gk20a *gr = &g->gr;
20 u32 tpc_index, gpc_index;
21 u32 sm_id = 0;
22
23 gk20a_dbg_fn("");
24
25 for (tpc_index = 0; tpc_index < gr->max_tpc_per_gpc_count;
26 tpc_index++) {
27 for (gpc_index = 0; gpc_index < gr->gpc_count; gpc_index++) {
28 if (tpc_index < gr->gpc_tpc_count[gpc_index]) {
29 g->gr.sm_to_cluster[sm_id].tpc_index =
30 tpc_index;
31 g->gr.sm_to_cluster[sm_id].gpc_index =
32 gpc_index;
33
34 sm_id++;
35 }
36 }
37 }
38
39 gr->no_of_sm = sm_id;
40
41 return 0;
42}
43
44void vgpu_gk20a_init_gr_ops(struct gpu_ops *gops)
45{
46 gops->gr.init_fs_state = vgpu_gk20a_init_fs_state;
47}
diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h
deleted file mode 100644
index bb80aff8..00000000
--- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (c) 2015, 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
14#ifndef __VGPU_GR_GK20A_H__
15#define __VGPU_GR_GK20A_H__
16
17#include "gk20a/gk20a.h"
18
19void vgpu_gk20a_init_gr_ops(struct gpu_ops *gops);
20
21#endif
diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c
deleted file mode 100644
index aeeb2ad9..00000000
--- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (c) 2015, 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
14#include "gk20a/hal_gk20a.h"
15#include "vgpu/vgpu.h"
16#include "vgpu_gr_gk20a.h"
17
18int vgpu_gk20a_init_hal(struct gk20a *g)
19{
20 int err;
21
22 err = gk20a_init_hal(g);
23 if (err)
24 return err;
25 vgpu_init_hal_common(g);
26 vgpu_gk20a_init_gr_ops(&g->ops);
27
28 return 0;
29}