On 23 October 2014 13:57, Philipp Zabel <p.za...@pengutronix.de> wrote:
> Hi Ulf,
>
> Am Montag, den 22.09.2014, 20:44 +0200 schrieb Ulf Hansson:
>> On 22 September 2014 18:05, Philipp Zabel <p.za...@pengutronix.de> wrote:
>> > From: Ulf Hansson <ulf.hans...@linaro.org>
>> >
>> > 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.
>> >
>> > Signed-off-by: Ulf Hansson <ulf.hans...@linaro.org>
>> > Signed-off-by: Philipp Zabel <p.za...@pengutronix.de>
>>
>> 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
> explicitly calling pm_runtime_get_sync:
>
> 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-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to