Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp209676imu; Mon, 19 Nov 2018 20:59:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/XmgQhs9H6bcFBo6PJJws26AboTaqAxkRRntvKwf/ZF61r4tvssUpjs/dTyQ34qpan8Xmhy X-Received: by 2002:a17:902:a58a:: with SMTP id az10mr691152plb.151.1542689987343; Mon, 19 Nov 2018 20:59:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542689987; cv=none; d=google.com; s=arc-20160816; b=ahgNTedSbVmp3iuKjBKMLQ1WgjI7J0KskekCvCYXrix8JoXZVMQBLM/KZBqnwfENPZ kvbwORgKQ59RhU2AJTwoYag5LjN+8omFWiJTsxqswt2HLESwrpvl1ek13bIa5B/AJhxL P7aBGImh4a67+muAOJSQvPffTedO2G/UWdWm8gOJqa+nh2WTa6d3Mu0NthSYuHTa+sFh i7kgysu1JlLFg5ui6VuLBIsA+VpL40BNki3/bh2wSm4iqU5D+bixxmh1txIynaXTsF/J 2dytoDuwB+SDHG3T9MKWyDKhhhX6ZCRX0eSBeofydy7OSd8humROm9MBtkAxTw5CqczP LSRA== 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=cClG1piB9m18FKLNHJpvr4cIfX+nIT4+svYQJOGQ/yA=; b=Qg11aIlY0rG6/opr/bpllLL7Jns8UahXzkik/wFbVtSw6JsE9etNgMsCSQCZBCU/Qx Wy6kYTpGAYvcUo+RF/BGKgTfjoe++fXwpEExRt8tfilk+tD11a0bYnOWTm/PNAxY/Ga+ vr2TVuNyZvjJ+OG2nmg0hGJp75Mhb6KGOhJJ/UKyRvGBCGagS8OFKatPpfMuSsZZ7Ian 1omJ4vo7qDSFxInKKPKmutwsB1QEeqf8pvFSazS2kpglM0cBvcs6+lDFum7upN5ZjSGJ OypNLe6rFhny5wEFvePEFdybh1zknRrzWnblPZRKFZE6MazAFbSn5zZD8wcVBxv764L3 Ft3w== 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 h36si40502009pgm.200.2018.11.19.20.59.30; Mon, 19 Nov 2018 20:59:47 -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 S1731039AbeKTOhE (ORCPT + 99 others); Tue, 20 Nov 2018 09:37:04 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:35911 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727880AbeKTOhE (ORCPT ); Tue, 20 Nov 2018 09:37:04 -0500 X-UUID: 4ca6aa6169574b08a57506ee4e294684-20181120 X-UUID: 4ca6aa6169574b08a57506ee4e294684-20181120 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 203659341; Tue, 20 Nov 2018 12:09:50 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 20 Nov 2018 12:09:49 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkcas08.mediatek.inc (172.21.101.126) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 20 Nov 2018 12:09:48 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 20 Nov 2018 12:09:42 +0800 Message-ID: <1542686982.26483.1.camel@mtksdaap41> Subject: Re: [PATCH v5 05/12] drm: mediatek: Omit warning on probe defers From: CK Hu To: Matthias Brugger CC: , , , , , , , , , , , , , , , , , , , Matthias Brugger Date: Tue, 20 Nov 2018 12:09:42 +0800 In-Reply-To: <1542686700.9073.15.camel@mtksdaap41> References: <20181116125449.23581-1-matthias.bgg@kernel.org> <20181116125449.23581-6-matthias.bgg@kernel.org> <1542605939.32082.12.camel@mtksdaap41> <0a02edf9-78da-dde9-4b69-38c4719b711b@gmail.com> <1542686700.9073.15.camel@mtksdaap41> 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, On Tue, 2018-11-20 at 12:05 +0800, CK Hu wrote: > Hi, Matthias: > > On Mon, 2018-11-19 at 10:26 +0100, Matthias Brugger wrote: > > > > On 19/11/2018 06:38, CK Hu wrote: > > > 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. > > > > Sure, I'll add this in v6. After inspecting the code, I think we will need to > > also check for not initialized clocks in mtk_mdp_comp_init, as the driver for > > now does not even check if the clocks are present. What do you think? > > Yes, we do really need to consider mdp driver because mmsys clock > include mdp clock. You remind me that mmsys control 4 major function: > drm routing, drm clock, mdp routing, and mdp clock. Your design let the > mmsys device as drm device (control drm routing) and create a sub device > as clock device (control drm clock, mdp clock). If one day mdp device > (may need control drm routing) need to control the register of mdp Sorry for typo: 'mdp device (may need control mdp routing)' Regards, CK > routing, would mdp device be a sub device? Or we need not to consider > this because it need not to access mmsys register now? > > Regards, > CK > > > > > I'll address the coding style issue you metioned below as well. > > > > Regards, > > Matthias > > > > >> > > >> 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; > > >> } > > >> > > > > > > >