<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/23 myungjoo.ham <span dir="ltr"><<a href="mailto:myungjoo.ham@samsung.com" target="_blank">myungjoo.ham@samsung.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2013/4/22 Inki Dae<br>
<div><div class="h5">> 2013/4/22 Rafael J. Wysocki <<a href="mailto:rjw@sisk.pl">rjw@sisk.pl</a>><br>
> > On Monday, April 22, 2013 12:37:36 PM Tomasz Figa wrote:<br>
> > > On Monday 22 of April 2013 12:17:39 Sylwester Nawrocki wrote:<br>
> > > > On 04/22/2013 12:03 PM, Inki Dae wrote:<br>
> > > > >     > Also looks good to me. But what if power domain was disabled<br>
without<br>
> > > > >     > pm<br>
> > > > >     > runtime? In this case, you must enable the power domain at<br>
machine<br>
> > > > >     > code or<br>
> > > > >     > bootloader somewhere. This way would not only need some hard<br>
codes<br>
> > > > >     > to turn<br>
> > > > >     > the power domain on but also not manage power management<br>
fully. This<br>
> > > > >     > is same as only the use of pm runtime interface(needing some<br>
hard<br>
> > > > >     > codes without pm runtime) so I don't prefer to add<br>
> > > > >     > clk_enable/disable to fimd probe(). I quite tend to force<br>
only the<br>
> > > > >     > use of pm runtime as possible. So please add the hard codes<br>
to<br>
> > > > >     > machine code or bootloader like you did for power domain if<br>
you<br>
> > > > >     > want to use drm fimd without pm runtime.<br>
> > > > ><br>
> > > > >     That's not how the runtime PM, clock subsystems work:<br>
> > > > ><br>
> > > > >     1) When CONFIG_PM_RUNTIME is disabled, all the used hardware<br>
must be<br>
> > > > >     kept<br>
> > > > >     powered on all the time.<br>
> > > > ><br>
> > > > >     2) Common Clock Framework will always gate all clocks that<br>
have zero<br>
> > > > >     enable_count. Note that CCF support for Exynos is already<br>
merged for<br>
> > > > >     3.10 and it will be the only available clock support method<br>
for<br>
> > > > >     Exynos.<br>
> > > > ><br>
> > > > >     AFAIK, drivers must work correctly in both cases, with<br>
> > > > >     CONFIG_PM_RUNTIME<br>
> > > > >     enabled and disabled.<br>
> > > > ><br>
> > > > > Then is the driver worked correctly if the power domain to this<br>
device was<br>
> > > > > disabled at bootloader without CONFIG_PM_RUNTIME and with<br>
clk_enable()?  I<br>
> > > > > think, in this case, the device wouldn't be worked correctly<br>
because the<br>
> > > > > power of the device remains off. So you must enable the power<br>
domain<br>
> > > > > somewhere. What is the difference between these two cases?<br>
> > > ><br>
> > > > How about making the driver dependant on PM_RUNTIME and making it<br>
always<br>
> > > > use pm_runtime_* API, regardless if the platform actually implements<br>
runtime<br>
> > > > PM or not ? Is there any issue in using the Runtime PM core always,<br>
rather<br>
> > > > than coding any workarounds in drivers when PM_RUNTIME is disabled ?<br>
> > ><br>
> > > I don't think this is a good idea. This would mean that any user that<br>
from<br>
> > > some reasons don't want to use PM_RUNTIME, would not be able to use<br>
the driver<br>
> > > anymore.<br>
> > ><br>
> > > Rafael, Kevin, do you have any opinion on this?<br>
> > I agree.<br>
> ><br>
> > Drivers should work for CONFIG_PM_RUNTIME unset too and static inline<br>
stubs for<br>
> > all runtime PM helpers are available in that case.<br>
> ><br>
> Hi Rafael,<br>
> The embedded system, at least Exynos SoC case, has the power domain device<br>
and this device could be enabled only by pm runtime interface. So the device<br>
couldn't be worked correctly without turning the power domain on only<br>
calling clk_enable(). In this case, the power domain must be enabled at<br>
machine code or bootloader. And the machine without CONFIG_PM_RUNTIME would<br>
assume that their own drivers always are enabled so the devices would be<br>
worked correctly. Is there any my missing point?<br>
<br>
<br>
</div></div>- Power domain: not controlled if !CONFIG_PM_RUNTIME. Thus, we may<br>
assume that every power domain is kept ON from boot time if<br>
!CONFIG_PM_RUNTIME.<br>
If power domain is kept OFF from boot time (machine init code or bootloader)<br>
with !CONFIG_PM_RUNTIME, then it's simple a mistake at BSP writer.<br>
<br>
- Yes, the clock is still controlled while !CONFIG_PM_RUNTIME.<br>
<br>
My opinion is also to let probe do clk-enables though I don't want it<br>
to have #ifdef or "clk_enable()" in the probe function.<br>
Thus, implementing "power_on()"-like function in the driver and let probe()<br>
and<br>
runtime_pm_get callback call it seems appropriate to me.<br>
(that "fimd_active(ctx, true)" is "power-on" to itself, right?)<br>
<br></blockquote><div><br></div><div>I thought that it should assume the power domain and relevant clocks are enabled without CONFIG_PM_RUNTIME. So could anyone please tell me about that? If only the power domain , I think Tomasz's proposal is good solution.<br>
<br></div><div>Thanks,<br>Inki Dae<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
MyungJoo<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in<br>
the body of a message to <a href="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</a><br>
More majordomo info at  <a href="http://vger.kernel.org/majordomo-info.html" target="_blank">http://vger.kernel.org/majordomo-info.html</a><br>
</div></div></blockquote></div><br></div></div>