From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07B4EC4BA09 for ; Wed, 26 Feb 2020 01:42:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD7022082F for ; Wed, 26 Feb 2020 01:42:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GXbIfyXu"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="mp6i0DNQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD7022082F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aA/DsZd2NGsO2LPkjXECYlf5+pFPpOSINcu+xRAF8pU=; b=GXbIfyXuK8r/t3 YCG2YmY+y27Bs4M5omizV9BC+S4mnQ+ghNp/n/lFSwcaDH71QYFpUXP43sTq3t6ueroc8oc1N5Cpo z1n9HBpJEuL9Ln49/YXQkH/hs4ZuDRi2TNu2QdD8EPmA7qRDVpfVUhnqMiDO6VF6Zef91aX3nXWox Z7wAa34mYzjXWwTI+DtALpeDnYJ222xzOfo+T6bUwpg6hiDyHdUKNQbV03kl8YxOl3DqOs2aO01jo dC9E21CChkMqPTi2BfiUDSQyAK/cd+XZuuGvzz7JOrHbM/fXI4dJFk561Q8cjIXHYGAxkLIYy87Tn zJPj4BUsNYyyGSN9ECEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6li6-0001qQ-Ug; Wed, 26 Feb 2020 01:42:02 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6lhv-0001gu-GI; Wed, 26 Feb 2020 01:41:52 +0000 X-UUID: 72fd026f75e94ce69a78e8c0719d647f-20200225 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=Xu9DYGIIRAkO+LnNVacxwQSBi+uqDoimnhH6PXA+e30=; b=mp6i0DNQhJAdJoUdz1yS5fEkH6Ghw67Q8XxiiO/+aOoSNcAPh1Y5o1P7jb1nzT6nfhzVG9a94EdkW3HSvPl41Y/5IlzNa8vfv3PgwYFYb6MaZi+1Rr1BhrRiV6Vtg3K713I/9ATpnXOztzvjFFpuaT1w0Z+4r6qbJTNkGxW3550=; X-UUID: 72fd026f75e94ce69a78e8c0719d647f-20200225 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 115145819; Tue, 25 Feb 2020 17:41:43 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 25 Feb 2020 17:42:47 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 26 Feb 2020 09:40:52 +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; Wed, 26 Feb 2020 09:39:24 +0800 Message-ID: <1582681300.16944.3.camel@mtksdaap41> Subject: Re: [PATCH v8 6/7] drm/mediatek: add mt8183 dpi clock factor From: CK Hu To: Jitao Shi Date: Wed, 26 Feb 2020 09:41:40 +0800 In-Reply-To: <20200225094057.120144-7-jitao.shi@mediatek.com> References: <20200225094057.120144-1-jitao.shi@mediatek.com> <20200225094057.120144-7-jitao.shi@mediatek.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_174151_547223_9525FEEE X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, bibby.hsieh@mediatek.com, srv_heupstream@mediatek.com, David Airlie , huijuan.xie@mediatek.com, stonea168@163.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, cawa.cheng@mediatek.com, Rob Herring , linux-mediatek@lists.infradead.org, Daniel Vetter , Matthias Brugger , yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi, Jitao: On Tue, 2020-02-25 at 17:40 +0800, Jitao Shi wrote: > The factor depends on the divider of DPI in MT8183, therefore, > we should fix this factor to the right and new one. > Applied to mediatek-drm-next-5.7 [1], thanks. [1] https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.7 > Signed-off-by: Jitao Shi > Reviewed-by: CK Hu > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c > index df598f87a40f..db3272f7a4c4 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -676,6 +676,16 @@ static unsigned int mt2701_calculate_factor(int clock) > return 1; > } > > +static unsigned int mt8183_calculate_factor(int clock) > +{ > + if (clock <= 27000) > + return 8; > + else if (clock <= 167000) > + return 4; > + else > + return 2; > +} > + > static const struct mtk_dpi_conf mt8173_conf = { > .cal_factor = mt8173_calculate_factor, > .reg_h_fre_con = 0xe0, > @@ -687,6 +697,11 @@ static const struct mtk_dpi_conf mt2701_conf = { > .edge_sel_en = true, > }; > > +static const struct mtk_dpi_conf mt8183_conf = { > + .cal_factor = mt8183_calculate_factor, > + .reg_h_fre_con = 0xe0, > +}; > + > static int mtk_dpi_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > @@ -784,6 +799,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { > { .compatible = "mediatek,mt8173-dpi", > .data = &mt8173_conf, > }, > + { .compatible = "mediatek,mt8183-dpi", > + .data = &mt8183_conf, > + }, > { }, > }; > _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek