summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorSourab Gupta <sourabg@nvidia.com>2018-08-03 10:31:47 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-08 05:00:16 -0400
commit32bcf21f5712fcd872b26ec70ad8987f7db4478f (patch)
tree9dfc6b740d5519d54b678171319c5ebf4d386914 /drivers/gpu
parentb86fcdee3115b5bded24e27cc31ee06f8a0a3938 (diff)
gpu: nvgpu: move ce2.c to common code
ce2.c is free of all Linux'isms and can be moved to the common code, so that it can be used by other OS'es. VQRM-3705 Change-Id: Id4644a24188e9af2ba5f6875d1b8bc58b4450519 Signed-off-by: Sourab Gupta <sourabg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1792100 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/Makefile2
-rw-r--r--drivers/gpu/nvgpu/Makefile.sources1
-rw-r--r--drivers/gpu/nvgpu/common/ce2.c (renamed from drivers/gpu/nvgpu/os/linux/ce2.c)27
3 files changed, 18 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile
index a7b73c81..6b327bce 100644
--- a/drivers/gpu/nvgpu/Makefile
+++ b/drivers/gpu/nvgpu/Makefile
@@ -64,7 +64,6 @@ nvgpu-y += \
64 os/linux/dmabuf.o \ 64 os/linux/dmabuf.o \
65 os/linux/sched.o \ 65 os/linux/sched.o \
66 os/linux/channel.o \ 66 os/linux/channel.o \
67 os/linux/ce2.o \
68 os/linux/sim.o \ 67 os/linux/sim.o \
69 os/linux/sim_pci.o \ 68 os/linux/sim_pci.o \
70 os/linux/os_sched.o \ 69 os/linux/os_sched.o \
@@ -188,6 +187,7 @@ nvgpu-y += \
188 common/sim_pci.o \ 187 common/sim_pci.o \
189 common/fifo/submit.o \ 188 common/fifo/submit.o \
190 common/ecc.o \ 189 common/ecc.o \
190 common/ce2.o \
191 gk20a/gk20a.o \ 191 gk20a/gk20a.o \
192 gk20a/ce2_gk20a.o \ 192 gk20a/ce2_gk20a.o \
193 gk20a/fifo_gk20a.o \ 193 gk20a/fifo_gk20a.o \
diff --git a/drivers/gpu/nvgpu/Makefile.sources b/drivers/gpu/nvgpu/Makefile.sources
index 942b6681..6e951ae6 100644
--- a/drivers/gpu/nvgpu/Makefile.sources
+++ b/drivers/gpu/nvgpu/Makefile.sources
@@ -50,6 +50,7 @@ srcs := common/mm/nvgpu_allocator.c \
50 common/ltc.c \ 50 common/ltc.c \
51 common/io_common.c \ 51 common/io_common.c \
52 common/ecc.c \ 52 common/ecc.c \
53 common/ce2.c \
53 common/vbios/bios.c \ 54 common/vbios/bios.c \
54 common/falcon/falcon.c \ 55 common/falcon/falcon.c \
55 common/falcon/falcon_queue.c \ 56 common/falcon/falcon_queue.c \
diff --git a/drivers/gpu/nvgpu/os/linux/ce2.c b/drivers/gpu/nvgpu/common/ce2.c
index 0b43c0d1..9385b531 100644
--- a/drivers/gpu/nvgpu/os/linux/ce2.c
+++ b/drivers/gpu/nvgpu/common/ce2.c
@@ -1,17 +1,23 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA Corporation. All rights reserved. 2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * under the terms and conditions of the GNU General Public License, 5 * copy of this software and associated documentation files (the "Software"),
6 * version 2, as published by the Free Software Foundation. 6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
7 * 10 *
8 * This program is distributed in the hope it will be useful, but WITHOUT 11 * The above copyright notice and this permission notice shall be included in
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * all copies or substantial portions of the Software.
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 * 13 *
13 * You should have received a copy of the GNU General Public License 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
15 */ 21 */
16 22
17#include <nvgpu/types.h> 23#include <nvgpu/types.h>
@@ -21,7 +27,6 @@
21 27
22#include "gk20a/ce2_gk20a.h" 28#include "gk20a/ce2_gk20a.h"
23#include "gk20a/gk20a.h" 29#include "gk20a/gk20a.h"
24#include "channel.h"
25 30
26static inline int gk20a_get_valid_launch_flags(struct gk20a *g, int launch_flags) 31static inline int gk20a_get_valid_launch_flags(struct gk20a *g, int launch_flags)
27{ 32{