summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-02-07 19:29:51 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-02 21:48:41 -0500
commit76b78b6fdcb0bbed72645aaa85de6013e2b135c3 (patch)
treedef110f0c0b0928651186444a9dab058b510c5bb /drivers
parentf9b2c30b369ba13735e2c0168fd45bb7275bdebd (diff)
gpu: nvgpu: Remove nvgpu_gpuid_t18x.h
Remove nvgpu_gpuid_t18x.h since this file is now visible. Migrate the relevant definitions and defines into their expected places and make the code use the real defines. No longer is hiding t18x specific stuff necessary. Bug 1799159 Change-Id: I47fa2392e46fdb7aacc70aeb0cc8c3f5ca0dc22f Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1300976 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c10
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h7
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal.c16
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c12
-rw-r--r--drivers/gpu/nvgpu/gp106/acr_gp106.c1
-rw-r--r--drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c1
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c2
-rw-r--r--drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c2
-rw-r--r--drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h45
-rw-r--r--drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c1
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c11
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.h1
13 files changed, 25 insertions, 85 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index e2795fbf..3504a32f 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -65,10 +65,6 @@
65#define CREATE_TRACE_POINTS 65#define CREATE_TRACE_POINTS
66#include <trace/events/gk20a.h> 66#include <trace/events/gk20a.h>
67 67
68#ifdef CONFIG_ARCH_TEGRA_18x_SOC
69#include "nvgpu_gpuid_t18x.h"
70#endif
71
72#ifdef CONFIG_TEGRA_19x_GPU 68#ifdef CONFIG_TEGRA_19x_GPU
73#include "nvgpu_gpuid_t19x.h" 69#include "nvgpu_gpuid_t19x.h"
74#endif 70#endif
@@ -1133,8 +1129,8 @@ static struct of_device_id tegra_gk20a_of_match[] = {
1133 { .compatible = "nvidia,tegra210-gm20b", 1129 { .compatible = "nvidia,tegra210-gm20b",
1134 .data = &gm20b_tegra_platform }, 1130 .data = &gm20b_tegra_platform },
1135#ifdef CONFIG_ARCH_TEGRA_18x_SOC 1131#ifdef CONFIG_ARCH_TEGRA_18x_SOC
1136 { .compatible = TEGRA_18x_GPU_COMPAT_TEGRA, 1132 { .compatible = "nvidia,tegra186-gp10b",
1137 .data = &t18x_gpu_tegra_platform }, 1133 .data = &gp10b_tegra_platform },
1138#endif 1134#endif
1139#ifdef CONFIG_TEGRA_19x_GPU 1135#ifdef CONFIG_TEGRA_19x_GPU
1140 { .compatible = TEGRA_19x_GPU_COMPAT_TEGRA, 1136 { .compatible = TEGRA_19x_GPU_COMPAT_TEGRA,
@@ -1160,7 +1156,7 @@ static struct of_device_id tegra_gk20a_of_match[] = {
1160 { .compatible = "nvidia,generic-gm20b", 1156 { .compatible = "nvidia,generic-gm20b",
1161 .data = &gk20a_generic_platform }, 1157 .data = &gk20a_generic_platform },
1162#ifdef CONFIG_ARCH_TEGRA_18x_SOC 1158#ifdef CONFIG_ARCH_TEGRA_18x_SOC
1163 { .compatible = TEGRA_18x_GPU_COMPAT_GENERIC, 1159 { .compatible = "nvidia,generic-gp10b",
1164 .data = &gk20a_generic_platform }, 1160 .data = &gk20a_generic_platform },
1165#endif 1161#endif
1166 { }, 1162 { },
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index c79cc6c8..8006a4fe 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1363,9 +1363,14 @@ int gk20a_wait_for_idle(struct device *dev);
1363 1363
1364#define GK20A_GPUID_GK20A \ 1364#define GK20A_GPUID_GK20A \
1365 GK20A_GPUID(NVGPU_GPU_ARCH_GK100, NVGPU_GPU_IMPL_GK20A) 1365 GK20A_GPUID(NVGPU_GPU_ARCH_GK100, NVGPU_GPU_IMPL_GK20A)
1366
1367#define GK20A_GPUID_GM20B \ 1366#define GK20A_GPUID_GM20B \
1368 GK20A_GPUID(NVGPU_GPU_ARCH_GM200, NVGPU_GPU_IMPL_GM20B) 1367 GK20A_GPUID(NVGPU_GPU_ARCH_GM200, NVGPU_GPU_IMPL_GM20B)
1368#define NVGPU_GPUID_GP10B \
1369 GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP10B)
1370#define NVGPU_GPUID_GP104 \
1371 GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP104)
1372#define NVGPU_GPUID_GP106 \
1373 GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP106)
1369 1374
1370int gk20a_init_gpu_characteristics(struct gk20a *g); 1375int gk20a_init_gpu_characteristics(struct gk20a *g);
1371 1376
diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c
index d4bd0ddc..dc4fcf1c 100644
--- a/drivers/gpu/nvgpu/gk20a/hal.c
+++ b/drivers/gpu/nvgpu/gk20a/hal.c
@@ -16,10 +16,8 @@
16#include "gk20a.h" 16#include "gk20a.h"
17#include "hal_gk20a.h" 17#include "hal_gk20a.h"
18#include "gm20b/hal_gm20b.h" 18#include "gm20b/hal_gm20b.h"
19 19#include "gp10b/hal_gp10b.h"
20#ifdef CONFIG_ARCH_TEGRA_18x_SOC 20#include "gp106/hal_gp106.h"
21#include "nvgpu_gpuid_t18x.h"
22#endif
23 21
24#ifdef CONFIG_TEGRA_19x_GPU 22#ifdef CONFIG_TEGRA_19x_GPU
25#include "nvgpu_gpuid_t19x.h" 23#include "nvgpu_gpuid_t19x.h"
@@ -39,13 +37,13 @@ int gpu_init_hal(struct gk20a *g)
39 return -ENODEV; 37 return -ENODEV;
40 break; 38 break;
41#if defined(CONFIG_ARCH_TEGRA_18x_SOC) 39#if defined(CONFIG_ARCH_TEGRA_18x_SOC)
42 case TEGRA_18x_GPUID: 40 case NVGPU_GPUID_GP10B:
43 if (TEGRA_18x_GPUID_HAL(g)) 41 if (gp10b_init_hal(g))
44 return -ENODEV; 42 return -ENODEV;
45 break; 43 break;
46 case TEGRA_18x_GPUID2: 44 case NVGPU_GPUID_GP104:
47 case TEGRA_18x_GPUID3: 45 case NVGPU_GPUID_GP106:
48 if (TEGRA_18x_GPUID2_HAL(g)) 46 if (gp106_init_hal(g))
49 return -ENODEV; 47 return -ENODEV;
50 break; 48 break;
51#endif 49#endif
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
index c841c8e6..42be2271 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
@@ -274,6 +274,7 @@ extern struct gk20a_platform gk20a_generic_platform;
274#ifdef CONFIG_TEGRA_GK20A 274#ifdef CONFIG_TEGRA_GK20A
275extern struct gk20a_platform gk20a_tegra_platform; 275extern struct gk20a_platform gk20a_tegra_platform;
276extern struct gk20a_platform gm20b_tegra_platform; 276extern struct gk20a_platform gm20b_tegra_platform;
277extern struct gk20a_platform gp10b_tegra_platform;
277#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION 278#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
278extern struct gk20a_platform vgpu_tegra_platform; 279extern struct gk20a_platform vgpu_tegra_platform;
279#endif 280#endif
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
index a5664a0e..1322460c 100644
--- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
@@ -34,10 +34,6 @@
34#include <nvgpu/hw/gk20a/hw_pwr_gk20a.h> 34#include <nvgpu/hw/gk20a/hw_pwr_gk20a.h>
35#include <nvgpu/hw/gk20a/hw_top_gk20a.h> 35#include <nvgpu/hw/gk20a/hw_top_gk20a.h>
36 36
37#ifdef CONFIG_ARCH_TEGRA_18x_SOC
38#include "nvgpu_gpuid_t18x.h"
39#endif
40
41#ifdef CONFIG_TEGRA_19x_GPU 37#ifdef CONFIG_TEGRA_19x_GPU
42#include "nvgpu_gpuid_t19x.h" 38#include "nvgpu_gpuid_t19x.h"
43#endif 39#endif
@@ -3707,13 +3703,11 @@ static u8 get_perfmon_id(struct pmu_gk20a *pmu)
3707 case GK20A_GPUID_GM20B: 3703 case GK20A_GPUID_GM20B:
3708 unit_id = PMU_UNIT_PERFMON; 3704 unit_id = PMU_UNIT_PERFMON;
3709 break; 3705 break;
3710#if defined(CONFIG_ARCH_TEGRA_18x_SOC) 3706 case NVGPU_GPUID_GP10B:
3711 case TEGRA_18x_GPUID: 3707 case NVGPU_GPUID_GP104:
3712 case TEGRA_18x_GPUID2: 3708 case NVGPU_GPUID_GP106:
3713 case TEGRA_18x_GPUID3:
3714 unit_id = PMU_UNIT_PERFMON_T18X; 3709 unit_id = PMU_UNIT_PERFMON_T18X;
3715 break; 3710 break;
3716#endif
3717#if defined(CONFIG_TEGRA_19x_GPU) 3711#if defined(CONFIG_TEGRA_19x_GPU)
3718 case TEGRA_19x_GPUID: 3712 case TEGRA_19x_GPUID:
3719 unit_id = PMU_UNIT_PERFMON_T18X; 3713 unit_id = PMU_UNIT_PERFMON_T18X;
diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c
index a4dfd07f..37a3d152 100644
--- a/drivers/gpu/nvgpu/gp106/acr_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c
@@ -31,7 +31,6 @@
31#include "gp106/pmu_gp106.h" 31#include "gp106/pmu_gp106.h"
32 32
33#include "sec2_gp106.h" 33#include "sec2_gp106.h"
34#include "nvgpu_gpuid_t18x.h"
35 34
36#include <nvgpu/hw/gp106/hw_psec_gp106.h> 35#include <nvgpu/hw/gp106/hw_psec_gp106.h>
37#include <nvgpu/hw/gp106/hw_pwr_gp106.h> 36#include <nvgpu/hw/gp106/hw_pwr_gp106.h>
diff --git a/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c b/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c
index 1f47cc5a..419c71df 100644
--- a/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c
@@ -15,7 +15,6 @@
15 15
16#include "gk20a/gk20a.h" 16#include "gk20a/gk20a.h"
17#include "gr_ctx_gp106.h" 17#include "gr_ctx_gp106.h"
18#include "nvgpu_gpuid_t18x.h"
19 18
20static int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name) 19static int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name)
21{ 20{
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index cece5dd6..d07223c9 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -52,8 +52,6 @@
52#include "gp106/fb_gp106.h" 52#include "gp106/fb_gp106.h"
53#include "gp106/gp106_gating_reglist.h" 53#include "gp106/gp106_gating_reglist.h"
54 54
55#include "nvgpu_gpuid_t18x.h"
56
57#include <nvgpu/hw/gp106/hw_proj_gp106.h> 55#include <nvgpu/hw/gp106/hw_proj_gp106.h>
58 56
59static struct gpu_ops gp106_ops = { 57static struct gpu_ops gp106_ops = {
diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
index 6795c99a..3a232402 100644
--- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
@@ -401,7 +401,7 @@ static int gp10b_clk_get_freqs(struct device *dev,
401 return 0; 401 return 0;
402} 402}
403 403
404struct gk20a_platform t18x_gpu_tegra_platform = { 404struct gk20a_platform gp10b_tegra_platform = {
405 .has_syncpoints = true, 405 .has_syncpoints = true,
406 406
407 /* power management configuration */ 407 /* power management configuration */
diff --git a/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h b/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h
deleted file mode 100644
index 84da4b96..00000000
--- a/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * NVIDIA GPU ID functions, definitions.
3 *
4 * Copyright (c) 2014-2016, 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#ifndef _NVGPU_GPUID_T18X_H_
16#define _NVGPU_GPUID_T18X_H_
17
18#define NVGPU_GPUID_GP10B \
19 GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP10B)
20#define NVGPU_GPUID_GP104 \
21 GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP104)
22#define NVGPU_GPUID_GP106 \
23 GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP106)
24
25#define NVGPU_COMPAT_TEGRA_GP10B "nvidia,tegra186-gp10b"
26#define NVGPU_COMPAT_GENERIC_GP10B "nvidia,generic-gp10b"
27
28#define TEGRA_18x_GPUID NVGPU_GPUID_GP10B
29#define TEGRA_18x_GPUID_HAL gp10b_init_hal
30#define TEGRA_18x_GPU_COMPAT_TEGRA NVGPU_COMPAT_TEGRA_GP10B
31#define TEGRA_18x_GPU_COMPAT_GENERIC NVGPU_COMPAT_GENERIC_GP10B
32#define TEGRA_18x_GPUID2 NVGPU_GPUID_GP104
33#define TEGRA_18x_GPUID2_HAL gp106_init_hal
34#define TEGRA_18x_GPUID3 NVGPU_GPUID_GP106
35#define TEGRA_18x_GPUID3_HAL gp106_init_hal
36struct gpu_ops;
37extern int gp10b_init_hal(struct gk20a *);
38extern int gp106_init_hal(struct gk20a *);
39extern struct gk20a_platform t18x_gpu_tegra_platform;
40
41#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
42#define TEGRA_18x_GPUID_VGPU_HAL vgpu_gp10b_init_hal
43extern int vgpu_gp10b_init_hal(struct gk20a *);
44#endif
45#endif
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c
index b665a8dd..14a7768a 100644
--- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c
+++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c
@@ -16,7 +16,6 @@
16#include "vgpu_gr_gp10b.h" 16#include "vgpu_gr_gp10b.h"
17#include "vgpu_fifo_gp10b.h" 17#include "vgpu_fifo_gp10b.h"
18#include "vgpu_mm_gp10b.h" 18#include "vgpu_mm_gp10b.h"
19#include "nvgpu_gpuid_t18x.h"
20 19
21int vgpu_gp10b_init_hal(struct gk20a *g) 20int vgpu_gp10b_init_hal(struct gk20a *g)
22{ 21{
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index c8ab23f1..d8e0dfa1 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -31,10 +31,6 @@
31 31
32#include <nvgpu/hw/gk20a/hw_mc_gk20a.h> 32#include <nvgpu/hw/gk20a/hw_mc_gk20a.h>
33 33
34#ifdef CONFIG_ARCH_TEGRA_18x_SOC
35#include "nvgpu_gpuid_t18x.h"
36#endif
37
38static inline int vgpu_comm_init(struct platform_device *pdev) 34static inline int vgpu_comm_init(struct platform_device *pdev)
39{ 35{
40 size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES }; 36 size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES };
@@ -374,11 +370,10 @@ static int vgpu_init_hal(struct gk20a *g)
374 gk20a_dbg_info("gm20b detected"); 370 gk20a_dbg_info("gm20b detected");
375 err = vgpu_gm20b_init_hal(g); 371 err = vgpu_gm20b_init_hal(g);
376 break; 372 break;
377#if defined(CONFIG_ARCH_TEGRA_18x_SOC) 373 case NVGPU_GPUID_GP10B:
378 case TEGRA_18x_GPUID: 374 gk20a_dbg_info("gp10b detected");
379 err = TEGRA_18x_GPUID_VGPU_HAL(g); 375 err = vgpu_gp10b_init_hal(g);
380 break; 376 break;
381#endif
382 default: 377 default:
383 gk20a_err(g->dev, "no support for %x", ver); 378 gk20a_err(g->dev, "no support for %x", ver);
384 err = -ENODEV; 379 err = -ENODEV;
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h
index 098c7dbd..7883abc1 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.h
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.h
@@ -101,6 +101,7 @@ int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in,
101void vgpu_init_hal_common(struct gk20a *g); 101void vgpu_init_hal_common(struct gk20a *g);
102int vgpu_gk20a_init_hal(struct gk20a *g); 102int vgpu_gk20a_init_hal(struct gk20a *g);
103int vgpu_gm20b_init_hal(struct gk20a *g); 103int vgpu_gm20b_init_hal(struct gk20a *g);
104int vgpu_gp10b_init_hal(struct gk20a *g);
104 105
105void vgpu_init_dbg_session_ops(struct gpu_ops *gops); 106void vgpu_init_dbg_session_ops(struct gpu_ops *gops);
106 107