From patchwork Thu Apr 21 18:51:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 8903531 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A0D61BF29F for ; Thu, 21 Apr 2016 18:52:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A96E42034B for ; Thu, 21 Apr 2016 18:52:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A2132202EC for ; Thu, 21 Apr 2016 18:52:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D1E76ED6F; Thu, 21 Apr 2016 18:51:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lists.s-osg.org (lists.s-osg.org [54.187.51.154]) by gabe.freedesktop.org (Postfix) with ESMTP id 303B36ED6F for ; Thu, 21 Apr 2016 18:51:58 +0000 (UTC) Received: from minerva.sisa.samsung.com (host-181.58.217.201.copaco.com.py [201.217.58.181]) by lists.s-osg.org (Postfix) with ESMTPSA id 4CDC6E28A0; Thu, 21 Apr 2016 18:51:58 +0000 (UTC) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH] drm/exynos/hdmi: Don't print error on deferral due to regulators Date: Thu, 21 Apr 2016 14:51:38 -0400 Message-Id: <1461264698-9890-1-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.5.5 Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Seung-Woo Kim , dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Kyungmin Park , Kukjin Kim X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The regulators may not be available just because their driver's probe function was just not executed and so the regulators not registered. So, in this case the Exynos HDMI driver should not print logs since a -EPROBE_DEFER is not really an error and that will just pollute the kernel log and confuse users. This patch prevents the following misleading messages to be printed: [ 1.443638] [drm:hdmi_probe] *ERROR* failed to get regulators [ 1.449326] [drm:hdmi_probe] *ERROR* hdmi_resources_init failed Reported-by: Krzysztof Kozlowski Signed-off-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski --- The real fix for these kind of issues is to change the device model core to support device dependencies so the number of probe deferral should be minimal or non-existent, instead of fixing on each driver. But there have been different attempts [0,1] to implement this and there doesn't seem that this will be solved in the short term. [0]: https://lkml.org/lkml/2014/5/12/452 [1]: https://lkml.org/lkml/2015/5/25/251 drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index e148d728e28c..dcac78b8aa16 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1728,7 +1728,8 @@ static int hdmi_resources_init(struct hdmi_context *hdata) } ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(supply), hdata->regul_bulk); if (ret) { - DRM_ERROR("failed to get regulators\n"); + if (ret != -EPROBE_DEFER) + DRM_ERROR("failed to get regulators\n"); return ret; } @@ -1852,7 +1853,8 @@ static int hdmi_probe(struct platform_device *pdev) ret = hdmi_resources_init(hdata); if (ret) { - DRM_ERROR("hdmi_resources_init failed\n"); + if (ret != -EPROBE_DEFER) + DRM_ERROR("hdmi_resources_init failed\n"); return ret; }