Message ID | 1470757001-4333-1-git-send-email-geert+renesas@glider.be (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1bX95J-0002RN-I6; Tue, 09 Aug 2016 15:36:53 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1bX95H-0005kO-kQ; Tue, 09 Aug 2016 17:36:53 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752200AbcHIPgt (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 9 Aug 2016 11:36:49 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:59232 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbcHIPgs (ORCPT <rfc822; linux-media@vger.kernel.org>); Tue, 9 Aug 2016 11:36:48 -0400 Received: from ayla.of.borg ([84.193.137.253]) by michel.telenet-ops.be with bizsmtp id V3cj1t0045UCtCs063cjxg; Tue, 09 Aug 2016 17:36:45 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from <geert@linux-m68k.org>) id 1bX959-00008B-3j; Tue, 09 Aug 2016 17:36:43 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from <geert@linux-m68k.org>) id 1bX959-00018e-Qq; Tue, 09 Aug 2016 17:36:43 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org> Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH] [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success Date: Tue, 9 Aug 2016 17:36:41 +0200 Message-Id: <1470757001-4333-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.8.9.152716 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, LEGITIMATE_NEGATE 0, LEGITIMATE_SIGNS 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __CP_URI_IN_BODY 0, __FROM_DOMAIN_IN_ANY_CC2 0, __FROM_DOMAIN_IN_RCPT 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NAME 0, __TO_NAME_DIFF_FROM_ACC 0, __TO_REAL_NAMES 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0' |
Commit Message
Geert Uytterhoeven
Aug. 9, 2016, 3:36 p.m. UTC
When resuming from suspend-to-RAM on r8a7795/salvator-x:
dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
PM: Device fe940000.fdp1 failed to resume noirq: error 1
dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
PM: Device fe944000.fdp1 failed to resume noirq: error 1
dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
PM: Device fe948000.fdp1 failed to resume noirq: error 1
According to its documentation, rcar_fcp_enable() returns 0 on success
or a negative error code if an error occurs. Hence
fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return
value to their callers.
However, rcar_fcp_enable() forwards the return value of
pm_runtime_get_sync(), which can actually be 1 on success, leading to
the resume failure above.
To fix this, consider only negative values returned by
pm_runtime_get_sync() to be failures.
Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/media/platform/rcar-fcp.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Comments
Hi Geert, Thank you for the patch. On Tuesday 09 Aug 2016 17:36:41 Geert Uytterhoeven wrote: > When resuming from suspend-to-RAM on r8a7795/salvator-x: > > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 > PM: Device fe940000.fdp1 failed to resume noirq: error 1 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 > PM: Device fe944000.fdp1 failed to resume noirq: error 1 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 > PM: Device fe948000.fdp1 failed to resume noirq: error 1 > > According to its documentation, rcar_fcp_enable() returns 0 on success > or a negative error code if an error occurs. Hence > fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return > value to their callers. > > However, rcar_fcp_enable() forwards the return value of > pm_runtime_get_sync(), which can actually be 1 on success, leading to > the resume failure above. > > To fix this, consider only negative values returned by > pm_runtime_get_sync() to be failures. > > Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > drivers/media/platform/rcar-fcp.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/rcar-fcp.c > b/drivers/media/platform/rcar-fcp.c index > 0ff6b1edf1dbf677..7e944479205d4059 100644 > --- a/drivers/media/platform/rcar-fcp.c > +++ b/drivers/media/platform/rcar-fcp.c > @@ -99,10 +99,16 @@ EXPORT_SYMBOL_GPL(rcar_fcp_put); > */ > int rcar_fcp_enable(struct rcar_fcp_device *fcp) > { > + int error; I was going to write that the driver uses "ret" instead of "error" for integer status return values, but it doesn't as there no such value stored in a variable at all. I will thus argue that it will use that style later, so let's keep the style consistent with the to-be-written code if you don't mind :-) Apart from that, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> and applied to my tree. > if (!fcp) > return 0; > > - return pm_runtime_get_sync(fcp->dev); > + error = pm_runtime_get_sync(fcp->dev); > + if (error < 0) > + return error; > + > + return 0; > } > EXPORT_SYMBOL_GPL(rcar_fcp_enable);
Hi Laurent, On Wed, Aug 17, 2016 at 2:55 PM, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > On Tuesday 09 Aug 2016 17:36:41 Geert Uytterhoeven wrote: >> When resuming from suspend-to-RAM on r8a7795/salvator-x: >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 >> PM: Device fe940000.fdp1 failed to resume noirq: error 1 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 >> PM: Device fe944000.fdp1 failed to resume noirq: error 1 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 >> PM: Device fe948000.fdp1 failed to resume noirq: error 1 >> >> According to its documentation, rcar_fcp_enable() returns 0 on success >> or a negative error code if an error occurs. Hence >> fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return >> value to their callers. >> >> However, rcar_fcp_enable() forwards the return value of >> pm_runtime_get_sync(), which can actually be 1 on success, leading to >> the resume failure above. >> >> To fix this, consider only negative values returned by >> pm_runtime_get_sync() to be failures. >> >> Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver") >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> >> --- >> drivers/media/platform/rcar-fcp.c | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/rcar-fcp.c >> b/drivers/media/platform/rcar-fcp.c index >> 0ff6b1edf1dbf677..7e944479205d4059 100644 >> --- a/drivers/media/platform/rcar-fcp.c >> +++ b/drivers/media/platform/rcar-fcp.c >> @@ -99,10 +99,16 @@ EXPORT_SYMBOL_GPL(rcar_fcp_put); >> */ >> int rcar_fcp_enable(struct rcar_fcp_device *fcp) >> { >> + int error; > > I was going to write that the driver uses "ret" instead of "error" for integer > status return values, but it doesn't as there no such value stored in a > variable at all. I will thus argue that it will use that style later, so let's > keep the style consistent with the to-be-written code if you don't mind :-) > > Apart from that, > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > and applied to my tree. Thanks! Where exactly has this been applied? >> if (!fcp) >> return 0; >> >> - return pm_runtime_get_sync(fcp->dev); >> + error = pm_runtime_get_sync(fcp->dev); >> + if (error < 0) >> + return error; >> + >> + return 0; >> } >> EXPORT_SYMBOL_GPL(rcar_fcp_enable); BTW, it seems I missed a few more s2ram resume errors: dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fe920000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fe960000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fe9a0000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fe9b0000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fe9c0000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fea20000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fea28000.vsp failed to resume noirq: error -13 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 PM: Device fea30000.vsp failed to resume noirq: error -13 vsp1 fea38000.vsp: failed to reset wpf.0 dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -110 PM: Device fea38000.vsp failed to resume noirq: error -110 -13 == -EACCES, returned by rcar_fcp_enable() as pm_runtime_get_sync() is called too early during system resume, -110 = ETIMEDOUT, returned by vsp1_device_init() due to the failure to reset wpf.0. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Geert, On Tuesday 23 Aug 2016 15:11:59 Geert Uytterhoeven wrote: > On Wed, Aug 17, 2016 at 2:55 PM, Laurent Pinchart wrote: > > On Tuesday 09 Aug 2016 17:36:41 Geert Uytterhoeven wrote: > >> When resuming from suspend-to-RAM on r8a7795/salvator-x: > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 > >> PM: Device fe940000.fdp1 failed to resume noirq: error 1 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 > >> PM: Device fe944000.fdp1 failed to resume noirq: error 1 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1 > >> PM: Device fe948000.fdp1 failed to resume noirq: error 1 > >> > >> According to its documentation, rcar_fcp_enable() returns 0 on success > >> or a negative error code if an error occurs. Hence > >> fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return > >> value to their callers. > >> > >> However, rcar_fcp_enable() forwards the return value of > >> pm_runtime_get_sync(), which can actually be 1 on success, leading to > >> the resume failure above. > >> > >> To fix this, consider only negative values returned by > >> pm_runtime_get_sync() to be failures. > >> > >> Fixes: 7b49235e83b2347c ("[media] v4l: Add Renesas R-Car FCP driver") > >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > >> --- > >> > >> drivers/media/platform/rcar-fcp.c | 8 +++++++- > >> 1 file changed, 7 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/media/platform/rcar-fcp.c > >> b/drivers/media/platform/rcar-fcp.c index > >> 0ff6b1edf1dbf677..7e944479205d4059 100644 > >> --- a/drivers/media/platform/rcar-fcp.c > >> +++ b/drivers/media/platform/rcar-fcp.c > >> @@ -99,10 +99,16 @@ EXPORT_SYMBOL_GPL(rcar_fcp_put); > >> > >> */ > >> > >> int rcar_fcp_enable(struct rcar_fcp_device *fcp) > >> { > >> > >> + int error; > > > > I was going to write that the driver uses "ret" instead of "error" for > > integer status return values, but it doesn't as there no such value > > stored in a variable at all. I will thus argue that it will use that > > style later, so let's keep the style consistent with the to-be-written > > code if you don't mind :-) > > > > Apart from that, > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > > and applied to my tree. > > Thanks! > > Where exactly has this been applied? git://linuxtv.org/pinchartl/media.git vsp1/next I see now that Mauro has applied it already. Mauro, could you please avoid merging patches that I take through my tree, especially when I request changes ? > >> if (!fcp) > >> > >> return 0; > >> > >> - return pm_runtime_get_sync(fcp->dev); > >> + error = pm_runtime_get_sync(fcp->dev); > >> + if (error < 0) > >> + return error; > >> + > >> + return 0; > >> > >> } > >> EXPORT_SYMBOL_GPL(rcar_fcp_enable); > > BTW, it seems I missed a few more s2ram resume errors: > > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fe920000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fe960000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fe9a0000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fe9b0000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fe9c0000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fea20000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fea28000.vsp failed to resume noirq: error -13 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > PM: Device fea30000.vsp failed to resume noirq: error -13 > vsp1 fea38000.vsp: failed to reset wpf.0 > dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -110 > PM: Device fea38000.vsp failed to resume noirq: error -110 > > -13 == -EACCES, returned by rcar_fcp_enable() as pm_runtime_get_sync() > is called too early during system resume, Do you have a fix for this ? :-) > -110 = ETIMEDOUT, returned by vsp1_device_init() due to the failure > to reset wpf.0. This one needs to be investigated.
Hi Laurent, On Mon, Sep 5, 2016 at 10:17 AM, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: >> BTW, it seems I missed a few more s2ram resume errors: >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fe920000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fe960000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fe9a0000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fe9b0000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fe9c0000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fea20000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fea28000.vsp failed to resume noirq: error -13 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> PM: Device fea30000.vsp failed to resume noirq: error -13 >> vsp1 fea38000.vsp: failed to reset wpf.0 >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -110 >> PM: Device fea38000.vsp failed to resume noirq: error -110 >> >> -13 == -EACCES, returned by rcar_fcp_enable() as pm_runtime_get_sync() >> is called too early during system resume, > > Do you have a fix for this ? :-) Unfortuately not. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Geert, On Monday 05 Sep 2016 10:20:52 Geert Uytterhoeven wrote: > On Mon, Sep 5, 2016 at 10:17 AM, Laurent Pinchart wrote: > >> BTW, it seems I missed a few more s2ram resume errors: > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fe920000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fe960000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fe9a0000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fe9b0000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fe9c0000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fea20000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fea28000.vsp failed to resume noirq: error -13 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 > >> PM: Device fea30000.vsp failed to resume noirq: error -13 > >> vsp1 fea38000.vsp: failed to reset wpf.0 > >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -110 > >> PM: Device fea38000.vsp failed to resume noirq: error -110 > >> > >> -13 == -EACCES, returned by rcar_fcp_enable() as pm_runtime_get_sync() > >> is called too early during system resume, > > > > Do you have a fix for this ? :-) > > Unfortuately not. Is this caused by the fact that pm_runtime_get_sync() is called on the FCP device before the FCP gets system-resumed ? Lovely PM order dependency :-/
Hi Laurent, On Mon, Sep 5, 2016 at 10:25 AM, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > On Monday 05 Sep 2016 10:20:52 Geert Uytterhoeven wrote: >> On Mon, Sep 5, 2016 at 10:17 AM, Laurent Pinchart wrote: >> >> BTW, it seems I missed a few more s2ram resume errors: >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fe920000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fe960000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fe9a0000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fe9b0000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fe9c0000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fea20000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fea28000.vsp failed to resume noirq: error -13 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -13 >> >> PM: Device fea30000.vsp failed to resume noirq: error -13 >> >> vsp1 fea38000.vsp: failed to reset wpf.0 >> >> dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns -110 >> >> PM: Device fea38000.vsp failed to resume noirq: error -110 >> >> >> >> -13 == -EACCES, returned by rcar_fcp_enable() as pm_runtime_get_sync() >> >> is called too early during system resume, >> > >> > Do you have a fix for this ? :-) >> >> Unfortuately not. > > Is this caused by the fact that pm_runtime_get_sync() is called on the FCP > device before the FCP gets system-resumed ? Lovely PM order dependency :-/ It's called from resume_noirq. IIRC, it's called a second time from resume. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/platform/rcar-fcp.c b/drivers/media/platform/rcar-fcp.c index 0ff6b1edf1dbf677..7e944479205d4059 100644 --- a/drivers/media/platform/rcar-fcp.c +++ b/drivers/media/platform/rcar-fcp.c @@ -99,10 +99,16 @@ EXPORT_SYMBOL_GPL(rcar_fcp_put); */ int rcar_fcp_enable(struct rcar_fcp_device *fcp) { + int error; + if (!fcp) return 0; - return pm_runtime_get_sync(fcp->dev); + error = pm_runtime_get_sync(fcp->dev); + if (error < 0) + return error; + + return 0; } EXPORT_SYMBOL_GPL(rcar_fcp_enable);