Jerome Brunet <[email protected]> writes: > The reset is asserted at probe and released once, in etnaviv_gpu_init(), > and is never asserted again. Runtime suspend only stops the clocks, and the > power domain may then cut power to the core. On the next runtime resume, > the domain powers the core up again while the reset is still deasserted. > > On the Amlogic A311D NPU, the power domain lifts isolation on a core that > is out of reset, which locks up the SoC on the first runtime resume after > a runtime suspend. Toggling the reset again solves the problem. > > From an existing comment in the driver, the reset must be deasserted with > the clock running, so handle it together with the clocks. Rename the clock > helpers accordingly, as they now handle the reset as well. This way the > reset is properly handled whether or not CONFIG_PM is enabled. > > Fixes: 6bde14ba5f7e ("drm/etnaviv: add optional reset support") > Signed-off-by: Jerome Brunet <[email protected]> > --- > This was found while running the MobileNetV1 demo with Teflon on the > Khadas VIM3 (Amlogic A311D).
Tested-by: Kevin Hilman <[email protected]> Also tested on a Khadas VIM3 (A311D) with mainline (v7.4-rc5+). Without this patch the board hard-locks on the first NPU runtime resume, whether triggered by a job or by writing "on" to power/control; with it, the NPU suspends and resumes cleanly (RESET_NNA held while the NNA domain is off) and Mesa's Teflon test suite completes under runtime PM. Kevin
