gpu: nvgpu: remove fecs_size from gr.ctx_vars struct

common.gr.fecs_trace API already exposes API
nvgpu_gr_fecs_trace_buffer_size() to get fecs trace buffer size and
hence we don't need to store the size in gr.ctx_vars struct

Use nvgpu_gr_fecs_trace_buffer_size() wherever we need size and remove
the variable from gr.ctx_vars struct

Jira NVGPU-3112

Change-Id: I2afe22ef0910a63d854f2a232017861ab91611bc
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2096157
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2019-04-11 17:27:31 +05:30
committed by mobile promotions
parent d16c164863
commit 2c1218d006
4 changed files with 8 additions and 19 deletions

View File

@@ -22,6 +22,7 @@
#include <nvgpu/gk20a.h>
#include <nvgpu/io.h>
#include <nvgpu/unit.h>
#include <nvgpu/gr/gr.h>
#include <nvgpu/gr/config.h>
#include <nvgpu/gr/zbc.h>
@@ -29,10 +30,10 @@
#include <nvgpu/netlist.h>
#include <nvgpu/gr/gr_falcon.h>
#include <nvgpu/gr/ctx.h>
#include <nvgpu/unit.h>
#include <nvgpu/gr/hwpm_map.h>
#include <nvgpu/gr/obj_ctx.h>
#include <nvgpu/gr/fs_state.h>
#include <nvgpu/gr/fecs_trace.h>
#include <nvgpu/power_features/cg.h>
static int gr_alloc_global_ctx_buffers(struct gk20a *g)
@@ -77,12 +78,11 @@ static int gr_alloc_global_ctx_buffers(struct gk20a *g)
gr->ctx_vars.priv_access_map_size);
#ifdef CONFIG_GK20A_CTXSW_TRACE
nvgpu_log_info(g, "fecs_trace_buffer_size : %d",
gr->ctx_vars.fecs_trace_buffer_size);
size = nvgpu_gr_fecs_trace_buffer_size(g);
nvgpu_log_info(g, "fecs_trace_buffer_size : %d", size);
nvgpu_gr_global_ctx_set_size(gr->global_ctx_buffer,
NVGPU_GR_GLOBAL_CTX_FECS_TRACE_BUFFER,
gr->ctx_vars.fecs_trace_buffer_size);
NVGPU_GR_GLOBAL_CTX_FECS_TRACE_BUFFER, size);
#endif
if (g->ops.gr.init.get_rtv_cb_size != NULL) {

View File

@@ -26,7 +26,6 @@
#include <nvgpu/enabled.h>
#include <nvgpu/debug.h>
#include <nvgpu/gr/hwpm_map.h>
#include <nvgpu/gr/fecs_trace.h>
#include <nvgpu/firmware.h>
#include <nvgpu/sizes.h>
#include <nvgpu/mm.h>
@@ -136,10 +135,6 @@ int nvgpu_gr_falcon_init_ctx_state(struct gk20a *g)
}
g->gr.ctx_vars.priv_access_map_size = 512 * 1024;
#ifdef CONFIG_GK20A_CTXSW_TRACE
g->gr.ctx_vars.fecs_trace_buffer_size =
nvgpu_gr_fecs_trace_buffer_size(g);
#endif
}
out:

View File

@@ -150,9 +150,6 @@ int vgpu_gr_init_ctx_state(struct gk20a *g)
}
g->gr.ctx_vars.priv_access_map_size = 512 * 1024;
#ifdef CONFIG_GK20A_CTXSW_TRACE
g->gr.ctx_vars.fecs_trace_buffer_size = nvgpu_gr_fecs_trace_buffer_size(g);
#endif
g->gr.ctx_vars.preempt_image_size =
priv->constants.preempt_ctx_size;
@@ -203,12 +200,11 @@ int vgpu_gr_alloc_global_ctx_buffers(struct gk20a *g)
gr->ctx_vars.priv_access_map_size);
#ifdef CONFIG_GK20A_CTXSW_TRACE
nvgpu_log_info(g, "fecs_trace_buffer_size : %d",
gr->ctx_vars.fecs_trace_buffer_size);
size = nvgpu_gr_fecs_trace_buffer_size(g);
nvgpu_log_info(g, "fecs_trace_buffer_size : %d", size);
nvgpu_gr_global_ctx_set_size(gr->global_ctx_buffer,
NVGPU_GR_GLOBAL_CTX_FECS_TRACE_BUFFER,
gr->ctx_vars.fecs_trace_buffer_size);
NVGPU_GR_GLOBAL_CTX_FECS_TRACE_BUFFER, size);
#endif
return 0;
}

View File

@@ -132,8 +132,6 @@ struct gr_gk20a {
u32 priv_access_map_size;
u32 fecs_trace_buffer_size;
u32 preempt_image_size;
bool force_preemption_gfxp;
bool force_preemption_cilp;