Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp432501imu; Fri, 16 Nov 2018 04:58:09 -0800 (PST) X-Google-Smtp-Source: AJdET5exZseywpYlHbfTdOrrZW8P7wNkr302bMwYhTv+vcvK5HRq2OuZhp4dJbvq1T4TH7BQQwSB X-Received: by 2002:a62:509b:: with SMTP id g27mr11033311pfj.48.1542373089334; Fri, 16 Nov 2018 04:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542373089; cv=none; d=google.com; s=arc-20160816; b=xE6BYIOFxPtYTPSTU5kDPgurGN65h+b47lZL6Gn4O+iFKQn5x3afDgJMszwP0HtdB2 xbexIQXYl00dNm2t/DRQGQJePPmdMaf1CyXHjMK9EbUM8Bt7wIchs7P+C6Y9UDQFftt1 +7s25inQeOYGHQ0wp/EpLuMCg7UNodNn7yOY1jYI049oSmiOdHhQL5zDbja6YgqsxpGL XvByILLkb3Vl1oCvWW7LseDNKKCQF9JpEvatW+gkUrVvbVyl7ycTQbDeXG0m1S4kG1Nt 0jU+tKUFbeL7i/PjqoFU4PK8VJgUHYfZDTOTFCGDZ2qbEpshhhJjX5ZapLI6UPmMRG3h 6o5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=X567guqZRFDMO0PRRWHAXisp5Tx6MOp6pp+Mhi3vmBM=; b=0tiQ0n6kItlcS2l+qmr3SescF0E+pCjVGgXRNp9i8rKqZmXxWbfLfELAT9HSf8TSEP 2Zfz1VnzOr43Jk2x4P17uqiMUBKY8wpCzDXZsIgKLMmVy/B7bhHL/p9sP8RQsr/9CDUb TrWMR2hIjzBxudq3IBKu+DJYMR4gzu0BuM8XowOVl3yWE5JtlcXa7z4gxvSqejv9/LR2 GJ65QPN2KVlGjPKnn/ZeJ9hpIY9QQueU2Q4JNgILC4I6yi+vjPk4R1zrRQC2J1Ft23ue lLQl/8aLRE/AJG3N67X5cXgmRawkmYVQnD4o6+4Crp/q4l89ha75CwCP6BcQzoRk6lGr 3r5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NH30wT7i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i189si1941578pfg.265.2018.11.16.04.57.55; Fri, 16 Nov 2018 04:58:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NH30wT7i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389867AbeKPXII (ORCPT + 99 others); Fri, 16 Nov 2018 18:08:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:33742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727965AbeKPXIH (ORCPT ); Fri, 16 Nov 2018 18:08:07 -0500 Received: from ziggy.de (unknown [93.176.133.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4CE6C214F1; Fri, 16 Nov 2018 12:55:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542372949; bh=7xsfE/PZIAZEAQOD44EBU/Y4cgjT7SwPdA2gceCO4eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NH30wT7ifmxPNW02CwbGgdyrmickULnV5Wu68wb55FcP6OxJwD7Il5nfDL1q0+yj5 BsOvVZDbrpKccWLVV2q9cGWIfm4qhGFdhwzm3a0Y8ebml8Vrr4LdJSLNoMdhXF38ri Xx3KZBm//3gJhCr/DAVtqDgWCKEyGP9vDk5h/JgU= From: matthias.bgg@kernel.org To: robh+dt@kernel.org, mark.rutland@arm.com, ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, mturquette@baylibre.com, sboyd@codeaurora.org, ulrich.hecht+renesas@gmail.com, laurent.pinchart@ideasonboard.com, matthias.bgg@gmail.com Cc: sean.wang@mediatek.com, sean.wang@kernel.org, rdunlap@infradead.org, wens@csie.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Matthias Brugger Subject: [PATCH v5 05/12] drm: mediatek: Omit warning on probe defers Date: Fri, 16 Nov 2018 13:54:42 +0100 Message-Id: <20181116125449.23581-6-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181116125449.23581-1-matthias.bgg@kernel.org> References: <20181116125449.23581-1-matthias.bgg@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthias Brugger It can happen that the mmsys clock drivers aren't probed before the platform driver gets invoked. The platform driver used to print a warning that the driver failed to get the clocks. Omit this error on the defered probe path. Signed-off-by: Matthias Brugger --- drivers/gpu/drm/mediatek/mtk_disp_color.c | 4 +++- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +++- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 4 +++- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 3 ++- drivers/gpu/drm/mediatek/mtk_dsi.c | 6 ++++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_color.c b/drivers/gpu/drm/mediatek/mtk_disp_color.c index f609b62b8be6..1ea3178d4c18 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_color.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_color.c @@ -126,7 +126,9 @@ static int mtk_disp_color_probe(struct platform_device *pdev) ret = mtk_ddp_comp_init(dev, dev->of_node, &priv->ddp_comp, comp_id, &mtk_disp_color_funcs); if (ret) { - dev_err(dev, "Failed to initialize component: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to initialize component: %d\n", + ret); return ret; } diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 28d191192945..5ebbcaa4e70e 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -293,7 +293,9 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) ret = mtk_ddp_comp_init(dev, dev->of_node, &priv->ddp_comp, comp_id, &mtk_disp_ovl_funcs); if (ret) { - dev_err(dev, "Failed to initialize component: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to initialize component: %d\n", + ret); return ret; } diff --git a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c index b0a5cffe345a..59a08ed5fea5 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c @@ -295,7 +295,9 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev) ret = mtk_ddp_comp_init(dev, dev->of_node, &priv->ddp_comp, comp_id, &mtk_disp_rdma_funcs); if (ret) { - dev_err(dev, "Failed to initialize component: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to initialize component: %d\n", + ret); return ret; } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c index b06cd9d4b525..b76a2d071a97 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c @@ -566,7 +566,8 @@ static int mtk_ddp_probe(struct platform_device *pdev) ddp->clk = devm_clk_get(dev, NULL); if (IS_ERR(ddp->clk)) { - dev_err(dev, "Failed to get clock\n"); + if (PTR_ERR(ddp->clk) != -EPROBE_DEFER) + dev_err(dev, "Failed to get clock\n"); return PTR_ERR(ddp->clk); } diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 90109a0d6fff..cc6de75636c3 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -1103,14 +1103,16 @@ static int mtk_dsi_probe(struct platform_device *pdev) dsi->engine_clk = devm_clk_get(dev, "engine"); if (IS_ERR(dsi->engine_clk)) { ret = PTR_ERR(dsi->engine_clk); - dev_err(dev, "Failed to get engine clock: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get engine clock: %d\n", ret); return ret; } dsi->digital_clk = devm_clk_get(dev, "digital"); if (IS_ERR(dsi->digital_clk)) { ret = PTR_ERR(dsi->digital_clk); - dev_err(dev, "Failed to get digital clock: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get digital clock: %d\n", ret); return ret; } -- 2.19.1