Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



28.04.2020 19:04, Dmitry Osipenko пишет:
...
>>>>>>>> +             ret = pm_runtime_get_sync(csi->dev);
>>>>>>>> +             if (ret < 0) {
>>>>>>>> +                     dev_err(csi->dev,
>>>>>>>> +                             "failed to get runtime PM: %d\n",
>>>>>>>> ret);
>>>>>>>> +                     pm_runtime_put_noidle(csi->dev);
>>> Why this pm_runtime_put_noidle() is needed? This should be wrong, please
>>> remove it.
>>
>> pm_runtime_get_sync() increments power.usage_count prior to rpm_resume
>>
>> if rpm_resume fails it does not decrement usage_count.
>>
>> So to balance count on failure, calling pm_runtime_put_noidle()
> 
> Hmm.. maybe you're right. I'll need to take a more detailed look.
> 

I checked the RPM's use-count after error condition and yours variant is
correct. Perhaps we should start correcting all other Tegra drivers that
do not handle the RPM error properly.



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux