Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3540338yba; Mon, 8 Apr 2019 22:46:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwI3SrMnlIyKyFwa0nlgFkoNH19S2q1XpZNT7nKC3GyZdIyKKwy1tx5pRIVP2W8Zosk5aYP X-Received: by 2002:a17:902:7c01:: with SMTP id x1mr9216001pll.299.1554788760354; Mon, 08 Apr 2019 22:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554788760; cv=none; d=google.com; s=arc-20160816; b=PcgrjNUCfv7M7zoRkXf3qcB4AlXBnWqKoK3aXFW29wuJKCktkA4Rp5iyAJOuOKE+jj rq+rAmHI58NlxaEy3+S0cojTpmvYAEVPJlgqzBLXKpQ86Ufpny12gsNucwA1+x0Vcj4o SbGDJjsYqxF7o23e2x2uq/lfw1ws7WB53dCjVJXt5NyFnBJ6E5xOXzF2g0sfz0mTQAM7 mrEFUF65PE0iMTyaV3LoNcMbyGypwTjw9u6Ph+eDuvC0V54KELFjaMk69RbFTpt+TJ7e 80GNcgYgLrGxVIUvsKWGuwTd3uQLcIIcSiLTQ/+TH4lXfjcoPKeQygL3iZtSVta+POxj IsVw== 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=q0NAFiWwSpG4KWzLuHQ04EvlGpBEL/wFNXYNbL3xQ4o=; b=CqYWkHiQ7cDt0oxlhlr671O29DIeOzeclYIykqcgNr6JeKquaHCgtGKSPYuZfq42A1 t+iJKMeCmd6+wizyUpjSxktREZpfYgAwHvIdB2R4j/PIorDveyuArmX9eRUIPKkM//Ou ajr6nQQbGT0W5gpxNtwh8UQFcDeG7cTv0J/I6W+DzhyYlAgN9y+mV+PniP/mCYOd/lJ+ 7B0kkRt03z6jqEi8TsQo1Y9JYlsji/W5OvIHECJ/i1A0O852VaT8wILieB0usbFDw4A+ 027AIMaiQPCxq+0C2OqhJb23YNFBqBys5UPXZvsSxs83wL62kvBStXcyVNFdXBXKWXmB S/Ig== 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 v22si11739337pfm.151.2019.04.08.22.45.44; Mon, 08 Apr 2019 22:46:00 -0700 (PDT) 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 S1727536AbfDIFjh (ORCPT + 99 others); Tue, 9 Apr 2019 01:39:37 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:18327 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727233AbfDIFjg (ORCPT ); Tue, 9 Apr 2019 01:39:36 -0400 X-UUID: ce7e1da9f77548d9a12a70dc19e48fdd-20190409 X-UUID: ce7e1da9f77548d9a12a70dc19e48fdd-20190409 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2144505031; Tue, 09 Apr 2019 13:39:29 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 9 Apr 2019 13:39:23 +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, 9 Apr 2019 13:39:23 +0800 Message-ID: <1554788363.336.5.camel@mtksdaap41> Subject: Re: [PATCH V9 1/5] drm/mediatek: remove flag CLK_SET_RATE_PARENT for mt2701 hdmi phy to not propagate rate change to parent From: CK Hu To: wangyan wang CC: Michael Turquette , Stephen Boyd , Matthias Brugger , "Philipp Zabel" , David Airlie , "Daniel Vetter" , chunhui dai , "Colin Ian King" , Sean Wang , "Ryder Lee" , , , , , , Date: Tue, 9 Apr 2019 13:39:23 +0800 In-Reply-To: <20190409030756.69496-2-wangyan.wang@mediatek.com> References: <20190409030756.69496-1-wangyan.wang@mediatek.com> <20190409030756.69496-2-wangyan.wang@mediatek.com> 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, Wangyan: On Tue, 2019-04-09 at 11:07 +0800, wangyan wang wrote: > From: Wangyan Wang > > This is the first step to make MT2701 hdmi stable. > The parent rate of hdmi phy had set by DPI driver. > We should not set or change the parent rate of MT2701 hdmi phy, > as a result we should remove the flags of "CLK_SET_RATE_PARENT" > from the clock of MT2701 hdmi phy. > > Signed-off-by: Wangyan Wang > --- > drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 13 +++++-------- > drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 + > drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 + > drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c | 1 + > 4 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c > index 4ef9c57ffd44..13bbaf997819 100644 > --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c > @@ -110,13 +110,11 @@ mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) > return NULL; > } > > -static void mtk_hdmi_phy_clk_get_ops(struct mtk_hdmi_phy *hdmi_phy, > - const struct clk_ops **ops) > +static void mtk_hdmi_phy_clk_get_data(struct mtk_hdmi_phy *hdmi_phy, > + struct clk_init_data *clk_init) I think you've tried to align, but the result looks not aligned. Make sure your editor have equal size for each character and and the 'tab' length is 8 character. Regards, CK > { > - if (hdmi_phy && hdmi_phy->conf && hdmi_phy->conf->hdmi_phy_clk_ops) > - *ops = hdmi_phy->conf->hdmi_phy_clk_ops; > - else > - dev_err(hdmi_phy->dev, "Failed to get clk ops of phy\n"); > + clk_init->flags = hdmi_phy->conf->flags; > + clk_init->ops = hdmi_phy->conf->hdmi_phy_clk_ops; > } > > static int mtk_hdmi_phy_probe(struct platform_device *pdev) > @@ -129,7 +127,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) > struct clk_init_data clk_init = { > .num_parents = 1, > .parent_names = (const char * const *)&ref_clk_name, > - .flags = CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE, > }; > > struct phy *phy; > @@ -167,7 +164,7 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) > hdmi_phy->dev = dev; > hdmi_phy->conf = > (struct mtk_hdmi_phy_conf *)of_device_get_match_data(dev); > - mtk_hdmi_phy_clk_get_ops(hdmi_phy, &clk_init.ops); > + mtk_hdmi_phy_clk_get_data(hdmi_phy, &clk_init); > hdmi_phy->pll_hw.init = &clk_init; > hdmi_phy->pll = devm_clk_register(dev, &hdmi_phy->pll_hw); > if (IS_ERR(hdmi_phy->pll)) { > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h > index f39b1fc66612..0045824c1be9 100644 > --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h > @@ -21,6 +21,7 @@ struct mtk_hdmi_phy; > > struct mtk_hdmi_phy_conf { > bool tz_disabled; > + unsigned long flags; > const struct clk_ops *hdmi_phy_clk_ops; > void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); > void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy); > diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c > index fcc42dc6ea7f..67a814649e19 100644 > --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c > +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c > @@ -202,6 +202,7 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) > > struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { > .tz_disabled = true, > + .flags = CLK_SET_RATE_GATE, > .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, > .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, > .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds, > diff --git a/drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c > index ed5916b27658..f44066875dcd 100644 > --- a/drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c > +++ b/drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c > @@ -309,6 +309,7 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) > } > > struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf = { > + .flags = CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE, > .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, > .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, > .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds,