diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c new file mode 100644 index 00000000..f4a63fad --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * GP10B GPU GR | ||
3 | * | ||
4 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | ||
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, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | */ | ||
15 | |||
16 | #include "gk20a/gk20a.h" /* FERMI and MAXWELL classes defined here */ | ||
17 | |||
18 | #include "gk20a/gr_gk20a.h" | ||
19 | |||
20 | #include "gm20b/gr_gm20b.h" /* for MAXWELL classes */ | ||
21 | #include "gp10b/gr_gp10b.h" | ||
22 | |||
23 | |||
24 | bool gr_gp10b_is_valid_class(struct gk20a *g, u32 class_num) | ||
25 | { | ||
26 | bool valid = false; | ||
27 | |||
28 | switch (class_num) { | ||
29 | case PASCAL_COMPUTE_A: | ||
30 | case PASCAL_A: | ||
31 | case PASCAL_DMA_COPY_A: | ||
32 | valid = true; | ||
33 | break; | ||
34 | |||
35 | case MAXWELL_COMPUTE_B: | ||
36 | case MAXWELL_B: | ||
37 | case FERMI_TWOD_A: | ||
38 | case KEPLER_DMA_COPY_A: | ||
39 | case MAXWELL_DMA_COPY_A: | ||
40 | valid = true; | ||
41 | break; | ||
42 | |||
43 | default: | ||
44 | break; | ||
45 | } | ||
46 | gk20a_dbg_info("class=0x%x valid=%d", class_num, valid); | ||
47 | return valid; | ||
48 | } | ||
49 | |||
50 | void gp10b_init_gr(struct gpu_ops *gops) | ||
51 | { | ||
52 | gm20b_init_gr(gops); | ||
53 | gops->gr.is_valid_class = gr_gp10b_is_valid_class; | ||
54 | } | ||