Messages in this thread | | | Date | Tue, 6 Apr 2021 21:14:53 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH 5.10 079/126] drm/tegra: sor: Grab runtime PM reference across reset |
| |
Hi!
> > > However, these functions alone don't provide any guarantees at the > > > system level. Drivers need to ensure that the only a single consumer has > > > access to the reset at the same time. In order for the SOR to be able to > > > exclusively access its reset, it must therefore ensure that the SOR > > > power domain is not powered off by holding on to a runtime PM reference > > > to that power domain across the reset assert/deassert operation. > > > > Yeah, but it should not leak the PM reference in the error handling. > > True. However the only reason why the code could realistically fail > between pm_runtime_resume_and_get() and pm_runtime_put() is if we did > not take the runtime PM reference (which would cause the call to > reset_control_acquire() to fail). > > So the chances of this actually leaking are practically zero, so I > didn't want to bloat this bugfix with what's essentially dead code. I > can queue up your fix below for v5.14, though, since it's obviously > more correct from a theoretical point of view.
Yes, that sounds like good solution, thanks!
Best regards, Pavel
-- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany [unhandled content-type:application/pgp-signature] | |