summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-11-12 07:32:29 -0500
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:02 -0500
commitc23f7708ac84c1866b2d9f1b8d5a9e560026e859 (patch)
tree7b6e9d14765d6d2a56b1681379d4fcf897e756f8
parent3cfc020b91fed07598bea39367a505a6e5bc9684 (diff)
gpu: nvgpu: gp10b: Define physical address width
GP10B physical address width is 37 bits. Use old width for now, and add gp10b specific definition. We can switch to new definition once we've verified them. Bug 1567274 Change-Id: I33cc1b99f14f1a7ee5f6fe3bd3d8b3126c23ecbe Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/601703
-rw-r--r--drivers/gpu/nvgpu/gp10b/Makefile1
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c4
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.c28
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.h19
4 files changed, 50 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/Makefile b/drivers/gpu/nvgpu/gp10b/Makefile
index 4ecf761a..ecb09cf6 100644
--- a/drivers/gpu/nvgpu/gp10b/Makefile
+++ b/drivers/gpu/nvgpu/gp10b/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_GK20A) += \
12 gr_gp10b.o \ 12 gr_gp10b.o \
13 mc_gp10b.o \ 13 mc_gp10b.o \
14 ltc_gp10b.o \ 14 ltc_gp10b.o \
15 mm_gp10b.o \
15 hal_gp10b.o 16 hal_gp10b.o
16 17
17obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o 18obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 5ef64e1f..acd1b73c 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -23,13 +23,13 @@
23#include "gp10b/gr_gp10b.h" 23#include "gp10b/gr_gp10b.h"
24#include "gp10b/mc_gp10b.h" 24#include "gp10b/mc_gp10b.h"
25#include "gp10b/ltc_gp10b.h" 25#include "gp10b/ltc_gp10b.h"
26#include "gp10b/mm_gp10b.h"
26 27
27#include "gm20b/gr_gm20b.h" 28#include "gm20b/gr_gm20b.h"
28#include "gm20b/fb_gm20b.h" 29#include "gm20b/fb_gm20b.h"
29#include "gm20b/gm20b_gating_reglist.h" 30#include "gm20b/gm20b_gating_reglist.h"
30#include "gm20b/fifo_gm20b.h" 31#include "gm20b/fifo_gm20b.h"
31#include "gm20b/gr_ctx_gm20b.h" 32#include "gm20b/gr_ctx_gm20b.h"
32#include "gm20b/mm_gm20b.h"
33#include "gm20b/pmu_gm20b.h" 33#include "gm20b/pmu_gm20b.h"
34#include "gm20b/clk_gm20b.h" 34#include "gm20b/clk_gm20b.h"
35 35
@@ -94,7 +94,7 @@ int gp10b_init_hal(struct gk20a *g)
94 gm20b_init_fb(gops); 94 gm20b_init_fb(gops);
95 gm20b_init_fifo(gops); 95 gm20b_init_fifo(gops);
96 gm20b_init_gr_ctx(gops); 96 gm20b_init_gr_ctx(gops);
97 gm20b_init_mm(gops); 97 gp10b_init_mm(gops);
98 gm20b_init_pmu_ops(gops); 98 gm20b_init_pmu_ops(gops);
99 gm20b_init_clk_ops(gops); 99 gm20b_init_clk_ops(gops);
100 gops->name = "gp10b"; 100 gops->name = "gp10b";
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
new file mode 100644
index 00000000..a0b6a7d1
--- /dev/null
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
@@ -0,0 +1,28 @@
1/*
2 * GP10B MMU
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 <linux/pm_runtime.h>
17#include "gk20a/gk20a.h"
18
19u32 gp10b_mm_get_physical_addr_bits(struct gk20a *g)
20{
21 return 37;
22}
23
24void gp10b_init_mm(struct gpu_ops *gops)
25{
26 gm20b_init_mm(gops);
27 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits;
28}
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.h b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h
new file mode 100644
index 00000000..38ca93a4
--- /dev/null
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h
@@ -0,0 +1,19 @@
1/*
2 * Copyright (c) 2014, 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#ifndef MM_GP10B_H
15#define MM_GP10B_H
16struct gpu_ops;
17
18void gp10b_init_mm(struct gpu_ops *gops);
19#endif