mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add hal.gr.falcon hal to invalidate current_ctx
Add new hal g->ops.gr.falcon.set_current_ctx_invalid() in hal.gr.falcon unit to invalidate current_ctx by setting invalid flag in register gr_fecs_current_ctx_r() Use new hal in gr_gk20a_init_golden_ctx_image() instead of accessing the register directly Define the hal for all supported chips Jira NVGPU-2961 Change-Id: I756dac505c661ea2754abdbf6934927d1b469be3 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2085032 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f1402db43f
commit
953820679d
@@ -806,8 +806,7 @@ restore_fe_go_idle:
|
||||
|
||||
gr->ctx_vars.golden_image_initialized = true;
|
||||
|
||||
gk20a_writel(g, gr_fecs_current_ctx_r(),
|
||||
gr_fecs_current_ctx_valid_false_f());
|
||||
g->ops.gr.falcon.set_current_ctx_invalid(g);
|
||||
|
||||
clean_up:
|
||||
if (err != 0) {
|
||||
|
||||
@@ -484,6 +484,8 @@ static const struct gpu_ops gm20b_ops = {
|
||||
.falcon = {
|
||||
.fecs_base_addr = gm20b_gr_falcon_fecs_base_addr,
|
||||
.gpccs_base_addr = gm20b_gr_falcon_gpccs_base_addr,
|
||||
.set_current_ctx_invalid =
|
||||
gm20b_gr_falcon_set_current_ctx_invalid,
|
||||
.dump_stats = gm20b_gr_falcon_fecs_dump_stats,
|
||||
.fecs_ctxsw_mailbox_size =
|
||||
gm20b_gr_falcon_get_fecs_ctxsw_mailbox_size,
|
||||
|
||||
@@ -569,6 +569,8 @@ static const struct gpu_ops gp10b_ops = {
|
||||
.falcon = {
|
||||
.fecs_base_addr = gm20b_gr_falcon_fecs_base_addr,
|
||||
.gpccs_base_addr = gm20b_gr_falcon_gpccs_base_addr,
|
||||
.set_current_ctx_invalid =
|
||||
gm20b_gr_falcon_set_current_ctx_invalid,
|
||||
.dump_stats = gm20b_gr_falcon_fecs_dump_stats,
|
||||
.fecs_ctxsw_mailbox_size =
|
||||
gm20b_gr_falcon_get_fecs_ctxsw_mailbox_size,
|
||||
|
||||
@@ -713,6 +713,8 @@ static const struct gpu_ops gv100_ops = {
|
||||
.falcon = {
|
||||
.fecs_base_addr = gm20b_gr_falcon_fecs_base_addr,
|
||||
.gpccs_base_addr = gm20b_gr_falcon_gpccs_base_addr,
|
||||
.set_current_ctx_invalid =
|
||||
gm20b_gr_falcon_set_current_ctx_invalid,
|
||||
.dump_stats = gm20b_gr_falcon_fecs_dump_stats,
|
||||
.fecs_ctxsw_mailbox_size =
|
||||
gm20b_gr_falcon_get_fecs_ctxsw_mailbox_size,
|
||||
|
||||
@@ -672,6 +672,8 @@ static const struct gpu_ops gv11b_ops = {
|
||||
.falcon = {
|
||||
.fecs_base_addr = gm20b_gr_falcon_fecs_base_addr,
|
||||
.gpccs_base_addr = gm20b_gr_falcon_gpccs_base_addr,
|
||||
.set_current_ctx_invalid =
|
||||
gm20b_gr_falcon_set_current_ctx_invalid,
|
||||
.dump_stats = gm20b_gr_falcon_fecs_dump_stats,
|
||||
.fecs_ctxsw_mailbox_size =
|
||||
gm20b_gr_falcon_get_fecs_ctxsw_mailbox_size,
|
||||
|
||||
@@ -456,3 +456,10 @@ u32 gm20b_gr_falcon_get_fecs_ctxsw_mailbox_size(void)
|
||||
{
|
||||
return gr_fecs_ctxsw_mailbox__size_1_v();
|
||||
}
|
||||
|
||||
void gm20b_gr_falcon_set_current_ctx_invalid(struct gk20a *g)
|
||||
{
|
||||
nvgpu_writel(g, gr_fecs_current_ctx_r(),
|
||||
gr_fecs_current_ctx_valid_false_f());
|
||||
}
|
||||
|
||||
|
||||
@@ -54,4 +54,6 @@ void gm20b_gr_falcon_load_ctxsw_ucode_boot(struct gk20a *g,
|
||||
u32 reg_offset, u32 boot_entry, u32 addr_load32, u32 blocks,
|
||||
u32 dst);
|
||||
|
||||
void gm20b_gr_falcon_set_current_ctx_invalid(struct gk20a *g);
|
||||
|
||||
#endif /* NVGPU_GR_FALCON_GM20B_H */
|
||||
|
||||
@@ -559,6 +559,7 @@ struct gpu_ops {
|
||||
struct {
|
||||
u32 (*fecs_base_addr)(void);
|
||||
u32 (*gpccs_base_addr)(void);
|
||||
void (*set_current_ctx_invalid)(struct gk20a *g);
|
||||
void (*dump_stats)(struct gk20a *g);
|
||||
u32 (*fecs_ctxsw_mailbox_size)(void);
|
||||
u32 (*get_fecs_ctx_state_store_major_rev_id)(
|
||||
|
||||
@@ -746,6 +746,8 @@ static const struct gpu_ops tu104_ops = {
|
||||
.falcon = {
|
||||
.fecs_base_addr = gm20b_gr_falcon_fecs_base_addr,
|
||||
.gpccs_base_addr = gm20b_gr_falcon_gpccs_base_addr,
|
||||
.set_current_ctx_invalid =
|
||||
gm20b_gr_falcon_set_current_ctx_invalid,
|
||||
.dump_stats = gm20b_gr_falcon_fecs_dump_stats,
|
||||
.fecs_ctxsw_mailbox_size =
|
||||
gm20b_gr_falcon_get_fecs_ctxsw_mailbox_size,
|
||||
|
||||
Reference in New Issue
Block a user