Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2329815imu; Sun, 18 Nov 2018 21:40:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/V33uWfgzzqiZJDhxsoU6Tf/9WArOmdPb4+AajUayhZY4fAciqyQGcxxHTwR5jyeSOyDGvQ X-Received: by 2002:a17:902:e08b:: with SMTP id cb11mr3416135plb.263.1542606004761; Sun, 18 Nov 2018 21:40:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542606004; cv=none; d=google.com; s=arc-20160816; b=eoKZ0jTtiWAjjGfFva+e/AolZ8bWaAG7rrbU/HQcNBpJYG1QH5JMR9uRXHspKYC6+g QJchGcSBNwYxgOOl2eCZvOeHuyAxB/SziAeUifNs+4a0wG5MCgKj5c5SovlfWdjYMlAF zek0+AQfTAN8btwU/OrOgXhUIhJQ/5rRdJkYZvUy9XfKLntaVw9VqwHD6gAUASF+1dDA NXQeIhuCNe4ne/zCHi5dhIzOb3Z/3GiXpO4rqQBe15LXb6AccLhc/54dbvsq00/dt7Qp cTo9laz3MeeEb+eosk1pMB98PInTwVdvSikjOCK+nhlzxjvj8zAAvZusFPoCfGsQ3G/v VDzg== 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:date:cc:to:from:subject:message-id; bh=5ir+LAELI0iNTn/8oYsUBzxS+KcQqB8aCFuq3Et/81Y=; b=tud6PUVrT47Ltyi/qjCGeMzSYU9cWxR45jr+DJElMGQ4rJ+WwtBSiSgGfROrbgbVcb +5UeQwbA1EuMemmpCOTDpuHrFambjfpwPBx8dkv58i3JY3tuzOsARPV+I2pGu2rknQI3 IfICctNykYWW4i1LSdz9Y8i1BKmFUkdaz4Ou+v5KdEv8AlhvlkBhkNyg8N2fvD7PJIQ1 LcUc975BsBjjfZAuisgsqULd7/t6kKeztc0jo0DiYpVlCLB5Y8D5szrC/fBt+TKn/ynn BKiK7rU85lhQe4Q2aLDW1TIJZKzNw9dj0zwbmm5mfMs7ANaDA3pbeOO7jpWfPMs7vN91 tBCg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si38932444plx.310.2018.11.18.21.39.49; Sun, 18 Nov 2018 21:40:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726088AbeKSQBo (ORCPT + 99 others); Mon, 19 Nov 2018 11:01:44 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:54302 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725908AbeKSQBo (ORCPT ); Mon, 19 Nov 2018 11:01:44 -0500 X-UUID: 242e818e35404c0699433c94c60f9866-20181119 X-UUID: 242e818e35404c0699433c94c60f9866-20181119 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 346382193; Mon, 19 Nov 2018 13:39:01 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 19 Nov 2018 13:39:00 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkcas08.mediatek.inc (172.21.101.126) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 19 Nov 2018 13:38:59 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 19 Nov 2018 13:38:59 +0800 Message-ID: <1542605939.32082.12.camel@mtksdaap41> Subject: Re: [PATCH v5 05/12] drm: mediatek: Omit warning on probe defers From: CK Hu To: CC: , , , , , , , , , , , , , , , , , , , Matthias Brugger Date: Mon, 19 Nov 2018 13:38:59 +0800 In-Reply-To: <20181116125449.23581-6-matthias.bgg@kernel.org> References: <20181116125449.23581-1-matthias.bgg@kernel.org> <20181116125449.23581-6-matthias.bgg@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Matthias: On Fri, 2018-11-16 at 13:54 +0100, matthias.bgg@kernel.org wrote: > 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. This patch looks good to me, but you have not modified the sub driver in HDMI path. We could let HDMI path print the warning and someone send another patch later, or you modify for HDMI path in this patch. > > 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); I would like one more blank line here. > 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); I would like to align to the right of '('. Regards, CK > 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; > } >