Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1397390

Re: [PATCH 5/7] ARM: OMAP: dmtimer: Do not call PM runtime functions when not needed.

From Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/7] ARM: OMAP: dmtimer: Do not call PM runtime functions when not needed.
Date 2016-05-09 23:00 +0200
Message-ID <rx0ry-4yi-41@gated-at.bofh.it> (permalink)
References <rwcl4-3SB-7@gated-at.bofh.it> <rwcl4-3SB-13@gated-at.bofh.it> <rwZc6-3qZ-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On  9.05.2016 22:36, Tony Lindgren wrote:
> * Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> [160507 08:24]:
>> once omap_dm_timer_start() is called, which calls omap_dm_timer_enable()
>> and thus pm_runtime_get_sync(), it doesn't make sense to call PM runtime
>> functions again before omap_dm_timer_stop is called(). Otherwise PM runtime
>> functions called in omap_dm_timer_enable/disable lead to long and unneeded
>> delays.
>>
>> Fix that by implementing an "enabled" counter, so the PM runtime functions
>> get called only when really needed.
>>
>> Without that patch Nokia N900 IR TX driver (ir-rx51) does not function.
>

Well, I just tested again, with the $subject patch reverted and 
contradictory to my own words, it worked just fine. I believe the reason 
is that I did hrtimer "migration" after I did the $subject patch. I was 
thinking the reason for the slow transmission was PWM dmtimer, but now 
it turns out it has been the "pulse" dmtimer. So, I think the $subject 
patch should be dropped.

> We should use pm_runtime for the refcounting though and call PM runtime
> unconditionally. Can you try to follow the standard PM runtime usage
> like this:
>

It works without that, but on the other hand, I finally have some 
reference on how PM runtime API should be called :).

> init:
> pm_runtime_use_autosuspend(&timer->pdev->dev);
> pm_runtime_set_autosuspend_delay(&timer->pdev->dev, 200);
> pm_runtime_enable(&timer->pdev->dev);
> ...
> enable:
> pm_runtime_get_sync(&timer->pdev->dev);
> ...
> disable:
> pm_runtime_mark_last_busy(&timer->pdev->dev);
> pm_runtime_put_autosuspend(&timer->pdev->dev);
> ...
> exit:
> pm_runtime_dont_use_autosuspend(&timer->pdev->dev);
> pm_runtime_put_sync(&timer->pdev->dev);
> pm_runtime_disable(&timer->pdev->dev);
>
> No idea what the timeout should be, maybe less than 200 ms. Also we need
> to test that off idle still works with timer1, that might need special
> handling.
>

Thanks,
Ivo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] ir-rx51 driver fixes Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
  [PATCH 3/7] [media] ir-rx51: use PWM framework instead of OMAP dmtimer Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
  [PATCH 4/7] [media] ir-rx51: add DT support to driver Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
    Re: [PATCH 4/7] [media] ir-rx51: add DT support to driver Rob Herring <robh@kernel.org> - 2016-05-09 22:10 +0200
      Re: [PATCH 4/7] [media] ir-rx51: add DT support to driver Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-09 23:00 +0200
        Re: [PATCH 4/7] [media] ir-rx51: add DT support to driver Rob Herring <robh@kernel.org> - 2016-05-09 23:10 +0200
          Re: [PATCH 4/7] [media] ir-rx51: add DT support to driver Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-10 00:10 +0200
          Re: [PATCH 4/7] [media] ir-rx51: add DT support to driver Sebastian Reichel <sre@kernel.org> - 2016-05-10 04:20 +0200
            Re: [PATCH 4/7] [media] ir-rx51: add DT support to driver Rob Herring <robh@kernel.org> - 2016-05-11 16:20 +0200
  [PATCH 6/7] [media] ir-rx51: use hrtimer instead of dmtimer Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
  [PATCH 5/7] ARM: OMAP: dmtimer: Do not call PM runtime functions when not needed. Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
    Re: [PATCH 5/7] ARM: OMAP: dmtimer: Do not call PM runtime functions  when not needed. Tony Lindgren <tony@atomide.com> - 2016-05-09 21:40 +0200
      Re: [PATCH 5/7] ARM: OMAP: dmtimer: Do not call PM runtime functions  when not needed. Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-09 23:00 +0200
  [PATCH 2/7] pwm: omap-dmtimer: Allow for setting dmtimer clock source Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
    Re: [PATCH 2/7] pwm: omap-dmtimer: Allow for setting dmtimer clock  source Rob Herring <robh@kernel.org> - 2016-05-09 22:10 +0200
  [PATCH 1/7] ir-rx51: Fix build after multiarch changes broke it Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200
  [PATCH 7/7] ARM: dts: n900: enable lirc-rx51 driver Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-05-07 17:30 +0200

csiph-web