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: 8903551 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 3D863BF29F for ; Thu, 21 Apr 2016 18:52:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B84C20320 for ; Thu, 21 Apr 2016 18:52:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8697220270 for ; Thu, 21 Apr 2016 18:52:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753039AbcDUSv6 (ORCPT ); Thu, 21 Apr 2016 14:51:58 -0400 Received: from lists.s-osg.org ([54.187.51.154]:34302 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753018AbcDUSv5 (ORCPT ); Thu, 21 Apr 2016 14:51:57 -0400 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 Cc: Kukjin Kim , linux-samsung-soc@vger.kernel.org, Seung-Woo Kim , dri-devel@lists.freedesktop.org, Inki Dae , Kyungmin Park , Krzysztof Kozlowski , David Airlie , Joonyoung Shim , Javier Martinez Canillas 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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; }