diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-09-28 13:34:27 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-17 13:43:39 -0400 |
commit | b252653ac5f2b12a9a84476f9dde6a844a77a602 (patch) | |
tree | d2ca5a3f56c652db2e30e21409f3f1ab1994d0a3 /drivers/gpu/nvgpu/gm20b | |
parent | 5c5b52dce54fa09d16ae38a232a0e17b4729b472 (diff) |
gpu: nvgpu: Move rest of CDE structures to Linux
Move rest of CDE structures to common/linux. This includes moving
the per-chip firmware file interpretation functions, and removing CDE
ops from HAL and adding it to nvgpu_os_linux.
JIRA NVGPU-259
Change-Id: I59d8f44bddadecef81ad3c455b363a14034c5e13
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1570403
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/cde_gm20b.c | 58 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/cde_gm20b.h | 35 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 5 |
3 files changed, 0 insertions, 98 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/cde_gm20b.c b/drivers/gpu/nvgpu/gm20b/cde_gm20b.c deleted file mode 100644 index f22e5126..00000000 --- a/drivers/gpu/nvgpu/gm20b/cde_gm20b.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * GM20B CDE | ||
3 | * | ||
4 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
22 | * DEALINGS IN THE SOFTWARE. | ||
23 | */ | ||
24 | |||
25 | #include "gk20a/gk20a.h" | ||
26 | #include "cde_gm20b.h" | ||
27 | |||
28 | enum programs { | ||
29 | PROG_HPASS = 0, | ||
30 | PROG_VPASS_LARGE = 1, | ||
31 | PROG_VPASS_SMALL = 2, | ||
32 | PROG_HPASS_DEBUG = 3, | ||
33 | PROG_VPASS_LARGE_DEBUG = 4, | ||
34 | PROG_VPASS_SMALL_DEBUG = 5, | ||
35 | PROG_PASSTHROUGH = 6, | ||
36 | }; | ||
37 | |||
38 | void gm20b_cde_get_program_numbers(struct gk20a *g, | ||
39 | u32 block_height_log2, | ||
40 | u32 shader_parameter, | ||
41 | int *hprog_out, int *vprog_out) | ||
42 | { | ||
43 | int hprog = PROG_HPASS; | ||
44 | int vprog = (block_height_log2 >= 2) ? | ||
45 | PROG_VPASS_LARGE : PROG_VPASS_SMALL; | ||
46 | if (shader_parameter == 1) { | ||
47 | hprog = PROG_PASSTHROUGH; | ||
48 | vprog = PROG_PASSTHROUGH; | ||
49 | } else if (shader_parameter == 2) { | ||
50 | hprog = PROG_HPASS_DEBUG; | ||
51 | vprog = (block_height_log2 >= 2) ? | ||
52 | PROG_VPASS_LARGE_DEBUG : | ||
53 | PROG_VPASS_SMALL_DEBUG; | ||
54 | } | ||
55 | |||
56 | *hprog_out = hprog; | ||
57 | *vprog_out = vprog; | ||
58 | } | ||
diff --git a/drivers/gpu/nvgpu/gm20b/cde_gm20b.h b/drivers/gpu/nvgpu/gm20b/cde_gm20b.h deleted file mode 100644 index dfd67d62..00000000 --- a/drivers/gpu/nvgpu/gm20b/cde_gm20b.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * GM20B CDE | ||
3 | * | ||
4 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
22 | * DEALINGS IN THE SOFTWARE. | ||
23 | */ | ||
24 | |||
25 | #ifndef _NVHOST_GM20B_CDE | ||
26 | #define _NVHOST_GM20B_CDE | ||
27 | |||
28 | struct gk20a; | ||
29 | |||
30 | void gm20b_cde_get_program_numbers(struct gk20a *g, | ||
31 | u32 block_height_log2, | ||
32 | u32 shader_parameter, | ||
33 | int *hprog_out, int *vprog_out); | ||
34 | |||
35 | #endif | ||
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 39d05978..50cc759a 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include "pmu_gm20b.h" | 50 | #include "pmu_gm20b.h" |
51 | #include "clk_gm20b.h" | 51 | #include "clk_gm20b.h" |
52 | #include "regops_gm20b.h" | 52 | #include "regops_gm20b.h" |
53 | #include "cde_gm20b.h" | ||
54 | #include "therm_gm20b.h" | 53 | #include "therm_gm20b.h" |
55 | #include "bus_gm20b.h" | 54 | #include "bus_gm20b.h" |
56 | #include "hal_gm20b.h" | 55 | #include "hal_gm20b.h" |
@@ -539,9 +538,6 @@ static const struct gpu_ops gm20b_ops = { | |||
539 | .perfbuffer_enable = gk20a_perfbuf_enable_locked, | 538 | .perfbuffer_enable = gk20a_perfbuf_enable_locked, |
540 | .perfbuffer_disable = gk20a_perfbuf_disable_locked, | 539 | .perfbuffer_disable = gk20a_perfbuf_disable_locked, |
541 | }, | 540 | }, |
542 | .cde = { | ||
543 | .get_program_numbers = gm20b_cde_get_program_numbers, | ||
544 | }, | ||
545 | .bus = { | 541 | .bus = { |
546 | .init_hw = gk20a_bus_init_hw, | 542 | .init_hw = gk20a_bus_init_hw, |
547 | .isr = gk20a_bus_isr, | 543 | .isr = gk20a_bus_isr, |
@@ -601,7 +597,6 @@ int gm20b_init_hal(struct gk20a *g) | |||
601 | gops->mc = gm20b_ops.mc; | 597 | gops->mc = gm20b_ops.mc; |
602 | gops->dbg_session_ops = gm20b_ops.dbg_session_ops; | 598 | gops->dbg_session_ops = gm20b_ops.dbg_session_ops; |
603 | gops->debug = gm20b_ops.debug; | 599 | gops->debug = gm20b_ops.debug; |
604 | gops->cde = gm20b_ops.cde; | ||
605 | gops->bus = gm20b_ops.bus; | 600 | gops->bus = gm20b_ops.bus; |
606 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 601 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
607 | gops->css = gm20b_ops.css; | 602 | gops->css = gm20b_ops.css; |