summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c47
1 files changed, 0 insertions, 47 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}