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>
This commit is contained in:
Alex Waterman
2017-02-07 16:29:51 -08:00
committed by mobile promotions
parent f9b2c30b36
commit 76b78b6fdc
15 changed files with 31 additions and 95 deletions

View File

@@ -65,10 +65,6 @@
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include <trace/events/gk20a.h> #include <trace/events/gk20a.h>
#ifdef CONFIG_ARCH_TEGRA_18x_SOC
#include "nvgpu_gpuid_t18x.h"
#endif
#ifdef CONFIG_TEGRA_19x_GPU #ifdef CONFIG_TEGRA_19x_GPU
#include "nvgpu_gpuid_t19x.h" #include "nvgpu_gpuid_t19x.h"
#endif #endif
@@ -1133,8 +1129,8 @@ static struct of_device_id tegra_gk20a_of_match[] = {
{ .compatible = "nvidia,tegra210-gm20b", { .compatible = "nvidia,tegra210-gm20b",
.data = &gm20b_tegra_platform }, .data = &gm20b_tegra_platform },
#ifdef CONFIG_ARCH_TEGRA_18x_SOC #ifdef CONFIG_ARCH_TEGRA_18x_SOC
{ .compatible = TEGRA_18x_GPU_COMPAT_TEGRA, { .compatible = "nvidia,tegra186-gp10b",
.data = &t18x_gpu_tegra_platform }, .data = &gp10b_tegra_platform },
#endif #endif
#ifdef CONFIG_TEGRA_19x_GPU #ifdef CONFIG_TEGRA_19x_GPU
{ .compatible = TEGRA_19x_GPU_COMPAT_TEGRA, { .compatible = TEGRA_19x_GPU_COMPAT_TEGRA,
@@ -1160,7 +1156,7 @@ static struct of_device_id tegra_gk20a_of_match[] = {
{ .compatible = "nvidia,generic-gm20b", { .compatible = "nvidia,generic-gm20b",
.data = &gk20a_generic_platform }, .data = &gk20a_generic_platform },
#ifdef CONFIG_ARCH_TEGRA_18x_SOC #ifdef CONFIG_ARCH_TEGRA_18x_SOC
{ .compatible = TEGRA_18x_GPU_COMPAT_GENERIC, { .compatible = "nvidia,generic-gp10b",
.data = &gk20a_generic_platform }, .data = &gk20a_generic_platform },
#endif #endif
{ }, { },

View File

@@ -1363,9 +1363,14 @@ int gk20a_wait_for_idle(struct device *dev);
#define GK20A_GPUID_GK20A \ #define GK20A_GPUID_GK20A \
GK20A_GPUID(NVGPU_GPU_ARCH_GK100, NVGPU_GPU_IMPL_GK20A) GK20A_GPUID(NVGPU_GPU_ARCH_GK100, NVGPU_GPU_IMPL_GK20A)
#define GK20A_GPUID_GM20B \ #define GK20A_GPUID_GM20B \
GK20A_GPUID(NVGPU_GPU_ARCH_GM200, NVGPU_GPU_IMPL_GM20B) GK20A_GPUID(NVGPU_GPU_ARCH_GM200, NVGPU_GPU_IMPL_GM20B)
#define NVGPU_GPUID_GP10B \
GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP10B)
#define NVGPU_GPUID_GP104 \
GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP104)
#define NVGPU_GPUID_GP106 \
GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP106)
int gk20a_init_gpu_characteristics(struct gk20a *g); int gk20a_init_gpu_characteristics(struct gk20a *g);

View File

@@ -16,10 +16,8 @@
#include "gk20a.h" #include "gk20a.h"
#include "hal_gk20a.h" #include "hal_gk20a.h"
#include "gm20b/hal_gm20b.h" #include "gm20b/hal_gm20b.h"
#include "gp10b/hal_gp10b.h"
#ifdef CONFIG_ARCH_TEGRA_18x_SOC #include "gp106/hal_gp106.h"
#include "nvgpu_gpuid_t18x.h"
#endif
#ifdef CONFIG_TEGRA_19x_GPU #ifdef CONFIG_TEGRA_19x_GPU
#include "nvgpu_gpuid_t19x.h" #include "nvgpu_gpuid_t19x.h"
@@ -39,13 +37,13 @@ int gpu_init_hal(struct gk20a *g)
return -ENODEV; return -ENODEV;
break; break;
#if defined(CONFIG_ARCH_TEGRA_18x_SOC) #if defined(CONFIG_ARCH_TEGRA_18x_SOC)
case TEGRA_18x_GPUID: case NVGPU_GPUID_GP10B:
if (TEGRA_18x_GPUID_HAL(g)) if (gp10b_init_hal(g))
return -ENODEV; return -ENODEV;
break; break;
case TEGRA_18x_GPUID2: case NVGPU_GPUID_GP104:
case TEGRA_18x_GPUID3: case NVGPU_GPUID_GP106:
if (TEGRA_18x_GPUID2_HAL(g)) if (gp106_init_hal(g))
return -ENODEV; return -ENODEV;
break; break;
#endif #endif

View File

@@ -274,6 +274,7 @@ extern struct gk20a_platform gk20a_generic_platform;
#ifdef CONFIG_TEGRA_GK20A #ifdef CONFIG_TEGRA_GK20A
extern struct gk20a_platform gk20a_tegra_platform; extern struct gk20a_platform gk20a_tegra_platform;
extern struct gk20a_platform gm20b_tegra_platform; extern struct gk20a_platform gm20b_tegra_platform;
extern struct gk20a_platform gp10b_tegra_platform;
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
extern struct gk20a_platform vgpu_tegra_platform; extern struct gk20a_platform vgpu_tegra_platform;
#endif #endif

View File

@@ -34,10 +34,6 @@
#include <nvgpu/hw/gk20a/hw_pwr_gk20a.h> #include <nvgpu/hw/gk20a/hw_pwr_gk20a.h>
#include <nvgpu/hw/gk20a/hw_top_gk20a.h> #include <nvgpu/hw/gk20a/hw_top_gk20a.h>
#ifdef CONFIG_ARCH_TEGRA_18x_SOC
#include "nvgpu_gpuid_t18x.h"
#endif
#ifdef CONFIG_TEGRA_19x_GPU #ifdef CONFIG_TEGRA_19x_GPU
#include "nvgpu_gpuid_t19x.h" #include "nvgpu_gpuid_t19x.h"
#endif #endif
@@ -3707,13 +3703,11 @@ static u8 get_perfmon_id(struct pmu_gk20a *pmu)
case GK20A_GPUID_GM20B: case GK20A_GPUID_GM20B:
unit_id = PMU_UNIT_PERFMON; unit_id = PMU_UNIT_PERFMON;
break; break;
#if defined(CONFIG_ARCH_TEGRA_18x_SOC) case NVGPU_GPUID_GP10B:
case TEGRA_18x_GPUID: case NVGPU_GPUID_GP104:
case TEGRA_18x_GPUID2: case NVGPU_GPUID_GP106:
case TEGRA_18x_GPUID3:
unit_id = PMU_UNIT_PERFMON_T18X; unit_id = PMU_UNIT_PERFMON_T18X;
break; break;
#endif
#if defined(CONFIG_TEGRA_19x_GPU) #if defined(CONFIG_TEGRA_19x_GPU)
case TEGRA_19x_GPUID: case TEGRA_19x_GPUID:
unit_id = PMU_UNIT_PERFMON_T18X; unit_id = PMU_UNIT_PERFMON_T18X;

View File

@@ -31,7 +31,6 @@
#include "gp106/pmu_gp106.h" #include "gp106/pmu_gp106.h"
#include "sec2_gp106.h" #include "sec2_gp106.h"
#include "nvgpu_gpuid_t18x.h"
#include <nvgpu/hw/gp106/hw_psec_gp106.h> #include <nvgpu/hw/gp106/hw_psec_gp106.h>
#include <nvgpu/hw/gp106/hw_pwr_gp106.h> #include <nvgpu/hw/gp106/hw_pwr_gp106.h>

View File

@@ -15,7 +15,6 @@
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gr_ctx_gp106.h" #include "gr_ctx_gp106.h"
#include "nvgpu_gpuid_t18x.h"
static int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name) static int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name)
{ {

View File

@@ -52,8 +52,6 @@
#include "gp106/fb_gp106.h" #include "gp106/fb_gp106.h"
#include "gp106/gp106_gating_reglist.h" #include "gp106/gp106_gating_reglist.h"
#include "nvgpu_gpuid_t18x.h"
#include <nvgpu/hw/gp106/hw_proj_gp106.h> #include <nvgpu/hw/gp106/hw_proj_gp106.h>
static struct gpu_ops gp106_ops = { static struct gpu_ops gp106_ops = {

View File

@@ -401,7 +401,7 @@ static int gp10b_clk_get_freqs(struct device *dev,
return 0; return 0;
} }
struct gk20a_platform t18x_gpu_tegra_platform = { struct gk20a_platform gp10b_tegra_platform = {
.has_syncpoints = true, .has_syncpoints = true,
/* power management configuration */ /* power management configuration */

View File

@@ -1,45 +0,0 @@
/*
* NVIDIA GPU ID functions, definitions.
*
* Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef _NVGPU_GPUID_T18X_H_
#define _NVGPU_GPUID_T18X_H_
#define NVGPU_GPUID_GP10B \
GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP10B)
#define NVGPU_GPUID_GP104 \
GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP104)
#define NVGPU_GPUID_GP106 \
GK20A_GPUID(NVGPU_GPU_ARCH_GP100, NVGPU_GPU_IMPL_GP106)
#define NVGPU_COMPAT_TEGRA_GP10B "nvidia,tegra186-gp10b"
#define NVGPU_COMPAT_GENERIC_GP10B "nvidia,generic-gp10b"
#define TEGRA_18x_GPUID NVGPU_GPUID_GP10B
#define TEGRA_18x_GPUID_HAL gp10b_init_hal
#define TEGRA_18x_GPU_COMPAT_TEGRA NVGPU_COMPAT_TEGRA_GP10B
#define TEGRA_18x_GPU_COMPAT_GENERIC NVGPU_COMPAT_GENERIC_GP10B
#define TEGRA_18x_GPUID2 NVGPU_GPUID_GP104
#define TEGRA_18x_GPUID2_HAL gp106_init_hal
#define TEGRA_18x_GPUID3 NVGPU_GPUID_GP106
#define TEGRA_18x_GPUID3_HAL gp106_init_hal
struct gpu_ops;
extern int gp10b_init_hal(struct gk20a *);
extern int gp106_init_hal(struct gk20a *);
extern struct gk20a_platform t18x_gpu_tegra_platform;
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
#define TEGRA_18x_GPUID_VGPU_HAL vgpu_gp10b_init_hal
extern int vgpu_gp10b_init_hal(struct gk20a *);
#endif
#endif

View File

@@ -16,7 +16,6 @@
#include "vgpu_gr_gp10b.h" #include "vgpu_gr_gp10b.h"
#include "vgpu_fifo_gp10b.h" #include "vgpu_fifo_gp10b.h"
#include "vgpu_mm_gp10b.h" #include "vgpu_mm_gp10b.h"
#include "nvgpu_gpuid_t18x.h"
int vgpu_gp10b_init_hal(struct gk20a *g) int vgpu_gp10b_init_hal(struct gk20a *g)
{ {

View File

@@ -31,10 +31,6 @@
#include <nvgpu/hw/gk20a/hw_mc_gk20a.h> #include <nvgpu/hw/gk20a/hw_mc_gk20a.h>
#ifdef CONFIG_ARCH_TEGRA_18x_SOC
#include "nvgpu_gpuid_t18x.h"
#endif
static inline int vgpu_comm_init(struct platform_device *pdev) static inline int vgpu_comm_init(struct platform_device *pdev)
{ {
size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES }; size_t queue_sizes[] = { TEGRA_VGPU_QUEUE_SIZES };
@@ -374,11 +370,10 @@ static int vgpu_init_hal(struct gk20a *g)
gk20a_dbg_info("gm20b detected"); gk20a_dbg_info("gm20b detected");
err = vgpu_gm20b_init_hal(g); err = vgpu_gm20b_init_hal(g);
break; break;
#if defined(CONFIG_ARCH_TEGRA_18x_SOC) case NVGPU_GPUID_GP10B:
case TEGRA_18x_GPUID: gk20a_dbg_info("gp10b detected");
err = TEGRA_18x_GPUID_VGPU_HAL(g); err = vgpu_gp10b_init_hal(g);
break; break;
#endif
default: default:
gk20a_err(g->dev, "no support for %x", ver); gk20a_err(g->dev, "no support for %x", ver);
err = -ENODEV; err = -ENODEV;

View File

@@ -101,6 +101,7 @@ int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in,
void vgpu_init_hal_common(struct gk20a *g); void vgpu_init_hal_common(struct gk20a *g);
int vgpu_gk20a_init_hal(struct gk20a *g); int vgpu_gk20a_init_hal(struct gk20a *g);
int vgpu_gm20b_init_hal(struct gk20a *g); int vgpu_gm20b_init_hal(struct gk20a *g);
int vgpu_gp10b_init_hal(struct gk20a *g);
void vgpu_init_dbg_session_ops(struct gpu_ops *gops); void vgpu_init_dbg_session_ops(struct gpu_ops *gops);

View File

@@ -24,11 +24,6 @@
#ifndef _UAPI__LINUX_NVGPU_T18X_IOCTL_H_ #ifndef _UAPI__LINUX_NVGPU_T18X_IOCTL_H_
#define _UAPI__LINUX_NVGPU_T18X_IOCTL_H_ #define _UAPI__LINUX_NVGPU_T18X_IOCTL_H_
#define NVGPU_GPU_ARCH_GP100 0x00000130
#define NVGPU_GPU_IMPL_GP104 0x00000004
#define NVGPU_GPU_IMPL_GP106 0x00000006
#define NVGPU_GPU_IMPL_GP10B 0x0000000B
/* /*
* this flag is used in struct nvgpu_as_map_buffer_ex_args * this flag is used in struct nvgpu_as_map_buffer_ex_args
* to specify IO coherence * to specify IO coherence
@@ -70,5 +65,3 @@
#define NVGPU_IOCTL_CHANNEL_EVENT_ID_CILP_PREEMPTION_COMPLETE 4 #define NVGPU_IOCTL_CHANNEL_EVENT_ID_CILP_PREEMPTION_COMPLETE 4
#endif /* _UAPI__LINUX_NVGPU_T18X_IOCTL_H_ */ #endif /* _UAPI__LINUX_NVGPU_T18X_IOCTL_H_ */

View File

@@ -81,14 +81,17 @@ struct nvgpu_gpu_zbc_query_table_args {
/* This contains the minimal set by which the userspace can /* This contains the minimal set by which the userspace can
determine all the properties of the GPU */ determine all the properties of the GPU */
#define NVGPU_GPU_ARCH_GK100 0x000000E0 #define NVGPU_GPU_ARCH_GK100 0x000000E0
#define NVGPU_GPU_IMPL_GK20A 0x0000000A
#define NVGPU_GPU_ARCH_GM200 0x00000120 #define NVGPU_GPU_ARCH_GM200 0x00000120
#define NVGPU_GPU_ARCH_GP100 0x00000130
#define NVGPU_GPU_IMPL_GK20A 0x0000000A
#define NVGPU_GPU_IMPL_GM204 0x00000004 #define NVGPU_GPU_IMPL_GM204 0x00000004
#define NVGPU_GPU_IMPL_GM206 0x00000006 #define NVGPU_GPU_IMPL_GM206 0x00000006
#define NVGPU_GPU_IMPL_GM20B 0x0000000B #define NVGPU_GPU_IMPL_GM20B 0x0000000B
#define NVGPU_GPU_IMPL_GP104 0x00000004
#define NVGPU_GPU_IMPL_GP106 0x00000006
#define NVGPU_GPU_IMPL_GP10B 0x0000000B
#ifdef CONFIG_ARCH_TEGRA_18x_SOC #ifdef CONFIG_ARCH_TEGRA_18x_SOC
#include <linux/nvgpu-t18x.h> #include <linux/nvgpu-t18x.h>