Re: [PATCH] ARM: dts: set 'ti,set-rate-parent' for dpll4_m5x2 clock

2014-07-30 Thread Tero Kristo

On 07/16/2014 03:29 AM, Laurent Pinchart wrote:

Hi Stefan,

Thank you for the patch.

On Tuesday 15 July 2014 12:02:35 Stefan Herbrechtsmeier wrote:

Set 'ti,set-rate-parent' property for the dpll4_m5x2_ck clock, which
is used for the ISP functional clock. This fixes the OMAP3 ISP driver's
clock rate configuration on OMAP34xx, which needs the rate to be
propagated properly to the divider node (dpll4_m5_ck).

Signed-off-by: Stefan Herbrechtsmeier 
Cc: Laurent Pinchart 
Cc: Tony Lindgren 
Cc: Tero Kristo 
Cc: 
Cc: 


Acked-by: Laurent Pinchart 

Tero, could you please process it for v3.17 if time still permits ?


This is too late for 3.17 merge window as I was on holiday last few 
weeks. Queued for 3.17-rc early fixes though.


-Tero




---
  arch/arm/boot/dts/omap3xxx-clocks.dtsi | 1 +
  1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/omap3xxx-clocks.dtsi
b/arch/arm/boot/dts/omap3xxx-clocks.dtsi index e47ff69..5c37500 100644
--- a/arch/arm/boot/dts/omap3xxx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap3xxx-clocks.dtsi
@@ -467,6 +467,7 @@
ti,bit-shift = <0x1e>;
reg = <0x0d00>;
ti,set-bit-to-disable;
+   ti,set-rate-parent;
};

dpll4_m6_ck: dpll4_m6_ck {




--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omap3isp as a wakeup source

2011-09-13 Thread Tero Kristo
On Tue, 2011-09-13 at 12:08 +0200, Enrico wrote:
> On Tue, Sep 13, 2011 at 11:48 AM, Tero Kristo  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  
> >> > 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
 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omap3isp as a wakeup source

2011-09-13 Thread Tero Kristo
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  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
 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html