summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/cde_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-09-28 13:34:27 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-17 13:43:39 -0400
commitb252653ac5f2b12a9a84476f9dde6a844a77a602 (patch)
treed2ca5a3f56c652db2e30e21409f3f1ab1994d0a3 /drivers/gpu/nvgpu/gm20b/cde_gm20b.c
parent5c5b52dce54fa09d16ae38a232a0e17b4729b472 (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/cde_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/cde_gm20b.c58
1 files changed, 0 insertions, 58 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
28enum 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
38void 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}