From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Date: Tue, 26 Jun 2012 18:44:03 +0000 Subject: Re: [PATCH] OMAPDSS: Check if RPM enabled before trying to change state Message-Id: <1340736243.24530.98.camel@deskari> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-c+LvscmYQ4c3fzCBHAct" List-Id: References: <1340438771-25587-1-git-send-email-jaswinder.singh@linaro.org> <1340605221.12683.30.camel@lappyti> <1340616643.3395.19.camel@deskari> <1340628094.3395.63.camel@deskari> <1340632161.3395.100.camel@deskari> <1340695166.2093.22.camel@lappyti> <1340701660.24530.17.camel@deskari> <1340712213.24530.21.camel@deskari> <1340723296.24530.68.camel@deskari> <1340723514.24530.70.camel@deskari> In-Reply-To: To: Jassi Brar Cc: mythripk@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, andy.green@linaro.org, n-dechesne@ti.com --=-c+LvscmYQ4c3fzCBHAct Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2012-06-26 at 22:31 +0530, Jassi Brar wrote: > While I think your patch is simpler and achieve the same, I also think > your fears about this patch are unfounded. Perhaps. But I do get a bad feeling from your patch, and I don't like when that happens =3D). What I fear with changes like you made is that they'll hide problems that should be fixed in other ways. And I think that was the case here also. I think we should not call dispc_runtime_get() during suspend. If pm_runtime_get returns -EACCES, we do have a possible problem, and we should not silently ignore it. > A quick snack for thought... > > > > But if pm_runtime_get_sync() returns an error, it means the HW has not > > been resumed successfully, and is not operational, > > > Not always. The HW could be in RPM_ACTIVE state while PM on it could > be disabled, if the returned error is -EACCESS. And > pm_runtime_enabled() only catches a potential -EACCESS. True. But the HW could also be in disabled state. And that would lead to a crash when accessing the registers. It is not a fatal error if pm_runtime_get returns -EACCES, but we sure shouldn't ignore it (or avoid it with pm_runtime_enabled()), but handle it. In some rare cases it could be ok to get -EACCES, but that's a special case, not standard. > BTW, I just tested your patch and it worked for me as well. But as > suspected, it doesn't help the stack spew of CONFIG_PM_RUNTIME:=3Dn >=20 > So I understand, I only need to resend the other three patches ? Yes, please. Tomi --=-c+LvscmYQ4c3fzCBHAct Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJP6gLzAAoJEPo9qoy8lh71x/8P/jrVqlYbYqXG07dYKIym0ewl 1IsDeFikGGTc3C47bpvSSs23HJspBqTWmXCO20WBXIY+14SNnh5nkQ4dM4Wlwt4P lrbvcaJbTHub8ctNsH80ubKYK1b+WVvcYeZejo1k352cJfGLG26/Nx0CcJtOvjgz PrLwH0kbqyOQq9wB3/nL4t0k2Uyhh8AOZDKhiXanw95esXTgeaiTnHkrAArRUq6o Cr/zK5DWjzOMx5sOC//z3DJZgY3rnV72XOlOQegEq3X1rez/Dp21fe4qIm9BcWg4 kGpej6wW2E5sN1H7wKAWJXGV4RVABwywixPnX026pX05BYWkHzV+18ysmSCocGyM NarJwgh1iOGEUyVdLf/MLD1FS62/RTdos9ghoLLNQ0d084kHHwXTg2xdV+COtZsz j0M5RsHMlyt0e0+MxdLGyLDGB0w8w/8qB4Otqf6GJ5UFBNAkKdUYPke51Wxac8Az Taq3aclq35lDmiXMkRqJ+cbSw27PL0xEaEqDQNA06MfK2JS6o/fNLWzPez4igTh5 vJQwF135yync5U2ISwF0ZU6dS+dD/ZXokur+1HnLr7KZ91OvAyhPK8BZ/1SJ81R7 XJS5PYtdwG1oY4sd+JbG0oqtHuc2Ncrkic9BQRvGL4FHuror0r5ktE4GNVuQYrpg FOz6bd3hTAwKC0neZqbH =2Nqo -----END PGP SIGNATURE----- --=-c+LvscmYQ4c3fzCBHAct--