From f3f14cdff53f4b936e2505d44aad6e3bca143056 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 17 Jan 2018 12:39:13 -0800 Subject: gpu: nvgpu: Fold T19x code back to main code paths Lots of code paths were split to T19x specific code paths and structs due to split repository. Now that repositories are merged, fold all of them back to main code paths and structs and remove the T19x specific Kconfig flag. Change-Id: Id0d17a5f0610fc0b49f51ab6664e716dc8b222b6 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1640606 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c | 2 -- .../nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c | 7 +++---- drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c | 6 +++--- drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c | 3 +-- drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | 3 +-- drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c | 6 +++--- drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c | 10 ++-------- 7 files changed, 13 insertions(+), 24 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/vgpu') diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c index d343da03..5e880261 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_mm_gp10b.c @@ -169,10 +169,8 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, p->flags = TEGRA_VGPU_MAP_CACHEABLE; if (flags & NVGPU_VM_MAP_IO_COHERENT) p->flags |= TEGRA_VGPU_MAP_IO_COHERENT; -#ifdef CONFIG_TEGRA_19x_GPU if (flags & NVGPU_VM_MAP_L3_ALLOC) p->flags |= TEGRA_VGPU_MAP_L3_ALLOC; -#endif p->prot = prot; p->ctag_offset = ctag_offset; p->clear_ctags = clear_ctags; diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c index 3b9d63e8..4d796f67 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2018, 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, @@ -20,7 +20,6 @@ #include "common/linux/os_linux.h" #include -#include #include @@ -44,12 +43,12 @@ static int gv11b_vgpu_probe(struct device *dev) dev_err(dev, "failed to map usermode regs\n"); return PTR_ERR(regs); } - l->t19x.usermode_regs = regs; + l->usermode_regs = regs; #ifdef CONFIG_TEGRA_GK20A_NVHOST ret = nvgpu_get_nvhost_dev(g); if (ret) { - l->t19x.usermode_regs = NULL; + l->usermode_regs = NULL; return ret; } diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c index 475036ee..134ca67a 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2018, 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, @@ -18,7 +18,7 @@ #include "common/linux/vgpu/vgpu.h" #include "gv11b/fifo_gv11b.h" -#include +#include #include @@ -99,7 +99,7 @@ int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g) struct fifo_gk20a *f = &g->fifo; struct vgpu_priv_data *priv = vgpu_get_priv_data(g); - f->t19x.max_subctx_count = priv->constants.max_subctx_count; + f->max_subctx_count = priv->constants.max_subctx_count; return 0; } diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c index 93e26541..749e9e81 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2018, 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, @@ -17,7 +17,6 @@ #include "gk20a/gk20a.h" #include -#include #include "common/linux/vgpu/vgpu.h" #include "vgpu_gv11b.h" diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c index d205f039..88d6bde0 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c @@ -68,8 +68,7 @@ #include #include #include - -#include +#include #include diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c index c2e01218..8b060b24 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2017-2018, 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, @@ -38,8 +38,8 @@ int vgpu_gv11b_tsg_bind_channel(struct tsg_gk20a *tsg, msg.handle = vgpu_get_handle(tsg->g); p->tsg_id = tsg->tsgid; p->ch_handle = ch->virt_ctx; - p->subctx_id = ch->t19x.subctx_id; - p->runqueue_sel = ch->t19x.runqueue_sel; + p->subctx_id = ch->subctx_id; + p->runqueue_sel = ch->runqueue_sel; err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); err = err ? err : msg.ret; if (err) { diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c index d0c9e66d..cdf3ef1c 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c @@ -1,7 +1,7 @@ /* * Virtualized GPU * - * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018, 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, @@ -47,10 +47,6 @@ #include "common/linux/scale.h" #include "common/linux/driver_common.h" -#ifdef CONFIG_TEGRA_19x_GPU -#include -#endif - #include static inline int vgpu_comm_init(struct platform_device *pdev) @@ -436,11 +432,9 @@ static int vgpu_init_hal(struct gk20a *g) gk20a_dbg_info("gp10b detected"); err = vgpu_gp10b_init_hal(g); break; -#ifdef CONFIG_TEGRA_19x_GPU - case TEGRA_19x_GPUID: + case NVGPU_GPUID_GV11B: err = vgpu_gv11b_init_hal(g); break; -#endif default: nvgpu_err(g, "no support for %x", ver); err = -ENODEV; -- cgit v1.2.2