* omap3isp as a wakeup source @ 2011-09-12 14:50 Enrico 2011-09-12 20:28 ` Sakari Ailus 2011-09-13 9:08 ` Laurent Pinchart 0 siblings, 2 replies; 12+ messages in thread From: Enrico @ 2011-09-12 14:50 UTC (permalink / raw) To: linux-media Hi, While testing omap3isp+tvp5150 with latest Deepthy bt656 patches (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing or, if not hanged, it grabs at max ~10fps. Then i noticed that tapping on the (serial) console made it "unblock" for some frames, so i thought it doesn't prevent the cpu to go idle/sleep. Using the boot arg "nohlt" the problem disappear and it grabs at a steady 25fps. In the code i found a comment that says the camera can't be a wakeup source but the camera powerdomain is instead used to decide to not go idle, so at this point i think the camera powerdomain is not enabled but i don't know how/where to enable it. Any ideas? Thanks, Enrico ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-12 14:50 omap3isp as a wakeup source Enrico @ 2011-09-12 20:28 ` Sakari Ailus 2011-09-13 6:25 ` anish singh 2011-09-13 9:08 ` Laurent Pinchart 1 sibling, 1 reply; 12+ messages in thread From: Sakari Ailus @ 2011-09-12 20:28 UTC (permalink / raw) To: Enrico; +Cc: linux-media On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: > Hi, Hi Enrico, > While testing omap3isp+tvp5150 with latest Deepthy bt656 patches > (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing > or, if not hanged, it grabs at max ~10fps. > > Then i noticed that tapping on the (serial) console made it "unblock" > for some frames, so i thought it doesn't prevent the cpu to go > idle/sleep. Using the boot arg "nohlt" the problem disappear and it > grabs at a steady 25fps. > > In the code i found a comment that says the camera can't be a wakeup > source but the camera powerdomain is instead used to decide to not go > idle, so at this point i think the camera powerdomain is not enabled > but i don't know how/where to enable it. Any ideas? I can confirm this indeed is the case --- ISP can't wake up the system --- but don't know how to prevent the system from going to sleep when using the ISP. -- Sakari Ailus e-mail: sakari.ailus@iki.fi jabber/XMPP/Gmail: sailus@retiisi.org.uk ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-12 20:28 ` Sakari Ailus @ 2011-09-13 6:25 ` anish singh 2011-09-13 6:49 ` Sakari Ailus 0 siblings, 1 reply; 12+ messages in thread From: anish singh @ 2011-09-13 6:25 UTC (permalink / raw) To: Sakari Ailus; +Cc: Enrico, linux-media On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: > On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: >> Hi, > > Hi Enrico, > >> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches >> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing >> or, if not hanged, it grabs at max ~10fps. >> >> Then i noticed that tapping on the (serial) console made it "unblock" >> for some frames, so i thought it doesn't prevent the cpu to go >> idle/sleep. Using the boot arg "nohlt" the problem disappear and it >> grabs at a steady 25fps. >> >> In the code i found a comment that says the camera can't be a wakeup >> source but the camera powerdomain is instead used to decide to not go >> idle, so at this point i think the camera powerdomain is not enabled >> but i don't know how/where to enable it. Any ideas? > > I can confirm this indeed is the case --- ISP can't wake up the system --- > but don't know how to prevent the system from going to sleep when using the > ISP. Had it been on android i think wakelock would have been very useful. > > -- > Sakari Ailus > e-mail: sakari.ailus@iki.fi jabber/XMPP/Gmail: sailus@retiisi.org.uk > -- > 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 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 6:25 ` anish singh @ 2011-09-13 6:49 ` Sakari Ailus 2011-09-13 9:48 ` Tero Kristo 0 siblings, 1 reply; 12+ messages in thread From: Sakari Ailus @ 2011-09-13 6:49 UTC (permalink / raw) To: anish singh; +Cc: Enrico, linux-media, t-kristo anish singh wrote: > On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: >> On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: >>> Hi, >> >> Hi Enrico, >> >>> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches >>> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing >>> or, if not hanged, it grabs at max ~10fps. >>> >>> Then i noticed that tapping on the (serial) console made it "unblock" >>> for some frames, so i thought it doesn't prevent the cpu to go >>> idle/sleep. Using the boot arg "nohlt" the problem disappear and it >>> grabs at a steady 25fps. >>> >>> In the code i found a comment that says the camera can't be a wakeup >>> source but the camera powerdomain is instead used to decide to not go >>> idle, so at this point i think the camera powerdomain is not enabled >>> but i don't know how/where to enable it. Any ideas? >> >> I can confirm this indeed is the case --- ISP can't wake up the system --- >> but don't know how to prevent the system from going to sleep when using the >> ISP. > Had it been on android i think wakelock would have been very useful. I believe there are proper means to do this using more standard methods as well. Not being a PM expert, I don't know how. Cc Tero. -- Sakari Ailus sakari.ailus@iki.fi ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 6:49 ` Sakari Ailus @ 2011-09-13 9:48 ` Tero Kristo 2011-09-13 10:08 ` Enrico 2011-09-13 10:28 ` Enrico 0 siblings, 2 replies; 12+ messages in thread From: Tero Kristo @ 2011-09-13 9:48 UTC (permalink / raw) To: Sakari Ailus; +Cc: anish singh, Enrico, linux-media On Tue, 2011-09-13 at 08:49 +0200, Sakari Ailus wrote: > anish singh wrote: > > On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: > >> On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: > >>> Hi, > >> > >> Hi Enrico, > >> > >>> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches > >>> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing > >>> or, if not hanged, it grabs at max ~10fps. > >>> > >>> Then i noticed that tapping on the (serial) console made it "unblock" > >>> for some frames, so i thought it doesn't prevent the cpu to go > >>> idle/sleep. Using the boot arg "nohlt" the problem disappear and it > >>> grabs at a steady 25fps. > >>> > >>> In the code i found a comment that says the camera can't be a wakeup > >>> source but the camera powerdomain is instead used to decide to not go > >>> idle, so at this point i think the camera powerdomain is not enabled > >>> but i don't know how/where to enable it. Any ideas? > >> > >> I can confirm this indeed is the case --- ISP can't wake up the system --- > >> but don't know how to prevent the system from going to sleep when using the > >> ISP. > > Had it been on android i think wakelock would have been very useful. > > I believe there are proper means to do this using more standard methods > as well. Not being a PM expert, I don't know how. > > Cc Tero. > Hi, I don't think there are proper means yet to do this, as camera is somewhat a special case in omap3, it is apparently the only module that is causing this kind of problem. However, you can prevent idle when camera is active with something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 2789e0a..7fdf6e2 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -358,6 +358,9 @@ void omap_sram_idle(void) omap3_per_save_context(); } + if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON) + clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]); + /* CORE */ if (core_next_state < PWRDM_POWER_ON) { omap_uart_prepare_idle(0); -Tero Texas Instruments Oy, Tekniikantie 12, 02150 Espoo. Y-tunnus: 0115040-6. Kotipaikka: Helsinki ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 9:48 ` Tero Kristo @ 2011-09-13 10:08 ` Enrico 2011-09-13 10:29 ` Tero Kristo 2011-09-13 10:28 ` Enrico 1 sibling, 1 reply; 12+ messages in thread From: Enrico @ 2011-09-13 10:08 UTC (permalink / raw) To: t-kristo; +Cc: Sakari Ailus, anish singh, linux-media, Laurent Pinchart On Tue, Sep 13, 2011 at 11:48 AM, Tero Kristo <t-kristo@ti.com> wrote: > On Tue, 2011-09-13 at 08:49 +0200, Sakari Ailus wrote: >> anish singh wrote: >> > On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: >> >> On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: >> >>> Hi, >> >> >> >> Hi Enrico, >> >> >> >>> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches >> >>> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing >> >>> or, if not hanged, it grabs at max ~10fps. >> >>> >> >>> Then i noticed that tapping on the (serial) console made it "unblock" >> >>> for some frames, so i thought it doesn't prevent the cpu to go >> >>> idle/sleep. Using the boot arg "nohlt" the problem disappear and it >> >>> grabs at a steady 25fps. >> >>> >> >>> In the code i found a comment that says the camera can't be a wakeup >> >>> source but the camera powerdomain is instead used to decide to not go >> >>> idle, so at this point i think the camera powerdomain is not enabled >> >>> but i don't know how/where to enable it. Any ideas? >> >> >> >> I can confirm this indeed is the case --- ISP can't wake up the system --- >> >> but don't know how to prevent the system from going to sleep when using the >> >> ISP. >> > Had it been on android i think wakelock would have been very useful. >> >> I believe there are proper means to do this using more standard methods >> as well. Not being a PM expert, I don't know how. >> >> Cc Tero. >> > > Hi, > > I don't think there are proper means yet to do this, as camera is > somewhat a special case in omap3, it is apparently the only module that > is causing this kind of problem. However, you can prevent idle when > camera is active with something like this: > > diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c > index 2789e0a..7fdf6e2 100644 > --- a/arch/arm/mach-omap2/pm34xx.c > +++ b/arch/arm/mach-omap2/pm34xx.c > @@ -358,6 +358,9 @@ void omap_sram_idle(void) > omap3_per_save_context(); > } > > + if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON) > + clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]); > + > /* CORE */ > if (core_next_state < PWRDM_POWER_ON) { > omap_uart_prepare_idle(0); > > > > -Tero i think something related is already in arch/arm/mach-omap2/cpuidle34xx.c omap3_enter_idle_bm(...): /* * Prevent idle completely if CAM is active. * CAM does not have wakeup capability in OMAP3. */ cam_state = pwrdm_read_pwrst(cam_pd); if (cam_state == PWRDM_POWER_ON) { new_state = dev->safe_state; goto select_state; } But probably the power domain is not set to ON, and i don't know where it should be set. Maybe, as Laurent suggested, adding runtime PM support will fix it? Thanks, Enrico ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 10:08 ` Enrico @ 2011-09-13 10:29 ` Tero Kristo 2011-09-13 13:25 ` Enrico 0 siblings, 1 reply; 12+ messages in thread From: Tero Kristo @ 2011-09-13 10:29 UTC (permalink / raw) To: Enrico; +Cc: Sakari Ailus, anish singh, linux-media, Laurent Pinchart On Tue, 2011-09-13 at 12:08 +0200, Enrico wrote: > On Tue, Sep 13, 2011 at 11:48 AM, Tero Kristo <t-kristo@ti.com> wrote: > > On Tue, 2011-09-13 at 08:49 +0200, Sakari Ailus wrote: > >> anish singh wrote: > >> > On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: > >> >> On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: > >> >>> Hi, > >> >> > >> >> Hi Enrico, > >> >> > >> >>> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches > >> >>> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing > >> >>> or, if not hanged, it grabs at max ~10fps. > >> >>> > >> >>> Then i noticed that tapping on the (serial) console made it "unblock" > >> >>> for some frames, so i thought it doesn't prevent the cpu to go > >> >>> idle/sleep. Using the boot arg "nohlt" the problem disappear and it > >> >>> grabs at a steady 25fps. > >> >>> > >> >>> In the code i found a comment that says the camera can't be a wakeup > >> >>> source but the camera powerdomain is instead used to decide to not go > >> >>> idle, so at this point i think the camera powerdomain is not enabled > >> >>> but i don't know how/where to enable it. Any ideas? > >> >> > >> >> I can confirm this indeed is the case --- ISP can't wake up the system --- > >> >> but don't know how to prevent the system from going to sleep when using the > >> >> ISP. > >> > Had it been on android i think wakelock would have been very useful. > >> > >> I believe there are proper means to do this using more standard methods > >> as well. Not being a PM expert, I don't know how. > >> > >> Cc Tero. > >> > > > > Hi, > > > > I don't think there are proper means yet to do this, as camera is > > somewhat a special case in omap3, it is apparently the only module that > > is causing this kind of problem. However, you can prevent idle when > > camera is active with something like this: > > > > diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c > > index 2789e0a..7fdf6e2 100644 > > --- a/arch/arm/mach-omap2/pm34xx.c > > +++ b/arch/arm/mach-omap2/pm34xx.c > > @@ -358,6 +358,9 @@ void omap_sram_idle(void) > > omap3_per_save_context(); > > } > > > > + if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON) > > + clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]); > > + > > /* CORE */ > > if (core_next_state < PWRDM_POWER_ON) { > > omap_uart_prepare_idle(0); > > > > > > > > -Tero > > i think something related is already in > arch/arm/mach-omap2/cpuidle34xx.c omap3_enter_idle_bm(...): > > /* > * Prevent idle completely if CAM is active. > * CAM does not have wakeup capability in OMAP3. > */ > cam_state = pwrdm_read_pwrst(cam_pd); > if (cam_state == PWRDM_POWER_ON) { > new_state = dev->safe_state; > goto select_state; > } > > Yea, this should take care of it already. > But probably the power domain is not set to ON, and i don't know where > it should be set. Maybe, as Laurent suggested, adding runtime PM > support will fix it? Powerdomain is automatically on if there are any clocks enabled on it. If you make sure that ISP has some activity ongoing, then it should be on. You can check the state of the camera powerdomain from /sys/kernel/debug/pm_debug/count file, if you have mounted debugfs. But yea, there might be some conflict also ongoing with lack of runtime PM here, I haven't been looking at ISP related issues for a long time. -Tero Texas Instruments Oy, Tekniikantie 12, 02150 Espoo. Y-tunnus: 0115040-6. Kotipaikka: Helsinki ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 10:29 ` Tero Kristo @ 2011-09-13 13:25 ` Enrico 2011-09-20 9:19 ` Enrico 0 siblings, 1 reply; 12+ messages in thread From: Enrico @ 2011-09-13 13:25 UTC (permalink / raw) To: t-kristo; +Cc: Sakari Ailus, anish singh, linux-media, Laurent Pinchart On Tue, Sep 13, 2011 at 12:29 PM, Tero Kristo <t-kristo@ti.com> wrote: > Powerdomain is automatically on if there are any clocks enabled on it. > If you make sure that ISP has some activity ongoing, then it should be > on. You can check the state of the camera powerdomain > from /sys/kernel/debug/pm_debug/count file, if you have mounted debugfs. And in fact something seems wrong (this is on a patched 3.0.4 kernel): usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 dss_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 cam_pwrdm (RET),OFF:0,RET:9,INA:0,ON:9,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0 neon_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0 mpu_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0 per_clkdm->per_pwrdm (20) usbhost_clkdm->usbhost_pwrdm (3) cam_clkdm->cam_pwrdm (0) dss_clkdm->dss_pwrdm (1) core_l4_clkdm->core_pwrdm (23) core_l3_clkdm->core_pwrdm (4) d2d_clkdm->core_pwrdm (0) sgx_clkdm->sgx_pwrdm (0) iva2_clkdm->iva2_pwrdm (0) neon_clkdm->neon_pwrdm (0) mpu_clkdm->mpu_pwrdm (0) prm_clkdm->wkup_pwrdm (0) cm_clkdm->core_pwrdm (0) I think the line "cam_clkdm->cam_pwrdm (0)" means that it was never enabled, but i grabbed some frames with yavta before that. Anyone more into runtime PM that i can CC for suggestions? Enrico ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 13:25 ` Enrico @ 2011-09-20 9:19 ` Enrico 0 siblings, 0 replies; 12+ messages in thread From: Enrico @ 2011-09-20 9:19 UTC (permalink / raw) To: t-kristo Cc: Sakari Ailus, anish singh, linux-media, Laurent Pinchart, khilman On Tue, Sep 13, 2011 at 3:25 PM, Enrico <ebutera@users.berlios.de> wrote: > On Tue, Sep 13, 2011 at 12:29 PM, Tero Kristo <t-kristo@ti.com> wrote: >> Powerdomain is automatically on if there are any clocks enabled on it. >> If you make sure that ISP has some activity ongoing, then it should be >> on. You can check the state of the camera powerdomain >> from /sys/kernel/debug/pm_debug/count file, if you have mounted debugfs. > > And in fact something seems wrong (this is on a patched 3.0.4 kernel): > > usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 > sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 > per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 > dss_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 > cam_pwrdm (RET),OFF:0,RET:9,INA:0,ON:9,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 > core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0 > neon_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0 > mpu_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 > iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0 > per_clkdm->per_pwrdm (20) > usbhost_clkdm->usbhost_pwrdm (3) > cam_clkdm->cam_pwrdm (0) > dss_clkdm->dss_pwrdm (1) > core_l4_clkdm->core_pwrdm (23) > core_l3_clkdm->core_pwrdm (4) > d2d_clkdm->core_pwrdm (0) > sgx_clkdm->sgx_pwrdm (0) > iva2_clkdm->iva2_pwrdm (0) > neon_clkdm->neon_pwrdm (0) > mpu_clkdm->mpu_pwrdm (0) > prm_clkdm->wkup_pwrdm (0) > cm_clkdm->core_pwrdm (0) > > > I think the line "cam_clkdm->cam_pwrdm (0)" means that it was never > enabled, but i grabbed some frames with yavta before that. Forget that, i was wrong. While yavta is running (or better to say: hanged waiting for frames) i have this: cam_pwrdm (ON),OFF:0,RET:6,INA:0,ON:7,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0 cam_clkdm->cam_pwrdm (3) So it seems that clocks/power domains are "acquired" correctly but ignored. And from /proc/interrupts i can see the isp counter increasing (while yavta is hanged waiting for frames). Is it possibile this happens only because some pm_runtime_enable/disable/get/put are missing in omap3isp? Thanks, Enrico ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 9:48 ` Tero Kristo 2011-09-13 10:08 ` Enrico @ 2011-09-13 10:28 ` Enrico 2011-09-13 11:28 ` Sakari Ailus 1 sibling, 1 reply; 12+ messages in thread From: Enrico @ 2011-09-13 10:28 UTC (permalink / raw) To: t-kristo Cc: Sakari Ailus, anish singh, linux-media, Laurent Pinchart, Deepthy Ravi On Tue, Sep 13, 2011 at 11:48 AM, Tero Kristo <t-kristo@ti.com> wrote: > On Tue, 2011-09-13 at 08:49 +0200, Sakari Ailus wrote: >> anish singh wrote: >> > On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: >> >> On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: >> >>> Hi, >> >> >> >> Hi Enrico, >> >> >> >>> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches >> >>> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing >> >>> or, if not hanged, it grabs at max ~10fps. >> >>> >> >>> Then i noticed that tapping on the (serial) console made it "unblock" >> >>> for some frames, so i thought it doesn't prevent the cpu to go >> >>> idle/sleep. Using the boot arg "nohlt" the problem disappear and it >> >>> grabs at a steady 25fps. >> >>> >> >>> In the code i found a comment that says the camera can't be a wakeup >> >>> source but the camera powerdomain is instead used to decide to not go >> >>> idle, so at this point i think the camera powerdomain is not enabled >> >>> but i don't know how/where to enable it. Any ideas? >> >> >> >> I can confirm this indeed is the case --- ISP can't wake up the system --- >> >> but don't know how to prevent the system from going to sleep when using the >> >> ISP. >> > Had it been on android i think wakelock would have been very useful. >> >> I believe there are proper means to do this using more standard methods >> as well. Not being a PM expert, I don't know how. >> >> Cc Tero. >> > > Hi, > > I don't think there are proper means yet to do this, as camera is > somewhat a special case in omap3, it is apparently the only module that > is causing this kind of problem. However, you can prevent idle when > camera is active with something like this: > > diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c > index 2789e0a..7fdf6e2 100644 > --- a/arch/arm/mach-omap2/pm34xx.c > +++ b/arch/arm/mach-omap2/pm34xx.c > @@ -358,6 +358,9 @@ void omap_sram_idle(void) > omap3_per_save_context(); > } > > + if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON) > + clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]); > + > /* CORE */ > if (core_next_state < PWRDM_POWER_ON) { > omap_uart_prepare_idle(0); > > > > -Tero One more thing: i just noticed that in Deepthy bt656 patches there is one patch [1] to add cam regulators (1v8 and 2v8) to the omap3evm board file, i'm not using an omap3evm but maybe i should add them to my board file too? Enrico [1]: http://www.spinics.net/lists/linux-omap/msg56922.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-13 10:28 ` Enrico @ 2011-09-13 11:28 ` Sakari Ailus 0 siblings, 0 replies; 12+ messages in thread From: Sakari Ailus @ 2011-09-13 11:28 UTC (permalink / raw) To: Enrico; +Cc: t-kristo, anish singh, linux-media, Laurent Pinchart, Deepthy Ravi On Tue, Sep 13, 2011 at 12:28:12PM +0200, Enrico wrote: > On Tue, Sep 13, 2011 at 11:48 AM, Tero Kristo <t-kristo@ti.com> wrote: > > On Tue, 2011-09-13 at 08:49 +0200, Sakari Ailus wrote: > >> anish singh wrote: > >> > On Tue, Sep 13, 2011 at 1:58 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: > >> >> On Mon, Sep 12, 2011 at 04:50:42PM +0200, Enrico wrote: > >> >>> Hi, > >> >> > >> >> Hi Enrico, > >> >> > >> >>> While testing omap3isp+tvp5150 with latest Deepthy bt656 patches > >> >>> (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing > >> >>> or, if not hanged, it grabs at max ~10fps. > >> >>> > >> >>> Then i noticed that tapping on the (serial) console made it "unblock" > >> >>> for some frames, so i thought it doesn't prevent the cpu to go > >> >>> idle/sleep. Using the boot arg "nohlt" the problem disappear and it > >> >>> grabs at a steady 25fps. > >> >>> > >> >>> In the code i found a comment that says the camera can't be a wakeup > >> >>> source but the camera powerdomain is instead used to decide to not go > >> >>> idle, so at this point i think the camera powerdomain is not enabled > >> >>> but i don't know how/where to enable it. Any ideas? > >> >> > >> >> I can confirm this indeed is the case --- ISP can't wake up the system --- > >> >> but don't know how to prevent the system from going to sleep when using the > >> >> ISP. > >> > Had it been on android i think wakelock would have been very useful. > >> > >> I believe there are proper means to do this using more standard methods > >> as well. Not being a PM expert, I don't know how. > >> > >> Cc Tero. > >> > > > > Hi, > > > > I don't think there are proper means yet to do this, as camera is > > somewhat a special case in omap3, it is apparently the only module that > > is causing this kind of problem. However, you can prevent idle when > > camera is active with something like this: > > > > diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c > > index 2789e0a..7fdf6e2 100644 > > --- a/arch/arm/mach-omap2/pm34xx.c > > +++ b/arch/arm/mach-omap2/pm34xx.c > > @@ -358,6 +358,9 @@ void omap_sram_idle(void) > > omap3_per_save_context(); > > } > > > > + if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON) > > + clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]); > > + > > /* CORE */ > > if (core_next_state < PWRDM_POWER_ON) { > > omap_uart_prepare_idle(0); > > > > > > > > -Tero > > > One more thing: i just noticed that in Deepthy bt656 patches there is > one patch [1] to add cam regulators (1v8 and 2v8) to the omap3evm > board file, i'm not using an omap3evm but maybe i should add them to > my board file too? In general, if your board doesn't require them (e.g. for sensors' use) you should't add them. -- Sakari Ailus e-mail: sakari.ailus@iki.fi jabber/XMPP/Gmail: sailus@retiisi.org.uk ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: omap3isp as a wakeup source 2011-09-12 14:50 omap3isp as a wakeup source Enrico 2011-09-12 20:28 ` Sakari Ailus @ 2011-09-13 9:08 ` Laurent Pinchart 1 sibling, 0 replies; 12+ messages in thread From: Laurent Pinchart @ 2011-09-13 9:08 UTC (permalink / raw) To: Enrico; +Cc: linux-media Hi Enrico, On Monday 12 September 2011 16:50:42 Enrico wrote: > > While testing omap3isp+tvp5150 with latest Deepthy bt656 patches > (kernel 3.1rc4) i noticed that yavta hangs very often when grabbing > or, if not hanged, it grabs at max ~10fps. > > Then i noticed that tapping on the (serial) console made it "unblock" > for some frames, so i thought it doesn't prevent the cpu to go > idle/sleep. Using the boot arg "nohlt" the problem disappear and it > grabs at a steady 25fps. > > In the code i found a comment that says the camera can't be a wakeup > source but the camera powerdomain is instead used to decide to not go > idle, so at this point i think the camera powerdomain is not enabled > but i don't know how/where to enable it. Any ideas? Could that be related to the OMAP3 ISP driver not implementing the runtime PM API ? -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-09-20 9:19 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-12 14:50 omap3isp as a wakeup source Enrico 2011-09-12 20:28 ` Sakari Ailus 2011-09-13 6:25 ` anish singh 2011-09-13 6:49 ` Sakari Ailus 2011-09-13 9:48 ` Tero Kristo 2011-09-13 10:08 ` Enrico 2011-09-13 10:29 ` Tero Kristo 2011-09-13 13:25 ` Enrico 2011-09-20 9:19 ` Enrico 2011-09-13 10:28 ` Enrico 2011-09-13 11:28 ` Sakari Ailus 2011-09-13 9:08 ` Laurent Pinchart
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.