From patchwork Mon May 14 12:30:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 10398185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E11B360216 for ; Mon, 14 May 2018 12:31:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D652F2914E for ; Mon, 14 May 2018 12:31:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3F142914B; Mon, 14 May 2018 12:31:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B676291A3 for ; Mon, 14 May 2018 12:31:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753206AbeENMau (ORCPT ); Mon, 14 May 2018 08:30:50 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:35964 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752985AbeENMat (ORCPT ); Mon, 14 May 2018 08:30:49 -0400 Received: by mail-io0-f193.google.com with SMTP id d73-v6so14971485iog.3 for ; Mon, 14 May 2018 05:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ljjtGxm3SZB+MyVVe1cT4zpB7JPhG9uBVO4b9BjWEN0=; b=KinmAk8TSd1eJv4f5UlAaCKT1OMT2yjRAgZOEU2Z/vOIADrr9IiFBy/da0H7pKhV69 rFObX4tEqtgYP/PV02IkZYyfG7DOwLthNcvlARD67mEqIr1KX+mIJev7LYhPgAxB3PQd d1Ds0H8/eHnfEkhyLRXis4RoSm0s3Pd8Wlerw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ljjtGxm3SZB+MyVVe1cT4zpB7JPhG9uBVO4b9BjWEN0=; b=Hygw3yNzXsd1CLKidotuxSygsu5shNVtSjyxpdIc+Bn5viZNxyTNuXklw6X96nUJai umEIXcfBieQemoeyMjRTs1Mi+kvQVugVE5E25bFAZS4eOV07Qi2miqiqOz9lzQg7/8t6 xvH9SJ3mW9tpomMVGzoSdpqUpL+7tVxvEtti0RE9AM3u5RlFovAZh5NgJ9VBovWB9me1 L+Cl1Y2A6PeCM1o3G9Dsxq/Sv9IsB/ZgFJKinkrbV0NazDGMJGnYOD6KBS+OTCZ54tIJ f4Qzn9lnY/RbXfDPaVuTj9ueQKScosCii6DW35FdMQQC/6YQ4ETp+Z+RbUZM0ormKWZv stDg== X-Gm-Message-State: ALKqPwf5uADUupJe0o2/YSI5TARqcnPuUvEn8YW6nSvPAxz1GEIt1FKT cIWcs+9teFbFAhu3wLECEl9Q6aTgqUM1GRMhIvfqWw== X-Google-Smtp-Source: AB8JxZpCBSBkWMNML83tWjE858vBu4lJq+A6xyGCdv9m6DbvxdE/sW5P7zeuKm7CHtENRHQxXNcVIZxnGS8nsU2Q2+g= X-Received: by 2002:a6b:84a6:: with SMTP id o38-v6mr10317899ioi.119.1526301048384; Mon, 14 May 2018 05:30:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:7347:0:0:0:0:0 with HTTP; Mon, 14 May 2018 05:30:47 -0700 (PDT) In-Reply-To: References: From: Ulf Hansson Date: Mon, 14 May 2018 14:30:47 +0200 Message-ID: Subject: Re: [FAIL bisect] Sound card probe error To: Sylwester Nawrocki , Krzysztof Kozlowski Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Marek Szyprowski , Mark Brown , Inki Dae , "linux-samsung-soc@vger.kernel.org" , Linux Kernel Mailing List , Linux ARM , Andrzej Hajda Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 14 May 2018 at 14:22, Sylwester Nawrocki wrote: > Hi, > > On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote: > >> Bisected to: >> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit >> commit 8c123c14bbba4add148536b6d47a9226deda2f7a >> Author: Ulf Hansson >> Date: Thu Apr 26 10:53:06 2018 +0200 >> >> driver core: Respect all error codes from dev_pm_domain_attach() >> >> The limitation of being able to check only for -EPROBE_DEFER from >> dev_pm_domain_attach() has been removed. Hence let's respect all error >> codes and bail out accordingly. >> >> Signed-off-by: Ulf Hansson >> Acked-by: Greg Kroah-Hartman >> Signed-off-by: Rafael J. Wysocki > > The DRM driver creates the HDMI codec but its registration fails, due > to some missing clocks. The clock are missing because the exynos5-subcmu > driver probing fails. > > [ 0.678578] exynos5-subcmu: probe of GSC failed with error -17 > [ 0.679250] exynos5-subcmu: probe of MFC failed with error -17 > [ 0.679992] exynos5-subcmu: probe of DISP failed with error -17 > > The exynos5-subcmu driver before registering platform device makes > of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach() > call will fail, as dev->pm_domain is already set. Previously the error > was masked by code removed in the above commit and platform_drv_probe() > was could complete successfully. Thanks for providing this information! I was about to tell that I overlooked the fact that there is more than one way to assign PM domain pointers to devices. To fix the problem, dev_pm_domain_attach() should return 0, not -EEXIST when it finds and existing PM domain pointer. Does the below patch fix the problem? From: Ulf Hansson Date: Mon, 14 May 2018 14:26:16 +0200 Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain exists As dev_pm_domain_attach() isn't the only way to assign PM domain pointers to devices, clearly we must allow a device to have the pointer already being assigned. For this reason, return 0 instead of -EEXIST. Reported-by: Krzysztof Kozlowski Signed-off-by: Ulf Hansson Tested-by: Krzysztof Kozlowski --- drivers/base/power/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index 5e4b481..390868c 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c @@ -106,7 +106,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on) int ret; if (dev->pm_domain) - return -EEXIST; + return 0; ret = acpi_dev_pm_attach(dev, power_on); if (!ret)