Engine recovery used to tear down PMU and then restore its state.
This was required as PMU initialisation had steps that affected GR
and FECS. Currently, that part of initialisation is separated from
the bootup part and hence we can also simplify engine recovery.
This patch modifies the recovery routine so that we
1) disable only ELPG
2) recover engines
3) do second stage init for PMU (this includes GR and FECS parts)
4) Re-enable ELPG
Change-Id: I5e3409a7cecbc38b2e43cb11410592ddc9dbc501
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/327163
struct gk20a *g = f->g;
int i;
- gk20a_init_pmu_support(g);
+ /* Reinitialise FECS and GR */
+ gk20a_init_pmu_setup_hw2(g);
+
+ /* It is safe to enable ELPG again. */
+ gk20a_pmu_enable_elpg(g);
/* Restore the runlist */
for (i = 0; i < g->fifo.max_runlists; i++)
g->fifo.deferred_reset_pending = false;
- /* PMU does not survive GR reset. */
- gk20a_pmu_destroy(g);
+ /* Disable ELPG */
+ gk20a_pmu_disable_elpg(g);
/* If we have recovery in progress, MMU fault id is invalid */
if (g->fifo.mmu_fault_engines) {