gpu: nvgpu: Remove redundant HAL from common.fbp

common.fbp has two interfaces to initialize FBP:
1. Public API nvgpu_fbp_init_support
2. HAL fbp.fbp_init_support

nvgpu_fbp_init_support() is only used to initialize HAL
fbp.fbp_init_support. Remove the HAL and use the API directly.

JIRA NVGPU-6644

Change-Id: I2c455e09dbcf5e4fb1dc370b284e4f0d5c678b40
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2592047
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Tejal Kudav
2021-09-09 11:28:33 +00:00
committed by mobile promotions
parent 794d1edbe4
commit 5a94007725
13 changed files with 3 additions and 95 deletions

View File

@@ -581,8 +581,7 @@ fbp:
owner: Deepak N owner: Deepak N
sources: [ common/fbp/fbp.c, sources: [ common/fbp/fbp.c,
common/fbp/fbp_priv.h, common/fbp/fbp_priv.h,
include/nvgpu/fbp.h, include/nvgpu/fbp.h ]
include/nvgpu/gops/fbp.h ]
init: init:
safe: yes safe: yes

View File

@@ -51,6 +51,7 @@
#endif #endif
#include <nvgpu/cic_mon.h> #include <nvgpu/cic_mon.h>
#include <nvgpu/cic_rm.h> #include <nvgpu/cic_rm.h>
#include <nvgpu/fbp.h>
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
@@ -715,7 +716,7 @@ static int nvgpu_early_init(struct gk20a *g)
NVGPU_INIT_TABLE_ENTRY(g->ops.fifo.reset_enable_hw, NO_FLAG), NVGPU_INIT_TABLE_ENTRY(g->ops.fifo.reset_enable_hw, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(&nvgpu_init_fb_support, NO_FLAG), NVGPU_INIT_TABLE_ENTRY(&nvgpu_init_fb_support, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.ltc.init_ltc_support, NO_FLAG), NVGPU_INIT_TABLE_ENTRY(g->ops.ltc.init_ltc_support, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.fbp.fbp_init_support, NO_FLAG), NVGPU_INIT_TABLE_ENTRY(nvgpu_fbp_init_support, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.grmgr.init_gr_manager, NO_FLAG), NVGPU_INIT_TABLE_ENTRY(g->ops.grmgr.init_gr_manager, NO_FLAG),
}; };

View File

@@ -31,7 +31,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/fuse.h> #include <nvgpu/fuse.h>
@@ -1592,12 +1591,6 @@ static const struct gops_falcon ga100_ops_falcon = {
}; };
#endif #endif
#ifdef CONFIG_NVGPU_LS_PMU
static const struct gops_fbp ga100_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
#endif
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
static const struct gops_priv_ring ga100_ops_priv_ring = { static const struct gops_priv_ring ga100_ops_priv_ring = {
.enable_priv_ring = gm20b_priv_ring_enable, .enable_priv_ring = gm20b_priv_ring_enable,
@@ -1807,7 +1800,6 @@ int ga100_init_hal(struct gk20a *g)
#endif #endif
gops->xve = ga100_ops_xve; gops->xve = ga100_ops_xve;
gops->falcon = ga100_ops_falcon; gops->falcon = ga100_ops_falcon;
gops->fbp = ga100_ops_fbp;
gops->priv_ring = ga100_ops_priv_ring; gops->priv_ring = ga100_ops_priv_ring;
gops->fuse = ga100_ops_fuse; gops->fuse = ga100_ops_fuse;
#if defined(CONFIG_NVGPU_NVLINK) #if defined(CONFIG_NVGPU_NVLINK)

View File

@@ -32,7 +32,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/fuse.h> #include <nvgpu/fuse.h>
@@ -1570,10 +1569,6 @@ static const struct gops_falcon ga10b_ops_falcon = {
#endif #endif
}; };
static const struct gops_fbp ga10b_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
static const struct gops_priv_ring ga10b_ops_priv_ring = { static const struct gops_priv_ring ga10b_ops_priv_ring = {
.enable_priv_ring = gm20b_priv_ring_enable, .enable_priv_ring = gm20b_priv_ring_enable,
.isr = gp10b_priv_ring_isr, .isr = gp10b_priv_ring_isr,
@@ -1746,7 +1741,6 @@ int ga10b_init_hal(struct gk20a *g)
#endif #endif
gops->falcon = ga10b_ops_falcon; gops->falcon = ga10b_ops_falcon;
gops->gsp = ga10b_ops_gsp; gops->gsp = ga10b_ops_gsp;
gops->fbp = ga10b_ops_fbp;
gops->priv_ring = ga10b_ops_priv_ring; gops->priv_ring = ga10b_ops_priv_ring;
gops->fuse = ga10b_ops_fuse; gops->fuse = ga10b_ops_fuse;
gops->top = ga10b_ops_top; gops->top = ga10b_ops_top;

View File

@@ -53,7 +53,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/grmgr.h> #include <nvgpu/grmgr.h>
@@ -1013,10 +1012,6 @@ static const struct gops_falcon gm20b_ops_falcon = {
#endif #endif
}; };
static const struct gops_fbp gm20b_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
static const struct gops_priv_ring gm20b_ops_priv_ring = { static const struct gops_priv_ring gm20b_ops_priv_ring = {
.enable_priv_ring = gm20b_priv_ring_enable, .enable_priv_ring = gm20b_priv_ring_enable,
.isr = gm20b_priv_ring_isr, .isr = gm20b_priv_ring_isr,
@@ -1180,7 +1175,6 @@ int gm20b_init_hal(struct gk20a *g)
gops->css = gm20b_ops_css; gops->css = gm20b_ops_css;
#endif #endif
gops->falcon = gm20b_ops_falcon; gops->falcon = gm20b_ops_falcon;
gops->fbp = gm20b_ops_fbp;
gops->priv_ring = gm20b_ops_priv_ring; gops->priv_ring = gm20b_ops_priv_ring;
gops->fuse = gm20b_ops_fuse; gops->fuse = gm20b_ops_fuse;
gops->top = gm20b_ops_top; gops->top = gm20b_ops_top;

View File

@@ -53,7 +53,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/grmgr.h> #include <nvgpu/grmgr.h>
@@ -1107,10 +1106,6 @@ static const struct gops_falcon gp10b_ops_falcon = {
#endif #endif
}; };
static const struct gops_fbp gp10b_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
static const struct gops_priv_ring gp10b_ops_priv_ring = { static const struct gops_priv_ring gp10b_ops_priv_ring = {
.enable_priv_ring = gm20b_priv_ring_enable, .enable_priv_ring = gm20b_priv_ring_enable,
.isr = gp10b_priv_ring_isr, .isr = gp10b_priv_ring_isr,
@@ -1270,7 +1265,6 @@ int gp10b_init_hal(struct gk20a *g)
gops->css = gp10b_ops_css; gops->css = gp10b_ops_css;
#endif #endif
gops->falcon = gp10b_ops_falcon; gops->falcon = gp10b_ops_falcon;
gops->fbp = gp10b_ops_fbp;
gops->priv_ring = gp10b_ops_priv_ring; gops->priv_ring = gp10b_ops_priv_ring;
gops->fuse = gp10b_ops_fuse; gops->fuse = gp10b_ops_fuse;
gops->top = gp10b_ops_top; gops->top = gp10b_ops_top;

View File

@@ -30,7 +30,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/fuse.h> #include <nvgpu/fuse.h>
@@ -1385,10 +1384,6 @@ static const struct gops_falcon gv11b_ops_falcon = {
#endif #endif
}; };
static const struct gops_fbp gv11b_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
static const struct gops_priv_ring gv11b_ops_priv_ring = { static const struct gops_priv_ring gv11b_ops_priv_ring = {
.enable_priv_ring = gm20b_priv_ring_enable, .enable_priv_ring = gm20b_priv_ring_enable,
.isr = gp10b_priv_ring_isr, .isr = gp10b_priv_ring_isr,
@@ -1553,7 +1548,6 @@ int gv11b_init_hal(struct gk20a *g)
gops->css = gv11b_ops_css; gops->css = gv11b_ops_css;
#endif #endif
gops->falcon = gv11b_ops_falcon; gops->falcon = gv11b_ops_falcon;
gops->fbp = gv11b_ops_fbp;
gops->priv_ring = gv11b_ops_priv_ring; gops->priv_ring = gv11b_ops_priv_ring;
gops->fuse = gv11b_ops_fuse; gops->fuse = gv11b_ops_fuse;
gops->top = gv11b_ops_top; gops->top = gv11b_ops_top;

View File

@@ -220,7 +220,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/class.h> #include <nvgpu/class.h>
@@ -1483,12 +1482,6 @@ static const struct gops_falcon tu104_ops_falcon = {
}; };
#endif #endif
#ifdef CONFIG_NVGPU_LS_PMU
static const struct gops_fbp tu104_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
#endif
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
static const struct gops_priv_ring tu104_ops_priv_ring = { static const struct gops_priv_ring tu104_ops_priv_ring = {
.enable_priv_ring = gm20b_priv_ring_enable, .enable_priv_ring = gm20b_priv_ring_enable,
@@ -1736,7 +1729,6 @@ int tu104_init_hal(struct gk20a *g)
#endif #endif
gops->xve = tu104_ops_xve; gops->xve = tu104_ops_xve;
gops->falcon = tu104_ops_falcon; gops->falcon = tu104_ops_falcon;
gops->fbp = tu104_ops_fbp;
gops->priv_ring = tu104_ops_priv_ring; gops->priv_ring = tu104_ops_priv_ring;
gops->fuse = tu104_ops_fuse; gops->fuse = tu104_ops_fuse;
#if defined(CONFIG_NVGPU_NVLINK) #if defined(CONFIG_NVGPU_NVLINK)

View File

@@ -126,7 +126,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/grmgr.h> #include <nvgpu/grmgr.h>
@@ -1013,10 +1012,6 @@ static const struct gops_falcon vgpu_ga10b_ops_falcon = {
.falcon_sw_free = nvgpu_falcon_sw_free, .falcon_sw_free = nvgpu_falcon_sw_free,
}; };
static const struct gops_fbp vgpu_ga10b_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
static const struct gops_priv_ring vgpu_ga10b_ops_priv_ring = { static const struct gops_priv_ring vgpu_ga10b_ops_priv_ring = {
.enable_priv_ring = NULL, .enable_priv_ring = NULL,
.isr = NULL, .isr = NULL,
@@ -1147,7 +1142,6 @@ int vgpu_ga10b_init_hal(struct gk20a *g)
gops->css = vgpu_ga10b_ops_css; gops->css = vgpu_ga10b_ops_css;
#endif #endif
gops->falcon = vgpu_ga10b_ops_falcon; gops->falcon = vgpu_ga10b_ops_falcon;
gops->fbp = vgpu_ga10b_ops_fbp;
gops->priv_ring = vgpu_ga10b_ops_priv_ring; gops->priv_ring = vgpu_ga10b_ops_priv_ring;
gops->fuse = vgpu_ga10b_ops_fuse; gops->fuse = vgpu_ga10b_ops_fuse;
gops->top = vgpu_ga10b_ops_top; gops->top = vgpu_ga10b_ops_top;

View File

@@ -110,7 +110,6 @@
#ifdef CONFIG_NVGPU_LS_PMU #ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h> #include <nvgpu/pmu/pmu_pstate.h>
#endif #endif
#include <nvgpu/fbp.h>
#include <nvgpu/therm.h> #include <nvgpu/therm.h>
#include <nvgpu/clk_arb.h> #include <nvgpu/clk_arb.h>
#include <nvgpu/grmgr.h> #include <nvgpu/grmgr.h>
@@ -982,10 +981,6 @@ static const struct gops_falcon vgpu_gv11b_ops_falcon = {
.falcon_sw_free = nvgpu_falcon_sw_free, .falcon_sw_free = nvgpu_falcon_sw_free,
}; };
static const struct gops_fbp vgpu_gv11b_ops_fbp = {
.fbp_init_support = nvgpu_fbp_init_support,
};
static const struct gops_priv_ring vgpu_gv11b_ops_priv_ring = { static const struct gops_priv_ring vgpu_gv11b_ops_priv_ring = {
.enable_priv_ring = NULL, .enable_priv_ring = NULL,
.isr = NULL, .isr = NULL,
@@ -1110,7 +1105,6 @@ int vgpu_gv11b_init_hal(struct gk20a *g)
gops->css = vgpu_gv11b_ops_css; gops->css = vgpu_gv11b_ops_css;
#endif #endif
gops->falcon = vgpu_gv11b_ops_falcon; gops->falcon = vgpu_gv11b_ops_falcon;
gops->fbp = vgpu_gv11b_ops_fbp;
gops->priv_ring = vgpu_gv11b_ops_priv_ring; gops->priv_ring = vgpu_gv11b_ops_priv_ring;
gops->fuse = vgpu_gv11b_ops_fuse; gops->fuse = vgpu_gv11b_ops_fuse;
gops->top = vgpu_gv11b_ops_top; gops->top = vgpu_gv11b_ops_top;

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef NVGPU_GOPS_FBP_H
#define NVGPU_GOPS_FBP_H
/**
* @brief fbp gops.
*
* The structure contains function pointers to fbp initialization. The details
* of this callback is described in the assigned function to this func pointer.
*/
struct gops_fbp {
/** Read and initialize FBP configuration information. */
int (*fbp_init_support)(struct gk20a *g);
};
#endif /* NVGPU_GOPS_FBP_H */

View File

@@ -30,7 +30,6 @@
#include <nvgpu/gops/debugger.h> #include <nvgpu/gops/debugger.h>
#include <nvgpu/gops/profiler.h> #include <nvgpu/gops/profiler.h>
#include <nvgpu/gops/cyclestats.h> #include <nvgpu/gops/cyclestats.h>
#include <nvgpu/gops/fbp.h>
#include <nvgpu/gops/floorsweep.h> #include <nvgpu/gops/floorsweep.h>
#include <nvgpu/gops/sbr.h> #include <nvgpu/gops/sbr.h>
#include <nvgpu/gops/func.h> #include <nvgpu/gops/func.h>
@@ -187,8 +186,6 @@ struct gpu_ops {
#endif #endif
/** Falcon hal ops. */ /** Falcon hal ops. */
struct gops_falcon falcon; struct gops_falcon falcon;
/** Fbp hal ops. */
struct gops_fbp fbp;
/** Priv ring hal ops. */ /** Priv ring hal ops. */
struct gops_priv_ring priv_ring; struct gops_priv_ring priv_ring;
/** Top hal ops. */ /** Top hal ops. */

View File

@@ -403,7 +403,6 @@ static void set_poweron_funcs_success(struct gk20a *g)
setup_simple_init_func_success(&g->ops.mm.init_mm_support, i++); setup_simple_init_func_success(&g->ops.mm.init_mm_support, i++);
setup_simple_init_func_success(&g->ops.fifo.fifo_init_support, i++); setup_simple_init_func_success(&g->ops.fifo.fifo_init_support, i++);
setup_simple_init_func_success(&g->ops.therm.elcg_init_idle_filters, i++); setup_simple_init_func_success(&g->ops.therm.elcg_init_idle_filters, i++);
setup_simple_init_func_success(&g->ops.fbp.fbp_init_support, i++);
setup_simple_init_func_success(&g->ops.gr.gr_init_support, i++); setup_simple_init_func_success(&g->ops.gr.gr_init_support, i++);
setup_simple_init_func_success(&g->ops.ecc.ecc_finalize_support, i++); setup_simple_init_func_success(&g->ops.ecc.ecc_finalize_support, i++);
setup_simple_init_func_success(&g->ops.therm.init_therm_support, i++); setup_simple_init_func_success(&g->ops.therm.init_therm_support, i++);