Discussion:
[PATCH v2] [media] coda: Improve runtime PM support
Ulf Hansson
2014-10-23 12:15:02 UTC
Permalink
Hi Ulf,
For several reasons it's good practice to leave devices in runtime PM
active state while those have been probed.
In this cases we also want to prevent the device from going inactive,
until the firmware has been completely installed, especially when using
a PM domain.
Thanks for moving this to the next version, I have been a bit busy the
last week.
Changes looking good!
If I load the coda module on v3.18-rc1 with the GPC power domain patch
applied (at this point the power domain is disabled), the domain's
poweron callback is never called. It does work tough if I switch back to
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index ac71e11..5421969 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2393,9 +2393,8 @@ static int coda_probe(struct platform_device *pdev)
* coda_fw_callback regardless of whether CONFIG_PM_RUNTIME is
* enabled or whether the device is associated with a PM domain.
*/
- pm_runtime_get_noresume(&pdev->dev);
- pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
+ pm_runtime_get_sync(&pdev->dev);
return coda_firmware_request(dev);
}
At what point is the pm domain supposed to be enabled when I load the
module?
Hi Philipp,

The PM domain shall be powered on prior your driver starts probing.
This is a common problem when using the generic PM domain. The
workaround, which is causing other issues, is a pm_runtime_get_sync().

Now, could you please try to apply the below patchset, that should
hopefully fix your issue:

[PATCH v3 0/9] PM / Domains: Fix race conditions during boot
http://marc.info/?l=linux-pm&m=141320895122707&w=2

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Philipp Zabel
2014-10-23 13:13:39 UTC
Permalink
Hi Ulf,
Post by Ulf Hansson
At what point is the pm domain supposed to be enabled when I load the
module?
Hi Philipp,
The PM domain shall be powered on prior your driver starts probing.
This is a common problem when using the generic PM domain. The
workaround, which is causing other issues, is a pm_runtime_get_sync().
Now, could you please try to apply the below patchset, that should
[PATCH v3 0/9] PM / Domains: Fix race conditions during boot
http://marc.info/?l=linux-pm&m=141320895122707&w=2
thank you, that series does fix the issue.

regards
Philipp

Loading...