gpu: nvgpu: Reduce allow/disallow in stall_isr

With the existing implemenatation ELPG was disabled and
enabled once for handling stall isr and then again ELPG is
disabled and aenabled for writing to gr retrigger register.
This increased number of ELPG cycles and degraded perf of various
graphics test with ELPG enabled.

This change now disables ELPG, then handles stall_isr and
write to gr retrigger register and then enables ELPG.
Thus, number of ELPG cycles are reduced.

Bug 3451615

Change-Id: Iadac0c7b01eb711878280cd1503ba0f26000937c
Signed-off-by: Divya <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2638175
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Divya
2021-12-07 17:43:32 +00:00
committed by mobile promotions
parent ffb7e1f5ec
commit 4c2e2bb0b9

View File

@@ -711,20 +711,36 @@ static void ga10b_intr_isr_stall_host2soc_2(struct gk20a *g)
static int ga10b_intr_gr_stall_isr(struct gk20a *g) static int ga10b_intr_gr_stall_isr(struct gk20a *g)
{ {
int err; int err = 0;
err = nvgpu_pg_elpg_protected_call(g, g->ops.gr.intr.stall_isr(g)); #ifdef CONFIG_NVGPU_POWER_PG
/* Disable ELPG before handling stall isr */
err = nvgpu_pg_elpg_disable(g);
if (err != 0) {
nvgpu_err(g, "ELPG disable failed."
"Going ahead with stall_isr handling");
}
#endif
/* handle stall isr */
err = g->ops.gr.intr.stall_isr(g);
if (err != 0) { if (err != 0) {
nvgpu_err(g, "GR intr stall_isr failed"); nvgpu_err(g, "GR intr stall_isr failed");
return err; return err;
} }
err = nvgpu_pg_elpg_protected_call(g, g->ops.gr.intr.retrigger(g)); err = g->ops.gr.intr.retrigger(g);
if (err != 0) { if (err != 0) {
nvgpu_err(g, "GR intr retrigger failed"); nvgpu_err(g, "GR intr retrigger failed");
return err; return err;
} }
#ifdef CONFIG_NVGPU_POWER_PG
/* enable elpg again */
err = nvgpu_pg_elpg_enable(g);
if (err != 0) {
nvgpu_err(g, "ELPG enable failed.");
}
#endif
return err; return err;
} }