From 82c0c96290602b1baf296133c7f55ae1848e433a Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 22 Jun 2017 12:58:43 -0700 Subject: gpu: nvgpu: Remove gk20a support Remove gk20a support. Leave only gk20a code which is reused by other GPUs. JIRA NVGPU-38 Change-Id: I3d5f2bc9f71cd9f161e64436561a5eadd5786a3b Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master/r/1507927 GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c | 47 --------------------------- drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h | 21 ------------ drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c | 29 ----------------- drivers/gpu/nvgpu/vgpu/vgpu.c | 5 --- drivers/gpu/nvgpu/vgpu/vgpu.h | 1 - 5 files changed, 103 deletions(-) delete mode 100644 drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c delete mode 100644 drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h delete mode 100644 drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c (limited to 'drivers/gpu/nvgpu/vgpu') diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c deleted file mode 100644 index 23da728e..00000000 --- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2015-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. - */ - -#include "gk20a/gk20a.h" -#include "vgpu_gr_gk20a.h" - -static int vgpu_gk20a_init_fs_state(struct gk20a *g) -{ - struct gr_gk20a *gr = &g->gr; - u32 tpc_index, gpc_index; - u32 sm_id = 0; - - gk20a_dbg_fn(""); - - for (tpc_index = 0; tpc_index < gr->max_tpc_per_gpc_count; - tpc_index++) { - for (gpc_index = 0; gpc_index < gr->gpc_count; gpc_index++) { - if (tpc_index < gr->gpc_tpc_count[gpc_index]) { - g->gr.sm_to_cluster[sm_id].tpc_index = - tpc_index; - g->gr.sm_to_cluster[sm_id].gpc_index = - gpc_index; - - sm_id++; - } - } - } - - gr->no_of_sm = sm_id; - - return 0; -} - -void vgpu_gk20a_init_gr_ops(struct gpu_ops *gops) -{ - gops->gr.init_fs_state = vgpu_gk20a_init_fs_state; -} diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h deleted file mode 100644 index bb80aff8..00000000 --- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2015, 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 __VGPU_GR_GK20A_H__ -#define __VGPU_GR_GK20A_H__ - -#include "gk20a/gk20a.h" - -void vgpu_gk20a_init_gr_ops(struct gpu_ops *gops); - -#endif diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c deleted file mode 100644 index aeeb2ad9..00000000 --- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_hal_gk20a.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -#include "gk20a/hal_gk20a.h" -#include "vgpu/vgpu.h" -#include "vgpu_gr_gk20a.h" - -int vgpu_gk20a_init_hal(struct gk20a *g) -{ - int err; - - err = gk20a_init_hal(g); - if (err) - return err; - vgpu_init_hal_common(g); - vgpu_gk20a_init_gr_ops(&g->ops); - - return 0; -} diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index c4647e29..d41c0abb 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -29,7 +29,6 @@ #include "vgpu/vgpu.h" #include "vgpu/fecs_trace_vgpu.h" #include "vgpu/clk_vgpu.h" -#include "gk20a/hal_gk20a.h" #include "gk20a/ctxsw_trace_gk20a.h" #include "gk20a/tsg_gk20a.h" #include "gk20a/gk20a_scale.h" @@ -451,10 +450,6 @@ static int vgpu_init_hal(struct gk20a *g) int err; switch (ver) { - case GK20A_GPUID_GK20A: - gk20a_dbg_info("gk20a detected"); - err = vgpu_gk20a_init_hal(g); - break; case GK20A_GPUID_GM20B: case GK20A_GPUID_GM20B_B: gk20a_dbg_info("gm20b detected"); diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h index ec04c6f7..31ecb737 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/vgpu/vgpu.h @@ -102,7 +102,6 @@ int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, size_t size_out); void vgpu_init_hal_common(struct gk20a *g); -int vgpu_gk20a_init_hal(struct gk20a *g); int vgpu_gm20b_init_hal(struct gk20a *g); int vgpu_gp10b_init_hal(struct gk20a *g); -- cgit v1.2.2