Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp86397yba; Mon, 1 Apr 2019 02:15:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9qPteG6D15iKb83N+93pQOtqqF0QjVp1bY80pPYUvND5KswIf2fNt3kkzDHmz4robJFQQ X-Received: by 2002:a17:902:380c:: with SMTP id l12mr63557845plc.238.1554110157613; Mon, 01 Apr 2019 02:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554110157; cv=none; d=google.com; s=arc-20160816; b=a1aXErr4Ue3nZwW2sF7D7SphOi6LL+LCQX+QXgeSztGHUT0cmQGiYCKOeFgFWX+K1v yIK8xkloKZVSOjen22avvFfERxN2q10CDQQ8WBH5lnInQESoXky/57v/2ABndwgySyGQ zQTM2I96q8RNEAQpQOyLMdE8h5NzhXxZvx0iZg3JQeIQyxBU0et3f6RNYzc1FRQUY1xX MOGfcT4mLsedItMadEF89oJAs7M1cHWhqYrt80XIs47drKorRNSGQgxixdrUuMWt2xRD 1mBfuak+iYj9hM0f2RTI6hszrJkkeAR8CExjEA37Hj8xmD4iEY5sJCWTZgPb9TpdalbL 3aTQ== 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=2v2DV6rfv8d1Z/0ws6nzF1it9p5y2FvqyWboLxou6PI=; b=FJKWJNtgVWKPAUK5UkWascObpqefqKgYHz/8E6fhkS+NxO3K4xykzBZoXD5MiVVKk5 M2cPGc1ZwXpFP5F+ET0b28VNuKGDm537H96LTHfleC3f6pbRZgJZGdmoSRZbNmo88Foj t4pIf6JO1VoHcUBj3ZJXOiV/r12ykf3eplCsZLBz4Eh7CK2e58ETzrkzFuWaW13ubfy1 BGS4Ec1hZ85S8be/4Y4fEtQ2Js775ja84z7GRuj1+yn+TXqIyTkNtxlpFMdr/pBgjhsL UPANFuvx0H7jJF0GfJgZrpUWXEVd1WjEdiyNirbywcKvEeOSnalCbAKSnpp+1hXz9AnC bFvg== 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 b8si382090pfd.55.2019.04.01.02.15.42; Mon, 01 Apr 2019 02:15:57 -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 S1725961AbfDAJO5 (ORCPT + 99 others); Mon, 1 Apr 2019 05:14:57 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:39693 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725820AbfDAJO5 (ORCPT ); Mon, 1 Apr 2019 05:14:57 -0400 X-UUID: 02fcdf1d6d9047b48110ae53dddb3e78-20190401 X-UUID: 02fcdf1d6d9047b48110ae53dddb3e78-20190401 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 343525915; Mon, 01 Apr 2019 17:14:36 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 1 Apr 2019 17:14:34 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 1 Apr 2019 17:14:34 +0800 Message-ID: <1554110075.2011.4.camel@mtksdaap41> Subject: Re: [PATCH V7 2/6] drm/mediatek: move the setting of fixed divider 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: Mon, 1 Apr 2019 17:14:35 +0800 In-Reply-To: <20190327091929.73162-3-wangyan.wang@mediatek.com> References: <20190327091929.73162-1-wangyan.wang@mediatek.com> <20190327091929.73162-3-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 Wed, 2019-03-27 at 17:19 +0800, wangyan wang wrote: > From: chunhui dai > > move the setting of fixed divider from enable/disable > to the function of setting rate. > > the patch is for hdmi pll divider, the divder should > be configured before clock calculation to ensure the > clock is right. I think this patch is introduced by the patch "drm/mediatek: recalculate hdmi phy clock of MT2701 by querying hardware", so I would like to squash this patch into that patch. Regards, CK > > Signed-off-by: chunhui dai > Signed-off-by: wangyan wang > --- > drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c > index 9dcf9c2ff37a..6f29e87eefd0 100644 > --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c > +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c > @@ -79,7 +79,6 @@ static int mtk_hdmi_pll_prepare(struct clk_hw *hw) > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SLDO_MASK); > usleep_range(80, 100); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_MBIAS_LPF_EN); > - mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_EN_TX_POSDIV); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SER_MASK); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_PRED_MASK); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_DRV_MASK); > @@ -94,7 +93,6 @@ static void mtk_hdmi_pll_unprepare(struct clk_hw *hw) > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_DRV_MASK); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_PRED_MASK); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SER_MASK); > - mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_EN_TX_POSDIV); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_MBIAS_LPF_EN); > usleep_range(80, 100); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SLDO_MASK); > @@ -123,6 +121,7 @@ static int mtk_hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate, > > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON6, RG_HTPLL_PREDIV_MASK); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON6, RG_HTPLL_POSDIV_MASK); > + mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_EN_TX_POSDIV); > mtk_hdmi_phy_mask(hdmi_phy, HDMI_CON6, (0x1 << RG_HTPLL_IC), > RG_HTPLL_IC_MASK); > mtk_hdmi_phy_mask(hdmi_phy, HDMI_CON6, (0x1 << RG_HTPLL_IR), > @@ -207,7 +206,6 @@ static void mtk_hdmi_phy_enable_tmds(struct mtk_hdmi_phy *hdmi_phy) > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SLDO_MASK); > usleep_range(80, 100); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_MBIAS_LPF_EN); > - mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_EN_TX_POSDIV); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SER_MASK); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_PRED_MASK); > mtk_hdmi_phy_set_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_DRV_MASK); > @@ -219,7 +217,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_DRV_MASK); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_PRED_MASK); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SER_MASK); > - mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_EN_TX_POSDIV); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON2, RG_HDMITX_MBIAS_LPF_EN); > usleep_range(80, 100); > mtk_hdmi_phy_clear_bits(hdmi_phy, HDMI_CON0, RG_HDMITX_EN_SLDO_MASK);